Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.0.0-alpha.1 #153

Merged
merged 8 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions .github/workflows/standard-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ jobs:
nxf_ver: ['22.10.0', 'latest']

steps:
- name: Check out pipeline code
uses: actions/checkout@v3

- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch

- uses: nf-core/setup-nextflow@v1
with:
version: ${{ matrix.nxf_ver }}
Expand All @@ -49,7 +51,7 @@ jobs:

- name: Run pipeline with test data
run: |
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.test_profile}},${{ matrix.profile }}
nextflow run pgscatalog/pgsc_calc -r ${{ steps.extract_branch.outputs.branch }} -profile ${{ matrix.test_profile}},${{ matrix.profile }}

singularity:
if: ${{ inputs.singularity }}
Expand All @@ -62,9 +64,11 @@ jobs:
nxf_ver: ['22.10.0', 'latest']

steps:
- name: Check out pipeline code
uses: actions/checkout@v3

- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch

- uses: nf-core/setup-nextflow@v1
with:
version: ${{ matrix.nxf_ver }}
Expand All @@ -90,4 +94,4 @@ jobs:

- name: Run pipeline with test data
run: |
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.test_profile}},${{ matrix.profile }}
nextflow run pgscatalog/pgsc_calc -r ${{ steps.extract_branch.outputs.branch }} -profile ${{ matrix.test_profile}},${{ matrix.profile }}
4 changes: 2 additions & 2 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ process {
withLabel: report {
ext.conda = "$projectDir/environments/report/environment.yml"
ext.singularity = 'oras://dockerhub.ebi.ac.uk/gdp-public/pgsc_calc/singularity/report'
ext.singularity_version = ':dev'
ext.singularity_version = ':2.0'
ext.docker = 'dockerhub.ebi.ac.uk/gdp-public/pgsc_calc/report'
ext.docker_version = ':dev'
ext.docker_version = ':2.0'
}

withLabel: pyyaml {
Expand Down
10 changes: 7 additions & 3 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ params {
max_memory = '6.GB'
max_time = '6.h'

input = "$projectDir/assets/examples/samplesheet.csv"
scorefile = "$projectDir/assets/examples/scorefiles/PGS001229_22.txt"
input = "https://gitlab.ebi.ac.uk/nebfield/test-datasets/-/raw/master/pgsc_calc/input_v2.json"
format = "json"
scorefile = "https://gitlab.ebi.ac.uk/nebfield/test-datasets/-/raw/master/pgsc_calc/PGS001229_22.txt"

// TODO: fix local tests with CSV
// input = "$projectDir/assets/examples/samplesheet.csv"
// scorefile = "$projectDir/assets/examples/scorefiles/PGS001229_22.txt"
outdir = "$projectDir/results"
target_build = "GRCh37"
skip_ancestry = true
}
1 change: 0 additions & 1 deletion conf/test_json.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ params {
scorefile = "https://gitlab.ebi.ac.uk/nebfield/test-datasets/-/raw/master/pgsc_calc/PGS001229_22.txt"
outdir = "$projectDir/results"
target_build = "GRCh37"
skip_ancestry = true
}
3 changes: 2 additions & 1 deletion tests/ancestry/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
--target_build GRCh38 \
--pgs_id PGS001229 \
--min_overlap 0.50 \
--target_build GRCh38
--target_build GRCh38 \
--scorefile false
"
tags:
- ancestry
Expand Down
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
Loading