Skip to content

Commit

Permalink
Separate CI nexflow profile from test profile
Browse files Browse the repository at this point in the history
  • Loading branch information
LKress committed Jun 14, 2024
1 parent 5c5041c commit 2829297
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 16 deletions.
15 changes: 10 additions & 5 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
*/

profiles {
conda { params.enable_conda = true }
conda {
params.enable_conda = true
conda.enabled = true
}
debug { process.beforeScript = 'echo $HOSTNAME' }
test {
params.reference = "$baseDir/test_data/ucsc.hg19.minimal.fasta"
params.intervals = "$baseDir/test_data/intervals.minimal.bed"
params.gnomad = "$baseDir/test_data/gnomad.minimal.vcf.gz"
ci {
params.memory_mutect2 = "2g"
params.cpus_mutect2 = 1
params.memory_read_orientation = "2g"
Expand All @@ -27,6 +27,11 @@ profiles {
trace.enabled = false
dag.enabled = false
}
test {
params.reference = "$baseDir/test_data/ucsc.hg19.minimal.fasta"
params.intervals = "$baseDir/test_data/intervals.minimal.bed"
params.gnomad = "$baseDir/test_data/gnomad.minimal.vcf.gz"
}
}

// Export this variable to prevent local Python libraries from conflicting with those in the container
Expand Down
2 changes: 1 addition & 1 deletion tests/test_01.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ source bin/assert.sh
output=output/test1

echo -e "sample_name\t"`pwd`"/test_data/SRR8244887.preprocessed.downsampled.bam\t"`pwd`"/test_data/SRR8244836.preprocessed.downsampled.bam" > test_data/test_input.txt
nextflow main.nf -profile test,conda --output $output --input_files test_data/test_input.txt
nextflow main.nf -profile test,conda,ci --output $output --input_files test_data/test_input.txt

test -s $output/sample_name/sample_name.mutect2.vcf || { echo "Missing output VCF file!"; exit 1; }
2 changes: 1 addition & 1 deletion tests/test_02.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
source bin/assert.sh
output=output/test2

nextflow main.nf -profile test,conda --disable_common_germline_filter --output $output --input_files test_data/test_input.txt
nextflow main.nf -profile test,conda,ci --disable_common_germline_filter --output $output --input_files test_data/test_input.txt

test -s $output/sample_name/sample_name.mutect2.vcf || { echo "Missing output VCF file!"; exit 1; }
2 changes: 1 addition & 1 deletion tests/test_03.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ source bin/assert.sh
output=output/test3

echo -e "sample_name_with_replicates\t"`pwd`"/test_data/SRR8244887.preprocessed.downsampled.bam,"`pwd`"/test_data/SRR8244887.preprocessed.downsampled.bam\t"`pwd`"/test_data/SRR8244836.preprocessed.downsampled.bam,"`pwd`"/test_data/SRR8244836.preprocessed.downsampled.bam" > test_data/test_input_with_replicates.txt
nextflow main.nf -profile test,conda --input_files test_data/test_input_with_replicates.txt --output $output
nextflow main.nf -profile test,conda,ci --input_files test_data/test_input_with_replicates.txt --output $output

test -s $output/sample_name_with_replicates/sample_name_with_replicates.mutect2.vcf || { echo "Missing output VCF file!"; exit 1; }
2 changes: 1 addition & 1 deletion tests/test_04.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
source bin/assert.sh
output=output/test4

nextflow main.nf -profile test,conda --output $output --input_files test_data/test_input.txt --intervals false
nextflow main.nf -profile test,conda,ci --output $output --input_files test_data/test_input.txt --intervals false

test -s $output/sample_name/sample_name.mutect2.vcf || { echo "Missing output VCF file!"; exit 1; }
2 changes: 1 addition & 1 deletion tests/test_05.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ output=output/test5
echo -e "sample_name\t"`pwd`"/test_data/SRR8244887.preprocessed.downsampled.bam\t"`pwd`"/test_data/SRR8244836.preprocessed.downsampled.bam" > test_data/test_input.txt

{ # try
nextflow main.nf -profile test,conda --output $output --input_files test_data/test_input.txt &&
nextflow main.nf -profile test,conda,ci --output $output --input_files test_data/test_input.txt &&
assert_true false "Error condition not captured"
} || { # catch
assert_true true
Expand Down
4 changes: 2 additions & 2 deletions tests/test_06.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ output=output/test6

echo -e "sample_name\t"`pwd`"/test_data/SRR8244887.preprocessed.downsampled.bam,"`pwd`"/test_data/SRR8244836.preprocessed.downsampled.bam\t"`pwd`"/test_data/SRR8244836.preprocessed.downsampled.bam" > test_data/test_input.txt
{ # try
nextflow main.nf -profile test,conda --output $output --input_files test_data/test_input.txt &&
nextflow main.nf -profile test,conda,ci --output $output --input_files test_data/test_input.txt &&
assert_true false "Error condition not captured"
} || { # catch
assert_true true
}

echo -e "sample_name\t"`pwd`"/test_data/SRR8244887.preprocessed.downsampled.bam\t"`pwd`"/test_data/SRR8244887.preprocessed.downsampled.bam,"`pwd`"/test_data/SRR8244836.preprocessed.downsampled.bam" > test_data/test_input.txt
{ # try
nextflow main.nf -profile test,conda --output $output --input_files test_data/test_input.txt &&
nextflow main.nf -profile test,conda,ci --output $output --input_files test_data/test_input.txt &&
assert_true false "Error condition not captured"
} || { # catch
assert_true true
Expand Down
2 changes: 1 addition & 1 deletion tests/test_07.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ source bin/assert.sh
output=output/test5

echo -e "sample_name\t"`pwd`"/test_data/SRR8244887.preprocessed.downsampled.bam\t"`pwd`"/test_data/SRR8244836.preprocessed.downsampled.bam" > test_data/test_input.txt
nextflow main.nf -profile test,conda --output $output --input_files test_data/test_input.txt \
nextflow main.nf -profile test,conda,ci --output $output --input_files test_data/test_input.txt \
--reference_version_funcotator hg19 \
--funcotator /home/priesgo/funcotator/funcotator_dataSources.v1.7.20200521s

Expand Down
2 changes: 1 addition & 1 deletion tests/test_08.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source bin/assert.sh
output=output/test8

echo -e "sample_name\t"`pwd`"/test_data/SRR8244887.preprocessed.downsampled.bam\t"`pwd`"/test_data/SRR8244836.preprocessed.downsampled.bam" > test_data/test_input.txt
nextflow main.nf -profile test,conda --output $output --input_files test_data/test_input.txt --enable_bam_output
nextflow main.nf -profile test,conda,ci --output $output --input_files test_data/test_input.txt --enable_bam_output

test -s $output/sample_name/sample_name.mutect2.vcf || { echo "Missing output VCF file!"; exit 1; }
test -s $output/sample_name/sample_name.mutect2.assembled_haplotypes.bam || { echo "Missing output BAM file!"; exit 1; }
Expand Down
2 changes: 1 addition & 1 deletion tests/test_09.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ source bin/assert.sh
output=output/test9

echo -e "sample_name\t"`pwd`"/test_data/SRR8244887.preprocessed.downsampled.bam\t"`pwd`"/test_data/SRR8244836.preprocessed.downsampled.bam" > test_data/test_input.txt
nextflow main.nf -profile test,conda --output $output --input_files test_data/test_input.txt --gnomad false --args_filter "--contamination-estimate 0.2"
nextflow main.nf -profile test,conda,ci --output $output --input_files test_data/test_input.txt --gnomad false --args_filter "--contamination-estimate 0.2"

test -s $output/sample_name/sample_name.mutect2.vcf || { echo "Missing output VCF file!"; exit 1; }
2 changes: 1 addition & 1 deletion tests/test_10.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
source bin/assert.sh
output=output/test10

nextflow main.nf -profile test,conda --output $output \
nextflow main.nf -profile test,conda,ci --output $output \
--input_name sample_name \
--input_tumor_bam `pwd`/test_data/SRR8244887.preprocessed.downsampled.bam \
--input_normal_bam `pwd`/test_data/SRR8244836.preprocessed.downsampled.bam
Expand Down

0 comments on commit 2829297

Please sign in to comment.