Skip to content

Commit

Permalink
added a little debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
aerijman committed Jan 8, 2025
1 parent 48cba79 commit b376ede
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,22 @@ nextflow run ${pwd}/main.nf \
--enable_neb_agg "false" \
-resume 2>&1 > ${pwd}/test.log.out

# Check if Nextflow run was successful
if [ $? -ne 0 ]; then
echo "Nextflow pipeline failed" >> ${pwd}/test.log.out
exit 1
else
echo "Nextflow pipeline succeeded" >> ${pwd}/test.log.out
fi


# Check results
echo "checking results..."
cat em-seq_output/stats/flagstats/emseq-test_76..flagstat |\
grep -q "5000 + 0 properly paired" && echo "flagstats OK" || echo flagstats not OK" >> ${pwd}/test.log.out
grep -q "5000 + 0 properly paired" && echo "flagstats OK" >> ${pwd}/test.log.out || echo "flagstats not OK" >> ${pwd}/test.log.out
tail -n2 em-seq_output/stats/picard_alignment_metrics/emseq-test_76..alignment_summary_metrics.txt |\
awk 'BEGIN{result="alignment metrics not OK"}{if ($1==76 && $2>4996) {result="alignment metrics OK"}}END{print result}' >> ${pwd}/test.log.out

rm -r ${tmp}
echo "FINISHED"

# /mnt/hpc_scratch/" \

0 comments on commit b376ede

Please sign in to comment.