-
Notifications
You must be signed in to change notification settings - Fork 735
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
New kma module #7251
base: master
Are you sure you want to change the base?
New kma module #7251
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.
Looks very good already. You are missing the snapshot. Can you run
nf-core modules test kma/kma
and push the .snap file?
modules/nf-core/kma/kma/main.nf
Outdated
tuple val(meta), path("*.res"), optional: true, emit: res | ||
tuple val(meta), path("*.fsa"), optional: true, emit: fsa | ||
tuple val(meta), path("*.aln"), optional: true, emit: aln | ||
tuple val(meta), path("*.frag.gz"), optional: true, emit: frag | ||
tuple val(meta), path("*.mat.gz"), optional: true, emit: mat // if mat_format == true | ||
tuple val(meta), path("*.spa"), optional: true, emit: spa // if ext.args contains '-Sparse' (only output in this case) |
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.
why are all of them marked as optional?
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 is because of the tool's -Sparse
option. {aln, res, frag, fsa} are returned in default mode. If the -Sparse
option is used then only {spa} is returned. {mat} is in any of the former cases another optional output.
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.
ok then we can leave it like that :) but the stub needs to reflect that then (there you can check what is handed to the module and only create the file that you would expect)
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.
it seems you follow the Harshil Alignment style. If yes, you should align the commas not the word optional
: Comma Example
} | ||
} | ||
|
||
/* |
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.
/* |
*/ | ||
|
||
/* |
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.
*/ | |
/* | |
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 update this to adhere to https://nf-co.re/docs/guidelines/components/modules#configuration-of-extargs-in-tests :)
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 is super helpful! Thanks for the pointer! 👍
Thanks for reviewing! nf-test is still WIP. In fact, I need my KMA_INDEX module merged to nf-core first in order to test the KMA_KMA module because I'd like to avoid pushing tool-specific testdata to nf-core. I am aiming for a nf-test similar to |
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.
one stylistic hint and a question about the module folder structure
modules/nf-core/kma/kma/main.nf
Outdated
tuple val(meta), path("*.res"), optional: true, emit: res | ||
tuple val(meta), path("*.fsa"), optional: true, emit: fsa | ||
tuple val(meta), path("*.aln"), optional: true, emit: aln | ||
tuple val(meta), path("*.frag.gz"), optional: true, emit: frag | ||
tuple val(meta), path("*.mat.gz"), optional: true, emit: mat // if mat_format == true | ||
tuple val(meta), path("*.spa"), optional: true, emit: spa // if ext.args contains '-Sparse' (only output in this case) |
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.
it seems you follow the Harshil Alignment style. If yes, you should align the commas not the word optional
: Comma Example
Thanks @mazzalab , good catch about the Harshil Alignment style. Even though it hurts my eyes 😉 I'll adhere to the style with the next fix. |
PR checklist
Closes PR #7242
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