Skip to content

Commit

Permalink
v2.0.0-alpha.1 (#153)
Browse files Browse the repository at this point in the history
* fix test profile

* change standard test to pull workflow with -r ${GITHUB_REF}

* fix standard test

* use local data for pytest

* fix nextflow -r ${branch name}

* oops

* change report tag dev -> 2.0

* update changelog
  • Loading branch information
nebfield authored Aug 11, 2023
1 parent 3b7ebcc commit 28a0971
Show file tree
Hide file tree
Showing 20 changed files with 66 additions and 46 deletions.
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
}
11 changes: 10 additions & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,17 @@ will only occur in major versions with changes noted in this changelog.

.. _`semantic versioning`: https://semver.org/

pgsc_calc v2.0.0-alpha.1 (2023-08-11)
-------------------------------------

This patch fixes a bug when running the workflow directly from github with the
test profile (i.e. without cloning first). Thanks to `@staedlern`_ for reporting the
problem.

.. _`@staedlern`: https://github.com/PGScatalog/pgsc_calc/issues/151

pgsc_calc v2.0.0-alpha (2023-08-08)
-----------------------------
-----------------------------------

This major release features breaking changes to samplesheet structure to provide
more flexible support for extra genomic file types in the future. Two major new
Expand Down
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

0 comments on commit 28a0971

Please sign in to comment.