Skip to content

Commit a4001c3

Browse files
committed
make tests work again
1 parent 7d08e42 commit a4001c3

12 files changed

Lines changed: 55 additions & 51 deletions

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ SHELL := /bin/bash
33

44
all : clean test
55

6+
.PHONY: all test clean
7+
68
clean:
79
rm -rf output
810
rm -rf work

test/data/test_bams.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
tumor_normal primary:/home/priesgo/src/github/tronflow-variant-normalization/test_data/TESTX_S1_L001.bam
2-
tumor_normal normal:/home/priesgo/src/github/tronflow-variant-normalization/test_data/TESTX_S1_L002.bam
3-
single_sample tumor:/home/priesgo/src/github/tronflow-variant-normalization/test_data/TESTX_S1_L001.bam
4-
single_sample tumor:/home/priesgo/src/github/tronflow-variant-normalization/test_data/TESTX_S1_L002.bam
5-
single_sample normal:/home/priesgo/src/github/tronflow-variant-normalization/test_data/TESTX_S1_L001.bam
6-
single_sample normal:/home/priesgo/src/github/tronflow-variant-normalization/test_data/TESTX_S1_L002.bam
1+
tumor_normal primary:/home/priesgo/src/github/tronflow-variant-normalization/test/data/TESTX_S1_L001.bam
2+
tumor_normal normal:/home/priesgo/src/github/tronflow-variant-normalization/test/data/TESTX_S1_L002.bam
3+
single_sample tumor:/home/priesgo/src/github/tronflow-variant-normalization/test/data/TESTX_S1_L001.bam
4+
single_sample tumor:/home/priesgo/src/github/tronflow-variant-normalization/test/data/TESTX_S1_L002.bam
5+
single_sample normal:/home/priesgo/src/github/tronflow-variant-normalization/test/data/TESTX_S1_L001.bam
6+
single_sample normal:/home/priesgo/src/github/tronflow-variant-normalization/test/data/TESTX_S1_L002.bam

test/data/test_input.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
tumor_normal test_data/test_tumor_normal.vcf
2-
single_sample test_data/test_single_sample.vcf
1+
tumor_normal test/data/test_tumor_normal.vcf
2+
single_sample test/data/test_single_sample.vcf

test/data/test_input_no_ad.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sample_no_ad test_data/test_no_ad.vcf
1+
sample_no_ad test/data/test_no_ad.vcf

test/scripts/run_test_1.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
source test/scripts/assert.sh
55
output_folder=test/output/test1
6+
67
nextflow main.nf -profile test,conda --output $output_folder
8+
79
test -s $output_folder/single_sample/single_sample.normalized.vcf || { echo "Missing test 1 output file!"; exit 1; }
810
test -s $output_folder/tumor_normal/tumor_normal.normalized.vcf || { echo "Missing test 1 output file!"; exit 1; }
911
assert_eq `wc -l $output_folder/single_sample/single_sample.normalized.vcf | cut -d' ' -f 1` 53 "Wrong number of variants"

test/scripts/run_test_10.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
source test/scripts/assert.sh
55
output_folder=test/output/test10
66

7-
echo -e "tumor_normal\tprimary:"`pwd`"/test/data/TESTX_S1_L001.bam" > test_data/test_bams.txt
8-
echo -e "tumor_normal\tnormal:"`pwd`"/test/data/TESTX_S1_L002.bam" >> test_data/test_bams.txt
9-
echo -e "single_sample\ttumor:"`pwd`"/test/data/TESTX_S1_L001.bam" >> test_data/test_bams.txt
10-
echo -e "single_sample\ttumor:"`pwd`"/test/data/TESTX_S1_L002.bam" >> test_data/test_bams.txt
11-
echo -e "single_sample\tnormal:"`pwd`"/test/data/TESTX_S1_L001.bam" >> test_data/test_bams.txt
12-
echo -e "single_sample\tnormal:"`pwd`"/test/data/TESTX_S1_L002.bam" >> test_data/test_bams.txt
7+
echo -e "tumor_normal\tprimary:"`pwd`"/test/data/TESTX_S1_L001.bam" > test/data/test_bams.txt
8+
echo -e "tumor_normal\tnormal:"`pwd`"/test/data/TESTX_S1_L002.bam" >> test/data/test_bams.txt
9+
echo -e "single_sample\ttumor:"`pwd`"/test/data/TESTX_S1_L001.bam" >> test/data/test_bams.txt
10+
echo -e "single_sample\ttumor:"`pwd`"/test/data/TESTX_S1_L002.bam" >> test/data/test_bams.txt
11+
echo -e "single_sample\tnormal:"`pwd`"/test/data/TESTX_S1_L001.bam" >> test/data/test_bams.txt
12+
echo -e "single_sample\tnormal:"`pwd`"/test/data/TESTX_S1_L002.bam" >> test/data/test_bams.txt
1313

