-
Notifications
You must be signed in to change notification settings - Fork 753
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
Added nf-test for cnvpytor/partition #6513
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ process CNVPYTOR_PARTITION { | |
|
||
conda "${moduleDir}/environment.yml" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/cnvpytor:1.2.1--pyhdfd78af_0': | ||
'biocontainers/cnvpytor:1.2.1--pyhdfd78af_0' }" | ||
'https://depot.galaxyproject.org/singularity/cnvpytor:1.3.1--pyhdfd78af_1': | ||
'biocontainers/cnvpytor:1.3.1--pyhdfd78af_1' }" | ||
|
||
input: | ||
tuple val(meta), path(pytor) | ||
|
@@ -19,15 +19,15 @@ process CNVPYTOR_PARTITION { | |
task.ext.when == null || task.ext.when | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No args here either. |
||
script: | ||
def bins = bin_sizes ?: '1000' | ||
def bins = bin_sizes ? "-partition $bin_sizes" : '-partition 1000' | ||
""" | ||
cnvpytor \\ | ||
-root $pytor \\ | ||
-partition $bins | ||
$bins | ||
|
||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' ) | ||
cnvpytor: \$(cnvpytor --version | sed -n 's/.*CNVpytor \\(.*\\)/\\1/p') | ||
END_VERSIONS | ||
""" | ||
|
||
|
@@ -37,7 +37,7 @@ process CNVPYTOR_PARTITION { | |
|
||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' ) | ||
cnvpytor: \$(cnvpytor --version | sed -n 's/.*CNVpytor \\(.*\\)/\\1/p') | ||
END_VERSIONS | ||
""" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
|
||
nextflow_process { | ||
|
||
name "Test Process CNVPYTOR_PARTITION" | ||
script "../main.nf" | ||
process "CNVPYTOR_PARTITION" | ||
config "./nextflow.config" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "cnvpytor" | ||
tag "cnvpytor/partition" | ||
|
||
test("test-cnvpytor-partition") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test'], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/pytor/test.pytor', checkIfExists: true) | ||
] | ||
input[1] = [] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Think we need a test checking that this works, given that it didn't previously. |
||
|
||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
} | ||
|
||
test("test-cnvpytor-partition-stub") { | ||
options '-stub' | ||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test'], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/pytor/test.pytor', checkIfExists: true) | ||
] | ||
input[1] = [] | ||
|
||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ | ||
"test-cnvpytor-partition-stub": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.pytor:md5,aa03a8fa15b39f77816705a48e10312a" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,fbe0931ab8560ef17d80c37c10e9d466" | ||
], | ||
"pytor": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.pytor:md5,aa03a8fa15b39f77816705a48e10312a" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,fbe0931ab8560ef17d80c37c10e9d466" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.0", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-09-02T11:10:57.073678" | ||
}, | ||
"test-cnvpytor-partition": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.pytor:md5,aa03a8fa15b39f77816705a48e10312a" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,fbe0931ab8560ef17d80c37c10e9d466" | ||
], | ||
"pytor": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.pytor:md5,aa03a8fa15b39f77816705a48e10312a" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,fbe0931ab8560ef17d80c37c10e9d466" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.0", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-09-02T11:09:54.629869" | ||
} | ||
} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't think this is doing anything as args is missing, and suspect it should be in the value channel anyway. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
process { | ||
withName: CNVPYTOR_PARTITION { | ||
ext.args = '10000 100000' | ||
} | ||
} |
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has no args.