From 527ffc353f6f82b309ef26d967f4a5efa9326285 Mon Sep 17 00:00:00 2001 From: Hasindu Gamaarachchi Date: Sun, 2 Apr 2023 23:10:56 +1000 Subject: [PATCH] fix rsq --- scripts/test_extensive.sh | 19 +++++++++++++++++-- scripts/test_rsq.sh | 34 ++++++++++++++++++++-------------- 2 files changed, 37 insertions(+), 16 deletions(-) diff --git a/scripts/test_extensive.sh b/scripts/test_extensive.sh index 41a3433a..5f7b3842 100755 --- a/scripts/test_extensive.sh +++ b/scripts/test_extensive.sh @@ -132,9 +132,14 @@ test_suit1 () { echo "************************Doing R10 HG2 tests*****************************" + echo "Methylation calling" scripts/test.sh -f 2> r10_hg2_methcalling.log || die "failed" + echo "____________________________________________________________________" + echo "event alignment" scripts/test_eventalign.sh -f 2> r10_hg2_eventalign.log || die "failed" - scripts/test_lsk114.sh 2> lsk114.log || die "failed" + echo "____________________________________________________________________" + echo "methylation resquiggle" + scripts/test_rsq -f 2> r10_hg2_resquiggle.log || die "failed" echo "" echo "*********************************************************************" @@ -162,6 +167,9 @@ test_suit1_cuda () { echo "slow5" scripts/test_slow5.sh 2> ecoli_slow5_cuda.log || die "failed" echo "____________________________________________________________________" + echo "resquiggle" + scripts/test_rsq.sh 2> ecoli_resquiggle_cuda.log || die "failed" + echo "____________________________________________________________________" echo "" echo "*********************************************************************" @@ -191,12 +199,19 @@ test_suit1_cuda () { echo "event alignment" scripts/test_eventalign.sh -e 2> rna_eventalign_cuda.log || echo "failure ignored until paste is implemented with join in full event align output" echo "____________________________________________________________________" + echo "resquiggle" + scripts/test_rsq.sh -e 2> rna_resquiggle_cuda.log || die "failed" echo "************************Doing R10 HG2 tests*****************************" - scripts/test_lsk114.sh 2> lsk114_cuda.log || die "failed" + echo "Methylation calling" scripts/test.sh -f 2> r10_hg2_methcalling_cuda.log || die "failed" + echo "____________________________________________________________________" + echo "event alignment" scripts/test_eventalign.sh -f 2> r10_hg2_eventalign.log || die "failed" + echo "____________________________________________________________________" + echo "resquiggle" + scripts/test_rsq -f 2> r10_hg2_resquiggle.log || die "failed" echo "" echo "*********************************************************************" diff --git a/scripts/test_rsq.sh b/scripts/test_rsq.sh index 95deaf15..013c2840 100755 --- a/scripts/test_rsq.sh +++ b/scripts/test_rsq.sh @@ -45,9 +45,9 @@ download_test_set() { handle_tests() { - numfailed=$(wc -l < ${testdir}/floatdiff.txt) - numcases=$(wc -l < ${testdir}/meth_float.txt) - numres=$(wc -l < ${testdir}/result_float.txt) + numfailed=$(wc -l < ${testdir}/diff.txt) + numcases=$(wc -l < ${ORIG}) + numres=$(wc -l < ${RES}) echo "$numfailed of $numcases test cases deviated." missing=$(echo "$numcases-$numres" | bc) echo "$missing entries in the truthset are missing in the testset" @@ -58,17 +58,23 @@ handle_tests() { execute_test() { - ARCH=$(uname -m) - if [ $ARCH != "aarm64" ]; then - if [ $testdir = test/chr22_meth_example ]; then - echo "Diff not yet implemented for chr22_meth_example" - elif [ $testdir = test/ecoli_2kb_region ]; then - diff -q ${testdir}/result.txt ${testdir}_big_testresults/resquiggle.tsv || die "Validation of tsv failed" - diff -q ${testdir}/result2.txt ${testdir}_big_testresults/resquiggle.paf || die "Validation of paf failed" - elif [ $testdir = test/rna ]; then - diff -q ${testdir}/result.txt ${testdir}/resquiggle.tsv || die "Validation of tsv failed" - diff -q ${testdir}/result2.txt ${testdir}/resquiggle.paf || die "Validation of paf failed" - fi + + if [ $testdir = test/chr22_meth_example ]; then + echo "Diff not yet implemented for chr22_meth_example" + elif [ $testdir = test/ecoli_2kb_region ]; then + ORIG=${testdir}_big_testresults/resquiggle.tsv + RES=${testdir}/result.txt + diff -y --suppress-common-lines ${ORIG} ${RES} > ${testdir}/diff.txt || handle_tests + ORIG=${testdir}_big_testresults/resquiggle.paf + RES=${testdir}/result2.txt + diff -y --suppress-common-lines ${ORIG} ${RES} > ${testdir}/diff.txt || handle_tests + else + ORIG=${testdir}/resquiggle.tsv + RES=${testdir}/result.txt + diff -y --suppress-common-lines ${ORIG} ${RES} > ${testdir}/diff.txt || handle_tests + ORIG=${testdir}/resquiggle.paf + RES=${testdir}/result2.txt + diff -y --suppress-common-lines ${ORIG} ${RES} > ${testdir}/diff.txt || handle_tests fi