-
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
Kraken2/add module #4703
Kraken2/add module #4703
Conversation
…nto kraken2/add
Files created in output directory:
Error in
|
I'm not sure about the
And then run the |
Thanks, this is helpful to clean the nf-test output. One thing I noticed after this output was cleaner is that
|
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 have a lot of comments here, but it's more structural/design rather than the quality of the module against the guidelines (which is good) .
I also identified the error and the reason why you couldn't build the snapshot (I thnk)
Can chat about this on slack if it doesn't make sense.
modules/nf-core/kraken2/add/main.nf
Outdated
|
||
conda "${moduleDir}/environment.yml" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/mulled-v2-5799ab18b5fc681e75923b2450abaa969907ec98:87fc08d11968d081f3e8a37131c1f1f6715b6542-0' : |
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.
What is in this mulled container exactly, when the conda environment is just kraken2? I wonder if this is also possibly causing the issue with the chown
error message?
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.
Tried a different container:
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/kraken2:2.1.2--pl5321h9f5acd7_2' :
'biocontainers/kraken2:2.1.2--pl5321h9f5acd7_2' }"
But the error persists...
modules/nf-core/kraken2/add/main.nf
Outdated
path taxonomy_names | ||
path taxonomy_nodes | ||
path accession2taxid |
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 we stick with the standalone ADD
module - would this still be necessary? I'm assuming yes, but we need to be careful how this works as these would have to be staged into an existing $prefix/taxonomy
directory, and make sure this doesn't get overwritten on every add
...
Which also leads to the question, what do we do if we want to add multiple FASTAs in one (so path(fasta)
is a list)...? The examples in the kraken2 manual suggest using for loops or find/xargs
combination
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 we stick with the standalone
ADD
module - would this still be necessary? I'm assuming yes, but we need to be careful how this works as these would have to be staged into an existing$prefix/taxonomy
directory, and make sure this doesn't get overwritten on everyadd
...Which also leads to the question, what do we do if we want to add multiple FASTAs in one (so
path(fasta)
is a list)...? The examples in the kraken2 manual suggest using for loops orfind/xargs
combination
That's correct, I forgot to put all those files in the taxonomy directory (db/taxonomy) as expected by kraken2.
file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) | ||
] | ||
input[1] = file(params.test_data['sarscov2']['metagenome']['prot_names_dmp'], checkIfExists: true) | ||
input[2] = file(params.test_data['sarscov2']['metagenome']['prot_nodes_dmp'], checkIfExists: true) |
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.
Does this really work with protein accessions!?
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.
Does this really work with protein accessions!?
It should work , there is protein flag:
--protein Build a protein database for translated search
Kraken2: Translated search: "either along with --standard, or with all steps if building a custom database"
Co-authored-by: James A. Fellows Yates <[email protected]>
Co-authored-by: James A. Fellows Yates <[email protected]>
Co-authored-by: James A. Fellows Yates <[email protected]>
So you mean it works manually in the docker image with the original?! |
Yes. The only problem is that the permissions of the output files are changed to
Generates the output files but the permissions are changed as well:
Important: this is only when running the test with Docker, I have not checked Singularity or Conda. |
I built a mulled container that works with the module 🎉 I just need to request the official one :), and then you can go about fighting nf-test (the output isn't stable 😅 )
|
@alxndrdiaz there you go! Singularity will come tomorrow I guess. in the meantime (if you have time) can you:
|
@jfy133 [2] One (dummy) solution is to ignore the output directory (this makes the Docker test to work) in the
[1] Tried to use to pass multiple FASTA files but still need to find out how to pass a
|
This is how the
|
I should have got the (1) parallle adding now; so I think we can go back to making (2) properly :) |
These assertions only check [1] if the process is run successfully, [2] an output test directory is created, [3] versions file.
Trying to use
|
I tweaked the tests slightly to make them more explicit, but I think we are there!!! |
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.
Some very minor suggestions and formatting things.
The nf-tests assertions look pants, as promised, but I've been reassured by @jfy133 all output files have ever-changing nonsensical names, so I am gonna give this a green light.
Co-authored-by: Thiseas C. Lamnidis <[email protected]>
* first commit * arrange inputs * nf-test template * fix test_data directories * fix inputs * updated test * added tag:untar * first commit * arrange inputs * nf-test template * fix test_data directories * fix inputs * updated test * added tag:untar * remove whitespace * Update modules/nf-core/kraken2/add/main.nf Co-authored-by: James A. Fellows Yates <[email protected]> * Update modules/nf-core/kraken2/add/main.nf Co-authored-by: James A. Fellows Yates <[email protected]> * move taxonomy files * Update modules/nf-core/kraken2/add/main.nf Co-authored-by: James A. Fellows Yates <[email protected]> * Update modules/nf-core/kraken2/add/meta.yml Co-authored-by: James A. Fellows Yates <[email protected]> * use gzip instead of untar * use stageAs for taxonomy file * run test with --update flag * Add working container (singularity to come later) * remove output directory assertions * Add parallelisation * check test output directory * check versions nf-test * Improve tests * Fix singularity path * Apply suggestions from code review Co-authored-by: Thiseas C. Lamnidis <[email protected]> --------- Co-authored-by: James A. Fellows Yates <[email protected]> Co-authored-by: Thiseas C. Lamnidis <[email protected]>
* first commit * arrange inputs * nf-test template * fix test_data directories * fix inputs * updated test * added tag:untar * first commit * arrange inputs * nf-test template * fix test_data directories * fix inputs * updated test * added tag:untar * remove whitespace * Update modules/nf-core/kraken2/add/main.nf Co-authored-by: James A. Fellows Yates <[email protected]> * Update modules/nf-core/kraken2/add/main.nf Co-authored-by: James A. Fellows Yates <[email protected]> * move taxonomy files * Update modules/nf-core/kraken2/add/main.nf Co-authored-by: James A. Fellows Yates <[email protected]> * Update modules/nf-core/kraken2/add/meta.yml Co-authored-by: James A. Fellows Yates <[email protected]> * use gzip instead of untar * use stageAs for taxonomy file * run test with --update flag * Add working container (singularity to come later) * remove output directory assertions * Add parallelisation * check test output directory * check versions nf-test * Improve tests * Fix singularity path * Apply suggestions from code review Co-authored-by: Thiseas C. Lamnidis <[email protected]> --------- Co-authored-by: James A. Fellows Yates <[email protected]> Co-authored-by: Thiseas C. Lamnidis <[email protected]>
PR checklist
Closes #2953
versions.yml
file.label
PROFILE=docker pytest --tag <MODULE> --symlink --keep-workflow-wd --git-aware
PROFILE=singularity pytest --tag <MODULE> --symlink --keep-workflow-wd --git-aware
PROFILE=conda pytest --tag <MODULE> --symlink --keep-workflow-wd --git-aware