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 module: fastme #4920

Merged
merged 12 commits into from
Feb 15, 2024
Merged

New module: fastme #4920

merged 12 commits into from
Feb 15, 2024

Conversation

itrujnara
Copy link
Contributor

PR checklist

Closes #4889

  • Added fastme. This will allow pipelines to use efficient minimum evolution phylogeny wherever desired.
  • 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. Note: existing test data was used.
  • 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:
    • 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
      Note: Conda test was not run locally due to a conda issue seemingly independent of the module (exit code 143, terminated by the system).

@itrujnara itrujnara requested a review from a team as a code owner February 15, 2024 10:06
@itrujnara itrujnara requested review from leoisl and removed request for a team February 15, 2024 10:06
@itrujnara itrujnara changed the title Fastme New module: fastme Feb 15, 2024
Copy link
Contributor

@lrauschning lrauschning left a comment

Choose a reason for hiding this comment

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

Looks good to me, just needs some of the optional outputs of fastme.
Nicely done!


input:
path infile
path topo
Copy link
Contributor

Choose a reason for hiding this comment

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

Thinks this is referring to an initial tree topology to use? Might be nice to give it a more descriptive name, something like initial_tree or the likes.


output:
path "*.nwk" , emit: nwk
path "*_stat.txt" , emit: stats
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be good to add optional output channels at least for the more commonly used optional outputs, in particular the bootstrap supports.

keywords:
- phylogenetics
- newick
- minimum evolution
Copy link
Contributor

Choose a reason for hiding this comment

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

I think keywords should have no spaces, could just be replaced with an underscore.

Copy link
Contributor

@lrauschning lrauschning left a comment

Choose a reason for hiding this comment

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

Implementation of the optional outputs looks good, it should just be included into the stubs.
Also I think the test covering it looks a little weird with the call to snapshot that isn't doing anything.


}

test("setoxin - phylip - with_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.

Just a small thing, I would rename this to bootstrap since that is what it's testing

Comment on lines 122 to 124
{ assert snapshot(process.out.nwk) },
{ assert snapshot(process.out.matrix) },
{ assert snapshot(process.out.bootstrap) }
Copy link
Contributor

Choose a reason for hiding this comment

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

As I understand, the bootstrap result is not deterministic so should not be snapshotted, and without calling .match() it shouldn't even generate a snapshot I don't think.
I suggest just checking for the files manually, or snapshot-matching the list of files in the output dir.

Comment on lines +44 to +51
- matrix:
type: file
description: Optional; the distance matrix in Phylip matrix format; it is generated if the -O option is passed in ext.args, although the provided file name will be overwritten
pattern: "*.matrix.phy"
- bootstrap:
type: file
description: A file containing all bootstrap trees in Newick format; it is generated if the -B option is passed in ext.args (and bootstrap is used), although the provided file name will be overwritten
pattern: "*.bootstrap"
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

Comment on lines 48 to 52
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: infile
"""
touch ${prefix}.nwk
touch ${prefix}_stat.txt
Copy link
Contributor

Choose a reason for hiding this comment

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

As a pipeline may rely on the optional output of -B, the stub should also generate these if the argument is passed.

@lrauschning lrauschning added this pull request to the merge queue Feb 15, 2024
@lrauschning
Copy link
Contributor

Looks good, merging!

Merged via the queue into nf-core:master with commit d314037 Feb 15, 2024
11 checks passed
@itrujnara itrujnara deleted the fastme branch February 15, 2024 17:37
jch-13 pushed a commit to jch-13/modules that referenced this pull request Mar 19, 2024
* Added main, started creating tests

* Fixed tests

* Fixed tests again

* Fixed tests, completed meta.yml

* Minor lint issue fix

* Fix typo

* Renamed initial tree argument, added optional outputs and the associated test

* Removed a space in meta.yml

* Added optional outputs to stub, changed bootstrap test

---------

Co-authored-by: Leon Rauschning <[email protected]>
jennylsmith pushed a commit to RSC-RP/modules that referenced this pull request Mar 20, 2024
* Added main, started creating tests

* Fixed tests

* Fixed tests again

* Fixed tests, completed meta.yml

* Minor lint issue fix

* Fix typo

* Renamed initial tree argument, added optional outputs and the associated test

* Removed a space in meta.yml

* Added optional outputs to stub, changed bootstrap test

---------

Co-authored-by: Leon Rauschning <[email protected]>
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.

new module: fastme
2 participants