-
Notifications
You must be signed in to change notification settings - Fork 953
Fix fastANI module #9583
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
base: master
Are you sure you want to change the base?
Fix fastANI module #9583
Conversation
…le staging, added task.cpus to thread arg, created process stub, added optional tool outputs, and formatted input channels
vagkaratzas
left a comment
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.
Valiant first effort, but will require some more updates.
Co-authored-by: Evangelos Karatzas <[email protected]>
Co-authored-by: Evangelos Karatzas <[email protected]>
Co-authored-by: Evangelos Karatzas <[email protected]>
Co-authored-by: Evangelos Karatzas <[email protected]>
vagkaratzas
left a comment
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.
Hey! Nice, it starts to be more clear! Some more comments for additions.
Modified outputs to be named based on first prefix Co-authored-by: Evangelos Karatzas <[email protected]>
vagkaratzas
left a comment
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 that some of the tests are failing. Try to fix linting errors locally before pushing, with the command nf-core modules lint fastani, and also use the pre-commit command when you have staged your files, before git commit.
Some output files from the tests are changing, so you will need a bit more sophisticated checks than just workflow.out.ani, since for example the all.txt file is changing during tests for tag "'sarscov2 - referece vs contigs - fastANI - all vs all mode'". Something like counting number of lines. Take other existing modules nf-tests as an example.
| name "Test Process FASTANI" | ||
| tag "modules_nfcore" | ||
| tag "modules" | ||
| tag "fastani" | ||
| script "../main.nf" | ||
| process "FASTANI" |
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.
| process "FASTANI" | |
| name "Test Process FASTANI" | |
| tag "modules_nfcore" | |
| tag "modules" | |
| tag "fastani" | |
| script "../main.nf" | |
| process "FASTANI" |
| "versions_fastani": [ | ||
| [ | ||
| "FASTANI", | ||
| "fastani", |
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.
versions are not captured properly; it should be showing the version number here
| tuple val(meta), path("*.txt") , emit: ani | ||
| tuple val(meta), path("*.visual"), optional:true, emit: visual | ||
| tuple val(meta), path("*.matrix"), optional:true, emit: matrix | ||
| tuple val("${task.process}"), val("fastani"), eval('fastANI --version'), topic: versions, emit: versions_fastani |
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'll need to add the old 2>&1 | sed 's/version//; somehow on the eval command to properly capture the verison. See other modules for reference such as jsaminesv
| def ql_file = new File(workDir.toString(), 'query.list') | ||
| def rl_file = new File(workDir.toString(), 'reference.list') | ||
| ql_file.text = q_stage.getAbsolutePath() + System.lineSeparator() |
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.
But isnt ql_file.text now only contain the copied file q_stage path? What about the original q_src file? For many-to-many, it should include both.
Same for the reference text file below
PR checklist
Fixes several issues with the fastANI module:
Replaced custom meta field for module flow control with standard meta.id fields and logic
Added
--threads $task.cpusto ensure proper multi-threadingMade output file names descriptive
Added stub block
Added optional outputs
This comment contains a description of changes (with reason).
If you've fixed a bug or added code that should be tested, add tests!
If you've added a new tool - have you followed the module conventions in the contribution docs
If necessary, include test data in your PR.
Remove all TODO statements.
Emit the
versions.ymlfile.Follow the naming conventions.
Follow the parameters requirements.
Follow the input/output options guidelines.
Add a resource
labelUse BioConda and BioContainers if possible to fulfil software requirements.
Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
nf-core modules test <MODULE> --profile dockernf-core modules test <MODULE> --profile singularitynf-core modules test <MODULE> --profile condanf-core subworkflows test <SUBWORKFLOW> --profile dockernf-core subworkflows test <SUBWORKFLOW> --profile singularitynf-core subworkflows test <SUBWORKFLOW> --profile conda