Skip to content

Conversation

@Ethan-Hetrick
Copy link

@Ethan-Hetrick Ethan-Hetrick commented Dec 17, 2025

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.cpus to ensure proper multi-threading

  • Made 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.yml file.

  • Follow the naming conventions.

  • Follow the parameters requirements.

  • Follow the input/output options guidelines.

  • Add a resource label

  • Use 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:

    • For modules:
      • nf-core modules test <MODULE> --profile docker
      • nf-core modules test <MODULE> --profile singularity
      • nf-core modules test <MODULE> --profile conda
    • For subworkflows:
      • nf-core subworkflows test <SUBWORKFLOW> --profile docker
      • nf-core subworkflows test <SUBWORKFLOW> --profile singularity
      • nf-core subworkflows test <SUBWORKFLOW> --profile conda

Copy link
Contributor

@vagkaratzas vagkaratzas left a 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.

Copy link
Contributor

@vagkaratzas vagkaratzas left a 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.

Copy link
Contributor

@vagkaratzas vagkaratzas left a 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.

Comment on lines 3 to 8
name "Test Process FASTANI"
tag "modules_nfcore"
tag "modules"
tag "fastani"
script "../main.nf"
process "FASTANI"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
process "FASTANI"
name "Test Process FASTANI"
tag "modules_nfcore"
tag "modules"
tag "fastani"
script "../main.nf"
process "FASTANI"

"versions_fastani": [
[
"FASTANI",
"fastani",
Copy link
Contributor

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
Copy link
Contributor

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()
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants