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

add mtmalign #4339

Merged
merged 29 commits into from
Dec 14, 2023
Merged

add mtmalign #4339

merged 29 commits into from
Dec 14, 2023

Conversation

lrauschning
Copy link
Contributor

This PR adds a module for the structural aligner mTM-align, for use in the multiplesequencealignment pipeline.

PR checklist

  • If you've added a new tool - have you followed the module conventions in the contribution docs
  • 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

@lrauschning lrauschning requested a review from a team as a code owner November 15, 2023 15:24
@lrauschning lrauschning requested review from adamrtalbot and removed request for a team November 15, 2023 15:24
Copy link
Contributor

@luisas luisas left a comment

Choose a reason for hiding this comment

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

Super nice Leon!!

I just added a couple of comments - mainly it comes down to allowing the user to use the prefix to change the name of the output file :)


output:
tuple val(meta), path("./mTM_result/result.fasta") , emit: alignment
tuple val(meta), path("./mTM_result/result.pdb") , emit: structure
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
tuple val(meta), path("./mTM_result/result.pdb") , emit: structure
tuple val(meta), path("./mTM_result/*.pdb") , emit: structure

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think this would work – as the inputs are also pdb files, it would also return the input structures.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(mtmalign copies the input structures into the results directory)

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can then move that file into ${prefix}.pdb ?

I think it's important to have the possibility ti have the output files named correctly

tag "$meta.id"
label 'process_medium'

conda "bioconda::mtm-align=20220104"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also update it to this?

conda "${moduleDir}/environment.yml"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

true, we should – I'm not sure its documented anywhere, but it is apparently now the preferred way to have conda envs.

Copy link
Member

@JoseEspinosa JoseEspinosa left a comment

Choose a reason for hiding this comment

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

LGTM! Please fix test and address @luisas's comment and it will be ready to merge.

Comment on lines 29 to 30
mv ./mTM_result/result.fasta ${prefix}.aln
mv ./mTM_result/result.pdb ${prefix}.pdb
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
mv ./mTM_result/result.fasta ${prefix}.aln
mv ./mTM_result/result.pdb ${prefix}.pdb
mv ./mTM_result/result.fasta ${prefix}.aln
mv ./mTM_result/result.pdb ${prefix}.pdb

@lrauschning
Copy link
Contributor Author

Anybody know what's up with the linting there?

Conflicting process name between environment.yml (mtmalign/align) and meta.yml (mtmalign/align)

seems a bit weird to me.
In the clustalo module, how it was at 0d1bbc0 works (cmp https://github.com/nf-core/modules/blob/master/modules/nf-core/clustalo/align/environment.yml)

@luisas
Copy link
Contributor

luisas commented Dec 13, 2023

Anybody know what's up with the linting there?

Conflicting process name between environment.yml (mtmalign/align) and meta.yml (mtmalign/align)

seems a bit weird to me. In the clustalo module, how it was at 0d1bbc0 works (cmp https://github.com/nf-core/modules/blob/master/modules/nf-core/clustalo/align/environment.yml)

You can see here how the tags are supposed to be - i made a couple of suggestions that should fix it https://github.com/search?q=repo%3Anf-core%2Fmodules%20clustalo&type=code

Copy link
Contributor

@luisas luisas left a comment

Choose a reason for hiding this comment

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

This should solve the test error :)

@lrauschning lrauschning added this pull request to the merge queue Dec 14, 2023
Merged via the queue into nf-core:master with commit e09a91f Dec 14, 2023
@lrauschning lrauschning deleted the mtmalign branch December 14, 2023 10:49
lrauschning added a commit to lrauschning/modules that referenced this pull request Dec 21, 2023
* commit mtmalign module

* comment & add input name

* mtmalign test

* Revert "mtmalign test"

Use nf-test instead

This reverts commit 1854bd9.

* add nf-tests

* fix script path

* forgot to delete line from template

* removed unnecessary vars

* mess around with tests, still not fully working

* make licence array instead of string

* now runs the nftest

* changed tags

* now calling untar correctly

* added snapshot

* fix conflicting name

* check fasta instead of snapshot

* Apply suggestions from code review

Co-authored-by: Luisa Santus <[email protected]>

* fix things incorporating @luisas feedback

* add environment.yml

* whoops, forgot to change env name

* change tag name

* Revert "change tag name"

This reverts commit 83a325a.

* try changing in env.yml

* Apply suggestions from code review

Co-authored-by: Luisa Santus <[email protected]>

* remove empty line

* add missing bracket

* change glob to unique path

* Apply suggestions from code review

Co-authored-by: Luisa Santus <[email protected]>

---------

Co-authored-by: Leon Rauschning <[email protected]>
Co-authored-by: Leon Rauschning <[email protected]>
Co-authored-by: Luisa Santus <[email protected]>
lrauschning added a commit to lrauschning/modules that referenced this pull request Jan 17, 2024
* commit mtmalign module

* comment & add input name

* mtmalign test

* Revert "mtmalign test"

Use nf-test instead

This reverts commit 1854bd9.

* add nf-tests

* fix script path

* forgot to delete line from template

* removed unnecessary vars

* mess around with tests, still not fully working

* make licence array instead of string

* now runs the nftest

* changed tags

* now calling untar correctly

* added snapshot

* fix conflicting name

* check fasta instead of snapshot

* Apply suggestions from code review

Co-authored-by: Luisa Santus <[email protected]>

* fix things incorporating @luisas feedback

* add environment.yml

* whoops, forgot to change env name

* change tag name

* Revert "change tag name"

This reverts commit 83a325a.

* try changing in env.yml

* Apply suggestions from code review

Co-authored-by: Luisa Santus <[email protected]>

* remove empty line

* add missing bracket

* change glob to unique path

* Apply suggestions from code review

Co-authored-by: Luisa Santus <[email protected]>

---------

Co-authored-by: Leon Rauschning <[email protected]>
Co-authored-by: Leon Rauschning <[email protected]>
Co-authored-by: Luisa Santus <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants