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 db to output meta object for diamond/blastp #7403

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

Conversation

erikrikarddaniel
Copy link
Member

@erikrikarddaniel erikrikarddaniel commented Jan 30, 2025

PR checklist

Closes #XXX

  • 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

Sorry for this, @vagkaratzas , but I need to keep track of the combination of fasta file and database so I need the output meta object to contain the id of the database's meta.

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.

I feel it's becoming too much case-specific. I would keep it as is, and then do this little change in the local copy of the module, and keep track of the changes with "nf-core modules patch". More opinions are welcome for discussion.

@erikrikarddaniel
Copy link
Member Author

The module is perfect for the case when you have one or more fasta files you want to align to one or more databases. You'll have an m x n matrix with results. For the next step to be able to keep track of which entries in an output channel is which combination of fasta file and database, you need to have the ids of both in the output meta. I can't see who it could possibly hurt to have that extra entry in the meta except if someone is using db for some other purpose.

@vagkaratzas
Copy link
Contributor

Ok, I can listen to reason :P
Can you make an nf-test with such a case? 2 fastas and 2 dbs?

@erikrikarddaniel
Copy link
Member Author

Ok, I can listen to reason :P

I know! :-)

Can you make an nf-test with such a case? 2 fastas and 2 dbs?

Yes, in a moment.

@erikrikarddaniel
Copy link
Member Author

It turned out that I don't know how to call a module in nf-tests with actual channels, i.e. not just the single call one does in a process { } block. At the moment I'm a bit stressed about getting a new release of metatdenovo out, so I'll wait with adding the test until things have quieten down a bit so I have a chance to look at that.

However, I realized I had forgotten that it's important that prefix contains both the meta.id and the meta2.id/meta.db so I pushed a commit for that.

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