33
44source tests/assert.sh
55output_folder=output/test6
6+
7+
68echo -e " tumor_normal\tprimary:" ` pwd` " /test_data/TESTX_S1_L001.bam" > test_data/test_bams.txt
79echo -e " tumor_normal\tnormal:" ` pwd` " /test_data/TESTX_S1_L002.bam" >> test_data/test_bams.txt
810echo -e " single_sample\ttumor:" ` pwd` " /test_data/TESTX_S1_L001.bam" >> test_data/test_bams.txt
911echo -e " single_sample\ttumor:" ` pwd` " /test_data/TESTX_S1_L002.bam" >> test_data/test_bams.txt
1012echo -e " single_sample\tnormal:" ` pwd` " /test_data/TESTX_S1_L001.bam" >> test_data/test_bams.txt
1113echo -e " single_sample\tnormal:" ` pwd` " /test_data/TESTX_S1_L002.bam" >> test_data/test_bams.txt
14+
15+ # run
1216nextflow main.nf -profile test,conda --output $output_folder --input_bams test_data/test_bams.txt
17+
18+ # check results
1319test -s $output_folder /single_sample/single_sample.normalized.vcf || { echo " Missing test 6 output file!" ; exit 1; }
1420test -s $output_folder /tumor_normal/tumor_normal.normalized.vcf || { echo " Missing test 6 output file!" ; exit 1; }
1521test -s $output_folder /single_sample/single_sample.vaf.vcf || { echo " Missing test 6 output file!" ; exit 1; }
1622test -s $output_folder /tumor_normal/tumor_normal.vaf.vcf || { echo " Missing test 6 output file!" ; exit 1; }
1723test -s $output_folder /single_sample/single_sample.filtered_multiallelics.vcf || { echo " Missing test 6 output file!" ; exit 1; }
1824test -s $output_folder /tumor_normal/tumor_normal.filtered_multiallelics.vcf || { echo " Missing test 6 output file!" ; exit 1; }
19- assert_eq ` wc -l $output_folder /single_sample/single_sample.normalized.vcf | cut -d' ' -f 1` 53 " Wrong number of variants"
20- assert_eq ` wc -l $output_folder /tumor_normal/tumor_normal.normalized.vcf | cut -d' ' -f 1` 53 " Wrong number of variants"
21- assert_eq ` wc -l $output_folder /single_sample/single_sample.normalized.vaf.vcf | cut -d' ' -f 1` 72 " Wrong number of variants"
25+
26+ assert_eq ` grep -v ' #' $output_folder /single_sample/single_sample.normalized.vcf | wc -l | cut -d' ' -f 1` 32 " Wrong number of variants"
27+ assert_eq ` grep -v ' #' $output_folder /tumor_normal/tumor_normal.normalized.vcf | wc -l | cut -d' ' -f 1` 32 " Wrong number of variants"
28+ assert_eq ` grep -v ' #' $output_folder /single_sample/single_sample.vaf.vcf | wc -l | cut -d' ' -f 1` 32 " Wrong number of variants"
2229assert_eq ` grep tumor_af $output_folder /single_sample/single_sample.vaf.vcf | wc -l | cut -d' ' -f 1` 35 " Wrong number of variants"
2330assert_eq ` grep normal_af $output_folder /single_sample/single_sample.vaf.vcf | wc -l | cut -d' ' -f 1` 35 " Wrong number of variants"
24- assert_eq ` wc -l $output_folder /tumor_normal/tumor_normal.vaf.vcf | cut -d' ' -f 1` 60 " Wrong number of variants"
25- assert_eq ` wc -l $output_folder /tumor_normal/tumor_normal.filtered_multiallelics.vcf | cut -d' ' -f 1` 53 " Wrong number of variants"
31+ assert_eq ` grep -v ' # ' $output_folder /tumor_normal/tumor_normal.vaf.vcf | wc -l | cut -d' ' -f 1` 32 " Wrong number of variants"
32+ assert_eq ` grep -v ' # ' $output_folder /tumor_normal/tumor_normal.filtered_multiallelics.vcf | wc -l | cut -d' ' -f 1` 23 " Wrong number of variants"
2633assert_eq ` grep primary_af $output_folder /tumor_normal/tumor_normal.filtered_multiallelics.vcf | wc -l | cut -d' ' -f 1` 24 " Wrong number of variants"
0 commit comments