14-
nextflow main.nf -profile test,conda --output $output_folder --input_bams test_data/test_bams.txt --skip_normalization
14+
nextflow main.nf -profile test,conda --output $output_folder --input_bams test/data/test_bams.txt --skip_normalization
1515

1616
test -s $output_folder/single_sample/single_sample.filtered_multiallelics.vcf || { echo "Missing test 10 output file!"; exit 1; }
1717
test -s $output_folder/tumor_normal/tumor_normal.filtered_multiallelics.vcf || { echo "Missing test 10 output file!"; exit 1; }

test/scripts/run_test_11.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@ source test/scripts/assert.sh
55
output_folder=test/output/test11
66

77
# build input BAMs file
8-
echo -e "tumor_normal\tprimary:"`pwd`"/test/data/TESTX_S1_L001.bam" > test_data/test_bams.txt
9-
echo -e "tumor_normal\tnormal:"`pwd`"/test/data/TESTX_S1_L002.bam" >> test_data/test_bams.txt
10-
echo -e "single_sample\ttumor:"`pwd`"/test/data/TESTX_S1_L001.bam" >> test_data/test_bams.txt
11-
echo -e "single_sample\ttumor:"`pwd`"/test/data/TESTX_S1_L002.bam" >> test_data/test_bams.txt
12-
echo -e "single_sample\tnormal:"`pwd`"/test/data/TESTX_S1_L001.bam" >> test_data/test_bams.txt
13-
echo -e "single_sample\tnormal:"`pwd`"/test/data/TESTX_S1_L002.bam" >> test_data/test_bams.txt
8+
echo -e "tumor_normal\tprimary:"`pwd`"/test/data/TESTX_S1_L001.bam" > test/data/test_bams.txt
9+
echo -e "tumor_normal\tnormal:"`pwd`"/test/data/TESTX_S1_L002.bam" >> test/data/test_bams.txt
10+
echo -e "single_sample\ttumor:"`pwd`"/test/data/TESTX_S1_L001.bam" >> test/data/test_bams.txt
11+
echo -e "single_sample\ttumor:"`pwd`"/test/data/TESTX_S1_L002.bam" >> test/data/test_bams.txt
12+
echo -e "single_sample\tnormal:"`pwd`"/test/data/TESTX_S1_L001.bam" >> test/data/test_bams.txt
13+
echo -e "single_sample\tnormal:"`pwd`"/test/data/TESTX_S1_L002.bam" >> test/data/test_bams.txt
1414

1515
# build input purities file
16-
echo -e "tumor_normal\tprimary:0.5" > test_data/test_purities.txt
17-
echo -e "tumor_normal\tnormal:0.6" >> test_data/test_purities.txt
18-
echo -e "single_sample\ttumor:0.7" >> test_data/test_purities.txt
19-
echo -e "single_sample\tnormal:0.8" >> test_data/test_purities.txt
16+
echo -e "tumor_normal\tprimary:0.5" > test/data/test_purities.txt
17+
echo -e "tumor_normal\tnormal:0.6" >> test/data/test_purities.txt
18+
echo -e "single_sample\ttumor:0.7" >> test/data/test_purities.txt
19+
echo -e "single_sample\tnormal:0.8" >> test/data/test_purities.txt
2020

