Skip to content

Commit

Permalink
use local data for pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
nebfield committed Aug 11, 2023
1 parent 9787bf0 commit f10044a
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 30 deletions.
2 changes: 1 addition & 1 deletion tests/config/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
5 changes: 5 additions & 0 deletions tests/config/test_data.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
params {
input = "$projectDir/assets/examples/samplesheet.csv"
scorefile = "$projectDir/assets/examples/scorefiles/PGS001229_22.txt"
target_build = "GRCh37"
}
2 changes: 1 addition & 1 deletion tests/modules/combine/test.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions tests/modules/download/test.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -27,15 +27,15 @@
- "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
- fast
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
Expand Down
4 changes: 2 additions & 2 deletions tests/modules/match/test.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/modules/plink2/relabelbim/test.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 2 additions & 3 deletions tests/modules/plink2/relabelpvar/test.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"
10 changes: 5 additions & 5 deletions tests/modules/plink2/score/test.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/modules/plink2/vcf/test.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 2 additions & 3 deletions tests/subworkflows/test_apply_score.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions tests/subworkflows/test_input_subworkflow.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/subworkflows/test_liftover_run.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions tests/subworkflows/test_make_compatible.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/subworkflows/test_match.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit f10044a

Please sign in to comment.