enable a pre-built bowtie2 index for rrna removal - #1892
Draft
emmanuel-tan wants to merge 4 commits into
Draft
Conversation
emmanuel-tan
force-pushed
the
enhancement/rrna-bt-index
branch
from
August 1, 2026 04:34
70ed748 to
a58734d
Compare
Author
|
Hi @pinin4fjords ! I just wanted to highlight this PR for your review. It does depend on PRs in the nf-core/test-datasets and the nf-core/modules repos so leaving as a draft first. Hope the approach taken makes sense! Open for further thoughts and discussion. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for supplying a pre-built Bowtie2 index for rRNA removal (
--ribo_removal_tool bowtie2), so users don't have to rebuild the index from--ribo_database_manifeston every run.Addresses #1731
Changes made
Added
--bowtie2_rrna_indextonextflow_schema.json(path or.tar.gzarchive) with description/help text.subworkflows/local/prepare_genome_indices/main.nf:bowtie2_rrna_indexas atake:input and a new emit output.bowtie2_rrna' branchtoprepare_tool_indices(only added whenribo_removal_tool == 'bowtie2'and an index path is supplied).UNTAR_BOWTIE2_RRNA_INDEXmodule (only if the path ends in.tar.gz) or passes the directory straight through if it's already unpacked. No index is built here as that stays infastq_remove_rrna, this subworkflow only resolves/untars a pre-built one.workflows/rnaseq/main.nf:make_bowtie2_indexis now false whenever--bowtie2_rrna_indexis set, skipping on-the-fly index construction.main.nf:params.bowtie2_rrna_indexis threaded intoPREPARE_GENOME_INDICES, and its resolvedbowtie2_rrna_indexoutput is passed toRNASEQ.subworkflows/nf-core/fastq_remove_rrna/main.nf: reverted to the nf-core version of this workflow; an earlier commit of mine incorrectly modified this.tests/remove_ribo_rna.nf.test(+.snap): two new nf-test cases (--bowtie2_rrna_index,normaland-stub) asserting the index-build steps (SEQKIT_REPLACE*,BOWTIE2_BUILD) are skipped andUNTAR_BOWTIE2_RRNA_INDEXruns instead. Pending PR that adds a small test index at add small bowtie2 index for tests test-datasets#2174 .How index resolution now works
--bowtie2_rrna_indexunset →make_bowtie2_index = true, andfastq_remove_rrnabuilds the index from--ribo_database_manifestFASTAs as before.--bowtie2_rrna_indexset →prepare_genome_indicesresolves it (untarring if needed) and that channel is passed straight through tofastq_remove_rrna, which skips the build step entirely.Outstanding items
bowtie2_rrna_indexparameter. They were tested locally pointing to a test index at a personal fork. Need to point to nf-core/test-datasets before merge (add small bowtie2 index for tests test-datasets#2174) and regenerate snapshots.FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESScurrently initialisesch_bowtie2_indextochannel.empty(), preventing any provided index from being utilised for theFASTQ_REMOVE_RRNAstep. Separate PR here remove setting of bowtie2_index to an empty channel modules#12490PR checklist
nf-core pipelines lint).nextflow run . -profile test,docker --outdir <OUTDIR>).nextflow run . -profile debug,test,docker --outdir <OUTDIR>).docs/usage.mdis updated.docs/output.mdis updated.CHANGELOG.mdis updated.README.mdis updated (including new tool citations and authors/contributors).