2121
nextflow main.nf -profile test,conda --output $output_folder \
22-
--input_bams test_data/test_bams.txt \
23-
--input_purities test_data/test_purities.txt \
22+
--input_bams test/data/test_bams.txt \
23+
--input_purities test/data/test_purities.txt \
2424
--skip_normalization
2525

2626
# test output files

test/scripts/run_test_4.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
source test/scripts/assert.sh
55
output_folder=test/output/test4
6-
nextflow main.nf -profile test,conda --input_vcfs test_data/test_input_no_ad.txt --output $output_folder
6+
nextflow main.nf -profile test,conda --input_vcfs test/data/test_input_no_ad.txt --output $output_folder
77
test -s $output_folder/sample_no_ad/sample_no_ad.normalized.vcf || { echo "Missing test 4 output file!"; exit 1; }
88
assert_eq `wc -l $output_folder/sample_no_ad/sample_no_ad.normalized.vcf | cut -d' ' -f 1` 52 "Wrong number of variants"

test/scripts/run_test_5.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
source test/scripts/assert.sh
55
output_folder=test/output/test5
6-
nextflow main.nf -profile test,conda --output $output_folder --input_vcfs false --input_vcf test_data/test_single_sample.vcf
6+
nextflow main.nf -profile test,conda --output $output_folder --input_vcfs false --input_vcf test/data/test_single_sample.vcf
77
test -s $output_folder/test_single_sample/test_single_sample.normalized.vcf || { echo "Missing test 4 output file!"; exit 1; }
88
assert_eq `wc -l $output_folder/test_single_sample/test_single_sample.normalized.vcf | cut -d' ' -f 1` 53 "Wrong number of variants"

test/scripts/run_test_6.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ source test/scripts/assert.sh
55
output_folder=test/output/test6
66

77

8-
echo -e "tumor_normal\tprimary:"`pwd`"/test/data/TESTX_S1_L001.bam" > test_data/test_bams.txt
9-
echo -e "tumor_normal\tnormal:"`pwd`"/test/data/TESTX_S1_L002.bam" >> test_data/test_bams.txt
10-
echo -e "single_sample\ttumor:"`pwd`"/test/data/TESTX_S1_L001.bam" >> test_data/test_bams.txt
11-
echo -e "single_sample\ttumor:"`pwd`"/test/data/TESTX_S1_L002.bam" >> test_data/test_bams.txt
12-
echo -e "single_sample\tnormal:"`pwd`"/test/data/TESTX_S1_L001.bam" >> test_data/test_bams.txt
13-
echo -e "single_sample\tnormal:"`pwd`"/test/data/TESTX_S1_L002.bam" >> test_data/test_bams.txt
8+
echo -e "tumor_normal\tprimary:"`pwd`"/test/data/TESTX_S1_L001.bam" > test/data/test_bams.txt
9+
echo -e "tumor_normal\tnormal:"`pwd`"/test/data/TESTX_S1_L002.bam" >> test/data/test_bams.txt
10+
echo -e "single_sample\ttumor:"`pwd`"/test/data/TESTX_S1_L001.bam" >> test/data/test_bams.txt
11+
echo -e "single_sample\ttumor:"`pwd`"/test/data/TESTX_S1_L002.bam" >> test/data/test_bams.txt
12+
echo -e "single_sample\tnormal:"`pwd`"/test/data/TESTX_S1_L001.bam" >> test/data/test_bams.txt
13+
echo -e "single_sample\tnormal:"`pwd`"/test/data/TESTX_S1_L002.bam" >> test/data/test_bams.txt
1414

1515
# run
16-
nextflow main.nf -profile test,conda --output $output_folder --input_bams test_data/test_bams.txt
16+
nextflow main.nf -profile test,conda --output $output_folder --input_bams test/data/test_bams.txt
1717

1818
# check results
1919
test -s $output_folder/single_sample/single_sample.normalized.vcf || { echo "Missing test 6 output file!"; exit 1; }

0 commit comments

Comments
 (0)