-
Notifications
You must be signed in to change notification settings - Fork 836
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
stub and nf-test created for raxmlng #8161
base: master
Are you sure you want to change the base?
Conversation
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.
I know you are just swapping to nf-test, but think this module could do with some improvements.
I think this module should have a meta map. Then we can use meta.id as the default prefix, as normal.
Is the --model
a required argument? As then it should be an input channel; please don't define extra task.ext.foo
values.
Can you make the optional file in the stub (bonus points if you make it conditional on something being passed to args, if that is how it decides to make it.
If you are not comfortable adjusting the module, I can do that for you. |
Oh, and don't forget to remove the pytest files and the entry from the pytest config file. |
And while you are there, you can remove the pytest files and entry for |
@SPPearce
|
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.
You can use a modules_args parameter to pass the bootstrapping option to the args
, to test that directly rather than adding a new extra parameter.
See https://github.com/nf-core/modules/blob/c9c3ef86c1892413b3c86fb38c4e39fd7288512f/modules/nf-core/ataqv/ataqv/tests/main.nf.test for instance.
tuple val(meta), path("*.raxml.bestTree") , emit: phylogeny | ||
tuple val(meta), path("*.raxml.support"), optional:true, emit: phylogeny_bootstrapped | ||
path "versions.yml" , emit: versions |
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.
Can you put the emit: first, then the optional:, so it lines up better.
type: map | ||
description: Groovy Map containing sample information |
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 should still be the previous description and type:
- "*.raxml.support": | ||
type: file | ||
description: A phylogeny in Newick format with bootstrap values | ||
type: map |
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 should still be the previous description and type
Co-authored-by: Simon Pearce <[email protected]>
Co-authored-by: Simon Pearce <[email protected]>
Co-authored-by: Simon Pearce <[email protected]>
Co-authored-by: Simon Pearce <[email protected]>
Co-authored-by: Simon Pearce <[email protected]>
|
||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
raxmlng: \$(echo \$(raxml-ng --version 2>&1) | sed 's/^.*RAxML-NG v. //; s/released.*\$//') | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def args = task.ext.args ?: params.raxmlng_args ?: '' |
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.
def args = task.ext.args ?: params.raxmlng_args ?: '' | |
def args = task.ext.args ?: '' |
if (!meta.id) { | ||
error "Input meta map does not contain 'id'. Received: ${meta}" | ||
} | ||
// Use a dedicated param for stub testing the bootstrap output scenario |
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.
if (!meta.id) { | |
error "Input meta map does not contain 'id'. Received: ${meta}" | |
} | |
// Use a dedicated param for stub testing the bootstrap output scenario |
|
||
stub: | ||
def args = task.ext.args ?: params.raxmlng_args ?: '' | ||
def prefix = task.ext.prefix ?: meta.id |
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.
def prefix = task.ext.prefix ?: meta.id | |
def prefix = task.ext.prefix ?: "${meta.id}" |
PR checklist
Closes #7676
versions.yml
file.label
nf-core modules test <MODULE> --profile docker
nf-core modules test <MODULE> --profile singularity
nf-core modules test <MODULE> --profile conda
nf-core subworkflows test <SUBWORKFLOW> --profile docker
nf-core subworkflows test <SUBWORKFLOW> --profile singularity
nf-core subworkflows test <SUBWORKFLOW> --profile conda