Skip to content

Commit

Permalink
fix rsq
Browse files Browse the repository at this point in the history
  • Loading branch information
hasindu2008 committed Apr 3, 2023
1 parent f4c3aaf commit 527ffc3
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 16 deletions.
19 changes: 17 additions & 2 deletions scripts/test_extensive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "*********************************************************************"
Expand Down Expand Up @@ -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 "*********************************************************************"
Expand Down Expand Up @@ -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 "*********************************************************************"
Expand Down
34 changes: 20 additions & 14 deletions scripts/test_rsq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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


Expand Down

0 comments on commit 527ffc3

Please # to comment.