diff --git a/tests/config/nextflow.config b/tests/config/nextflow.config index cddb2151..3c530d3c 100644 --- a/tests/config/nextflow.config +++ b/tests/config/nextflow.config @@ -46,7 +46,7 @@ if ("$PROFILE" == "singularity") { conda { createTimeout = "120 min" } // Load test_data.config containing paths to test data -// includeConfig 'test_data.config' +includeConfig 'test_data.config' manifest { nextflowVersion = '!>=21.10.3' diff --git a/tests/config/test_data.config b/tests/config/test_data.config new file mode 100644 index 00000000..ec71e199 --- /dev/null +++ b/tests/config/test_data.config @@ -0,0 +1,5 @@ +params { + input = "$projectDir/assets/examples/samplesheet.csv" + scorefile = "$projectDir/assets/examples/scorefiles/PGS001229_22.txt" + target_build = "GRCh37" + } \ No newline at end of file diff --git a/tests/modules/combine/test.yml b/tests/modules/combine/test.yml index 90f0b76a..4dd6db13 100644 --- a/tests/modules/combine/test.yml +++ b/tests/modules/combine/test.yml @@ -1,5 +1,5 @@ - name: test combine scorefiles module - command: nextflow run ./tests/modules/combine -entry testcombine -c ./tests/config/nextflow.config -profile test --target_build GRCh38 + command: nextflow run ./tests/modules/combine -entry testcombine -c ./tests/config/nextflow.config --target_build GRCh38 tags: - module - combine diff --git a/tests/modules/download/test.yml b/tests/modules/download/test.yml index 90808365..df20d4cc 100644 --- a/tests/modules/download/test.yml +++ b/tests/modules/download/test.yml @@ -1,5 +1,5 @@ - name: pgscatalog test --pgs_id - command: nextflow run ./tests/modules/download -entry testaccession -c ./tests/config/nextflow.config -profile test + command: nextflow run ./tests/modules/download -entry testaccession -c ./tests/config/nextflow.config tags: - module - download @@ -11,7 +11,7 @@ - "pgscatalog_utils: 0.4.0" - name: pgscatalog test --efo_trait --pgp_id and --pgs_id - command: nextflow run ./tests/modules/download -entry testmultipleaccessions -c ./tests/config/nextflow.config -profile test + command: nextflow run ./tests/modules/download -entry testmultipleaccessions -c ./tests/config/nextflow.config tags: - module - download @@ -27,7 +27,7 @@ - "pgscatalog_utils: 0.4.0" - name: pgscatalog test bad accession - command: nextflow run ./tests/modules/download -entry testbadaccession -c ./tests/config/nextflow.config -profile test + command: nextflow run ./tests/modules/download -entry testbadaccession -c ./tests/config/nextflow.config tags: - module - download @@ -35,7 +35,7 @@ exit_code: 1 - name: pgscatalog test good and bad accessions GRCh38 - command: nextflow run ./tests/modules/download -entry testmixedaccessions -c ./tests/config/nextflow.config -profile test + command: nextflow run ./tests/modules/download -entry testmixedaccessions -c ./tests/config/nextflow.config tags: - module - download diff --git a/tests/modules/match/test.yml b/tests/modules/match/test.yml index 3215e5ab..27419bcc 100644 --- a/tests/modules/match/test.yml +++ b/tests/modules/match/test.yml @@ -1,6 +1,6 @@ # IPC files aren't published so can't test - name: test match module - command: nextflow run ./tests/modules/match -entry testmatch -c ./tests/config/nextflow.config -profile test + command: nextflow run ./tests/modules/match -entry testmatch -c ./tests/config/nextflow.config tags: - module - match @@ -11,7 +11,7 @@ - "pgscatalog_utils: 0.4.0" - name: test match combine module - command: nextflow run ./tests/modules/match -entry testmatchcombine -c ./tests/config/nextflow.config -profile test + command: nextflow run ./tests/modules/match -entry testmatchcombine -c ./tests/config/nextflow.config tags: - module - match diff --git a/tests/modules/plink2/relabelbim/test.yml b/tests/modules/plink2/relabelbim/test.yml index 981da6de..cd6bbab4 100644 --- a/tests/modules/plink2/relabelbim/test.yml +++ b/tests/modules/plink2/relabelbim/test.yml @@ -1,5 +1,5 @@ - name: plink2 testrelabelbim - command: nextflow run ./tests/modules/plink2/relabelbim -entry testrelabelbim -c ./tests/config/nextflow.config -profile test + command: nextflow run ./tests/modules/plink2/relabelbim -entry testrelabelbim -c ./tests/config/nextflow.config tags: - plink2 - fast diff --git a/tests/modules/plink2/relabelpvar/test.yml b/tests/modules/plink2/relabelpvar/test.yml index df9d72b7..a13895cc 100644 --- a/tests/modules/plink2/relabelpvar/test.yml +++ b/tests/modules/plink2/relabelpvar/test.yml @@ -1,5 +1,5 @@ - name: plink2 testrelabelpvar - command: nextflow run ./tests/modules/plink2/relabelpvar -entry testrelabelpvar -c ./tests/config/nextflow.config -profile test --vzs + command: nextflow run ./tests/modules/plink2/relabelpvar -entry testrelabelpvar -c ./tests/config/nextflow.config tags: - plink2 - fast @@ -12,5 +12,4 @@ - path: output/plink2/GRCh37_test_22.pvar.zst - path: output/plink2/versions.yml contains: - - "plink2: 2.00a3.3" - + - "plink2: 2.00a3.3" diff --git a/tests/modules/plink2/score/test.yml b/tests/modules/plink2/score/test.yml index ca17117a..4dddd189 100644 --- a/tests/modules/plink2/score/test.yml +++ b/tests/modules/plink2/score/test.yml @@ -1,5 +1,5 @@ - name: plink2 testscore - command: nextflow run ./tests/modules/plink2/score -entry testscore -c ./tests/config/nextflow.config -profile test + command: nextflow run ./tests/modules/plink2/score -entry testscore -c ./tests/config/nextflow.config tags: - module - score @@ -18,7 +18,7 @@ - "plink2: 2.00a3.3" - name: plink2 testsmallscore - command: nextflow run ./tests/modules/plink2/score -entry testsmallscore -c ./tests/config/nextflow.config -profile test + command: nextflow run ./tests/modules/plink2/score -entry testsmallscore -c ./tests/config/nextflow.config tags: - module - score @@ -37,7 +37,7 @@ - "plink2: 2.00a3.3" - name: plink2 testmultiscore - command: nextflow run ./tests/modules/plink2/score -entry testmultiscore -c ./tests/config/nextflow.config -profile test + command: nextflow run ./tests/modules/plink2/score -entry testmultiscore -c ./tests/config/nextflow.config tags: - module - score @@ -58,7 +58,7 @@ - "plink2: 2.00a3.3" - name: plink2 testsmallmultiscore - command: nextflow run ./tests/modules/plink2/score -entry testsmallmultiscore -c ./tests/config/nextflow.config -profile test + command: nextflow run ./tests/modules/plink2/score -entry testsmallmultiscore -c ./tests/config/nextflow.config tags: - module - score @@ -79,7 +79,7 @@ - "plink2: 2.00a3.3" - name: plink2 testmultiscorefail - command: nextflow run ./tests/modules/plink2/score -entry testmultiscorefail -c ./tests/config/nextflow.config -profile test + command: nextflow run ./tests/modules/plink2/score -entry testmultiscorefail -c ./tests/config/nextflow.config tags: - module - score diff --git a/tests/modules/plink2/vcf/test.yml b/tests/modules/plink2/vcf/test.yml index e3305d84..7174a174 100644 --- a/tests/modules/plink2/vcf/test.yml +++ b/tests/modules/plink2/vcf/test.yml @@ -1,5 +1,5 @@ - name: plink2 vcf - command: nextflow run ./tests/modules/plink2/vcf -entry testvcf -c ./tests/config/nextflow.config -profile test + command: nextflow run ./tests/modules/plink2/vcf -entry testvcf -c ./tests/config/nextflow.config tags: - module - plink2 diff --git a/tests/subworkflows/test_apply_score.yml b/tests/subworkflows/test_apply_score.yml index 770573f3..5d930910 100644 --- a/tests/subworkflows/test_apply_score.yml +++ b/tests/subworkflows/test_apply_score.yml @@ -1,6 +1,6 @@ # get a scores with two columns in output (test profile + PGS001229) for custom test - name: test apply score subworkflow - command: nextflow run main.nf -profile test --only_score -c ./tests/config/nextflow.config --pgs_id PGS001229 --min_overlap 0 + command: nextflow run main.nf --only_score -c ./tests/config/nextflow.config --pgs_id PGS001229 --min_overlap 0 tags: - applyscore - subworkflow @@ -14,9 +14,8 @@ - path: output/plink2/cineca_22_additive_0.sscore.vars - path: output/score/aggregated_scores.txt.gz -# TODO: fix overlap -> 1 in pgscatalog_utils - name: test perfect apply score - command: nextflow run main.nf -profile test --only_score -c ./tests/config/nextflow.config --scorefile ./tests/subworkflows/perfect.txt + command: nextflow run main.nf --only_score -c ./tests/config/nextflow.config --scorefile ./tests/subworkflows/perfect.txt tags: - applyscore - subworkflow diff --git a/tests/subworkflows/test_input_subworkflow.yml b/tests/subworkflows/test_input_subworkflow.yml index bc42349d..8de7d0cf 100644 --- a/tests/subworkflows/test_input_subworkflow.yml +++ b/tests/subworkflows/test_input_subworkflow.yml @@ -1,5 +1,5 @@ - name: test input check subworkflow - command: nextflow run main.nf -profile test --only_input -c ./tests/config/nextflow.config + command: nextflow run main.nf --only_input -c ./tests/config/nextflow.config tags: - inputcheck - subworkflow @@ -9,7 +9,7 @@ - path: output/combine/scorefiles.txt.gz - name: test input check subworkflow with PGS catalog API - command: nextflow run main.nf -profile test --pgs_id PGS001229 --only_input -c ./tests/config/nextflow.config + command: nextflow run main.nf --pgs_id PGS001229 --only_input -c ./tests/config/nextflow.config tags: - inputcheck - subworkflow @@ -20,7 +20,7 @@ - path: output/combine/scorefiles.txt.gz - name: test input check subworkflow with PGS catalog API and whitespace - command: nextflow run main.nf -profile test --pgs_id "PGS001229, PGS000802" --only_input -c ./tests/config/nextflow.config + command: nextflow run main.nf --pgs_id "PGS001229, PGS000802" --only_input -c ./tests/config/nextflow.config tags: - inputcheck - subworkflow diff --git a/tests/subworkflows/test_liftover_run.yml b/tests/subworkflows/test_liftover_run.yml index 527b9121..800087f0 100644 --- a/tests/subworkflows/test_liftover_run.yml +++ b/tests/subworkflows/test_liftover_run.yml @@ -1,5 +1,5 @@ - name: test input check subworkflow with liftover 38to37 - command: nextflow run main.nf -profile test --only_input --pgs_id PGS000193 --liftover --target_build GRCh37 -c ./tests/config/nextflow.config --hg19_chain https://hgdownload.cse.ucsc.edu/goldenpath/hg19/liftOver/hg19ToHg38.over.chain.gz --hg38_chain https://hgdownload.soe.ucsc.edu/goldenPath/hg38/liftOver/hg38ToHg19.over.chain.gz + command: nextflow run main.nf --only_input --pgs_id PGS000193 --liftover --target_build GRCh37 -c ./tests/config/nextflow.config --hg19_chain https://hgdownload.cse.ucsc.edu/goldenpath/hg19/liftOver/hg19ToHg38.over.chain.gz --hg38_chain https://hgdownload.soe.ucsc.edu/goldenPath/hg38/liftOver/hg38ToHg19.over.chain.gz tags: - liftover - subworkflow @@ -12,7 +12,7 @@ - "pgscatalog_utils: 0.4.0" - name: test input check subworkflow with liftover 37to38 - command: nextflow run main.nf -profile test --only_input --pgs_id PGS001229 --liftover --target_build GRCh38 -c ./tests/config/nextflow.config --hg19_chain https://hgdownload.cse.ucsc.edu/goldenpath/hg19/liftOver/hg19ToHg38.over.chain.gz --hg38_chain https://hgdownload.soe.ucsc.edu/goldenPath/hg38/liftOver/hg38ToHg19.over.chain.gz + command: nextflow run main.nf --only_input --pgs_id PGS001229 --liftover --target_build GRCh38 -c ./tests/config/nextflow.config --hg19_chain https://hgdownload.cse.ucsc.edu/goldenpath/hg19/liftOver/hg19ToHg38.over.chain.gz --hg38_chain https://hgdownload.soe.ucsc.edu/goldenPath/hg38/liftOver/hg38ToHg19.over.chain.gz tags: - liftover - subworkflow diff --git a/tests/subworkflows/test_make_compatible.yml b/tests/subworkflows/test_make_compatible.yml index ebef9a24..caa68411 100644 --- a/tests/subworkflows/test_make_compatible.yml +++ b/tests/subworkflows/test_make_compatible.yml @@ -1,5 +1,5 @@ - name: test make compatible subworkflow with bfile - command: nextflow run main.nf -profile test --input ./assets/examples/samplesheet_bfile.csv --only_compatible -c ./tests/config/nextflow.config + command: nextflow run main.nf --input ./assets/examples/samplesheet_bfile.csv --only_compatible -c ./tests/config/nextflow.config tags: - makecompatible - subworkflow @@ -13,7 +13,7 @@ - path: output/plink2/GRCh37_cineca_22.vmiss.gz - name: test make compatible subworkflow with vcf - command: nextflow run main.nf -profile test --input ./assets/examples/samplesheet_vcf.csv --only_compatible -c ./tests/config/nextflow.config + command: nextflow run main.nf --input ./assets/examples/samplesheet_vcf.csv --only_compatible -c ./tests/config/nextflow.config tags: - makecompatible - subworkflow @@ -27,7 +27,7 @@ - path: output/plink2/GRCh37_vcf_22.vmiss.gz - name: test make compatible subworkflow with pfile - command: nextflow run main.nf -profile test --only_compatible -c ./tests/config/nextflow.config + command: nextflow run main.nf --only_compatible -c ./tests/config/nextflow.config tags: - makecompatible - subworkflow diff --git a/tests/subworkflows/test_match.yml b/tests/subworkflows/test_match.yml index c7ae96ab..3619ddc7 100644 --- a/tests/subworkflows/test_match.yml +++ b/tests/subworkflows/test_match.yml @@ -1,5 +1,5 @@ - name: test match subworkflow - command: nextflow run main.nf -profile test --only_match -c ./tests/config/nextflow.config + command: nextflow run main.nf --only_match -c ./tests/config/nextflow.config tags: - match - subworkflow