Skip to content
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

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

New kma module #7251

wants to merge 17 commits into from

Conversation

Krannich479
Copy link
Contributor

PR checklist

Closes PR #7242

  • 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

@Krannich479 Krannich479 added the new module Adding a new module label Dec 19, 2024
@Krannich479 Krannich479 self-assigned this Dec 19, 2024
@Krannich479 Krannich479 added the WIP Work in progress label Dec 19, 2024
Copy link
Contributor

@famosab famosab left a 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?

Comment on lines 17 to 22
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)
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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)

Copy link
Contributor

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

}
}

/*
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
/*

Comment on lines 56 to 58
*/

/*
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
*/
/*

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

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! 👍

@Krannich479
Copy link
Contributor Author

Looks very good already. You are missing the snapshot. Can you run nf-core modules test kma/kma and push the .snap file?

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 bwa mem, like this.

Copy link
Contributor

@mazzalab mazzalab left a 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

Comment on lines 17 to 22
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)
Copy link
Contributor

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

modules/nf-core/kma/kma/tests/main.nf.test Show resolved Hide resolved
@Krannich479
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new module Adding a new module WIP Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants