-
Notifications
You must be signed in to change notification settings - Fork 955
nf-test migration: plink/indeppairwise #8133
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
Merged
maxulysse
merged 10 commits into
nf-core:master
from
mantisps:plink/indeppairwise_nftest
Apr 9, 2025
Merged
Changes from 4 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0182e4f
Migrated pytest to nf-test for `plink/indeppairwise` module & added s…
mantisps f390711
Merge remote-tracking branch 'upstream/master' into plink/indeppairwi…
mantisps 4285c34
Update modules/nf-core/plink/indeppairwise/tests/main.nf.test
mantisps aa56d08
Merge branch 'master' into plink/indeppairwise_nftest
mantisps b4a7a6d
Merge branch 'master' into plink/indeppairwise_nftest
maxulysse ffb0312
Fixed nf-test based on PR comments.
mantisps 3dd4455
Restored `.pre-commit-config.yaml` to original state.
mantisps a71e8ce
Merge branch 'master' into plink/indeppairwise_nftest
mantisps 931ae12
Update modules/nf-core/plink/indeppairwise/main.nf
mantisps d0961d9
Merge branch 'master' into plink/indeppairwise_nftest
mantisps File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,13 +9,13 @@ repos: | |
| types: [yaml] | ||
| additional_dependencies: ["ruamel.yaml"] | ||
| - repo: https://github.com/pre-commit/mirrors-prettier | ||
| rev: "v3.1.0" | ||
| rev: "v4.0.0-alpha.8" | ||
mantisps marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| hooks: | ||
| - id: prettier | ||
| additional_dependencies: | ||
| - [email protected] | ||
| - repo: https://github.com/python-jsonschema/check-jsonschema | ||
| rev: 0.29.4 | ||
| rev: 0.32.1 | ||
| hooks: | ||
| - id: check-jsonschema | ||
| name: "Match meta.ymls in one of the subdirectories of modules/nf-core" | ||
|
|
@@ -36,20 +36,20 @@ repos: | |
|
|
||
| # use ruff for python files | ||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: v0.7.3 | ||
| rev: v0.11.2 | ||
| hooks: | ||
| - id: ruff | ||
| files: \.py$ | ||
| args: [--fix, --exit-non-zero-on-fix, "--select", "I,E1,E4,E7,E9,F,UP,N"] # sort imports and fix (rules taken from nf-core/tools) | ||
| - id: ruff-format # formatter | ||
| - repo: https://github.com/editorconfig-checker/editorconfig-checker.python | ||
| rev: "3.0.3" | ||
| rev: "3.2.0" | ||
| hooks: | ||
| - id: editorconfig-checker | ||
| alias: ec | ||
| # NOTE This runs with Docker instead of the binary. Hoping anyone messing with Dockerfiles has Docker installed | ||
| - repo: https://github.com/hadolint/hadolint | ||
| rev: v2.12.0 | ||
| rev: v2.13.1-beta | ||
| hooks: | ||
| - id: hadolint-docker | ||
| - repo: https://github.com/nf-core/tools | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| nextflow_process { | ||
|
|
||
| name "Test Process PLINK_INDEPPAIRWISE" | ||
| script "../main.nf" | ||
| process "PLINK_INDEPPAIRWISE" | ||
|
|
||
| tag "modules" | ||
| tag "modules_nfcore" | ||
| tag "plink" | ||
| tag "plink/indeppairwise" | ||
| tag "plink/vcf" | ||
|
|
||
| test("test_plink_indeppairwise") { | ||
|
|
||
| config "./nextflow.config" | ||
|
|
||
| setup { | ||
|
|
||
| params.module_args = '--make-bed --biallelic-only strict --vcf-half-call haploid --allow-extra-chr' | ||
|
|
||
mantisps marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| run("PLINK_VCF") { | ||
| script "../../vcf/main.nf" | ||
|
|
||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [id:'test',single_end:false],// meta map | ||
| file("https://github.com/nf-core/test-datasets/raw/modules/data/genomics/homo_sapiens/genome/vcf/ped/justhusky_minimal.vcf.gz", checkIfExists:true) | ||
mantisps marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ] | ||
| """ | ||
| } | ||
| } | ||
| } | ||
| when { | ||
| process { | ||
| """ | ||
| input[0] = PLINK_VCF.out.bed.join(PLINK_VCF.out.bim).join(PLINK_VCF.out.fam) | ||
| input[1] = Channel.value(50) | ||
| input[2] = Channel.value(5) | ||
| input[3] = Channel.value(0.2) | ||
| """ | ||
| } | ||
| } | ||
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| { assert snapshot(process.out).match() } | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| test("test_plink_indeppairwise - stub") { | ||
|
|
||
| options "-stub" | ||
|
|
||
| when { | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [ id:'test', single_end:false ], // meta map | ||
| file("test.bed"), | ||
| file("test.bim"), | ||
| file("test.fam") | ||
mantisps marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ] | ||
| input[1] = Channel.value(50) | ||
| input[2] = Channel.value(5) | ||
| input[3] = Channel.value(0.2) | ||
| """ | ||
| } | ||
| } | ||
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| { assert snapshot(process.out).match() } | ||
| ) | ||
| } | ||
| } | ||
| } | ||
96 changes: 96 additions & 0 deletions
96
modules/nf-core/plink/indeppairwise/tests/main.nf.test.snap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| { | ||
| "test_plink_indeppairwise": { | ||
| "content": [ | ||
| { | ||
| "0": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test.prune.in:md5,dce7ba75405107468f2ce18fc95a9786" | ||
| ] | ||
| ], | ||
| "1": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test.prune.out:md5,1f65f71308f2c4a03b9a4a98bbfb11e9" | ||
| ] | ||
| ], | ||
| "2": [ | ||
| "versions.yml:md5,dd52fb8375a5ba36e766f25e9028d128" | ||
| ], | ||
| "prunein": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test.prune.in:md5,dce7ba75405107468f2ce18fc95a9786" | ||
| ] | ||
| ], | ||
| "pruneout": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test.prune.out:md5,1f65f71308f2c4a03b9a4a98bbfb11e9" | ||
| ] | ||
| ], | ||
| "versions": [ | ||
| "versions.yml:md5,dd52fb8375a5ba36e766f25e9028d128" | ||
| ] | ||
| } | ||
| ], | ||
| "meta": { | ||
| "nf-test": "0.9.2", | ||
| "nextflow": "24.10.5" | ||
| }, | ||
| "timestamp": "2025-03-26T14:55:08.717872783" | ||
| }, | ||
| "test_plink_indeppairwise - stub": { | ||
| "content": [ | ||
| { | ||
| "0": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test.prune.in:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "1": [ | ||
|
|
||
| ], | ||
| "2": [ | ||
| "versions.yml:md5,dd52fb8375a5ba36e766f25e9028d128" | ||
| ], | ||
| "prunein": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test.prune.in:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "pruneout": [ | ||
|
|
||
| ], | ||
| "versions": [ | ||
| "versions.yml:md5,dd52fb8375a5ba36e766f25e9028d128" | ||
| ] | ||
| } | ||
| ], | ||
| "meta": { | ||
| "nf-test": "0.9.2", | ||
| "nextflow": "24.10.5" | ||
| }, | ||
| "timestamp": "2025-03-26T15:26:32.033778403" | ||
| } | ||
| } |
mantisps marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| process { | ||
| withName: "PLINK_VCF" { | ||
| ext.args = params.module_args | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.