Skip to content

Conversation

@egreenberg7
Copy link
Contributor

@egreenberg7 egreenberg7 commented Oct 29, 2025

Resolves #1615. I have mostly implemented the addition of Sylph into the nf-core rnaseq pipeline for contamination screening. We may want to wait for Sylphtax to be added to MultiQC and then for that to be updated in the pipeline, see my PR there. Sylph has similar precision and much lower compute requirements than Kraken2/Bracken; the main disadvantage in my eyes is that it cannot do individual read assignments. In any case, I think it would be a very useful tool for contamination screening as an alternative to the Kraken2/Bracken combination and was mentioned as an alternative when that was added (see here).

PR checklist

  • 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 pipeline conventions in the contribution docs
  • If necessary, also make a PR on the nf-core/rnaseq branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core pipelines lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

@nf-core-bot
Copy link
Member

Warning

Newer version of the nf-core template is available.

Your pipeline is using an old version of the nf-core template: 3.3.2.
Please update your pipeline to the latest version.

For more documentation on how to update your pipeline, please see the nf-core documentation and Synchronisation documentation.

@egreenberg7
Copy link
Contributor Author

egreenberg7 commented Oct 29, 2025

A bug that still needs to be dealt with before merging: if Sylph detects no species (primarily for small test files, or maybe incorrect database), it outputs a blank text file that causes sylphtax to crash. We'll have to add some way of checking the sylph output before feeding it to sylph tax I presume. Otherwise, it seems to be working fine.
FIXED

Also, for now I did not put tests of the file extensions for the sylph database/taxonomy in the nextflow schema, but that could be an enhancement.

Copy link
Member

@pinin4fjords pinin4fjords left a comment

Choose a reason for hiding this comment

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

Really nice work, thanks!

Yes, let's wait for the MultiQC module (I've nudged Phil but he's crazy busy)

We'll also have to figure out what's going on with the failing tests.

//
def sylphArgumentsWithoutSylphUsageWarn() {
log.warn "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" +
" Sylph related arguments have been provided without setting contaminant\n" +
Copy link
Member

Choose a reason for hiding this comment

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

Let's not do this. There's lots of cases where the params contains unused options, we don't need to warn the user each time.

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'll comment here that this is in line with Kraken2. It is a bit different from params containing unused options in that if a person provides a Sylph database/taxonomy to the the pipeline but contaminant-screening is not set to sylph, then sylph will not run even though the database has been provided. I could making the wording a bit more clear or just follow through and delete it entirely

Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should delete it from kraken as well then. I think if I'm a user I expect to be able to turn something off an not get warnings about excess params.

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.

3 participants