Context
Surfaced while integrating Rp-Bp (#169). Rp-Bp's upstream pipeline calls STAR with Ribo-seq-tuned settings; ours uses a single STAR config shared between Ribo-seq and RNA-seq samples for paired analyses. Detail from Rp-Bp's src/rpbp/defaults.py:
| Parameter |
Rp-Bp default |
nf-core/riboseq default |
outFilterMismatchNmax |
1 |
10 |
outFilterMismatchNoverLmax |
0.04 |
0.3 |
outFilterType |
BySJout |
Normal |
sjdbOverhang (index) |
33 (max read - 1 for ~30 nt footprints) |
100 |
seedSearchStartLmaxOverLread |
0.5 |
unset |
winAnchorMultimapNmax |
100 |
50 |
alignIntronMin/Max |
20 / 100000 |
21 / 0 |
outFilterMismatchNmax 1 + outFilterMismatchNoverLmax 0.04: with ~30 nt Ribo-seq footprints, our default 10/0.3 allows up to 33% of the read to mismatch. That's lax for Ribo-seq; tight is right.
sjdbOverhang 33: STAR docs recommend max_read_length - 1. Building the index with 100 means junction detection is biased toward longer overhangs than Ribo-seq reads can support.
Why this matters
- Permissive alignment passes more low-quality reads into Ribo-TISH / Ribotricer / RiboCode / Rp-Bp / PRICE, blurring their periodicity statistics.
- Specifically for Rp-Bp: Bayes-factor distributions on the same FASTQs will differ from upstream Rp-Bp because the BAMs differ. The pipeline is documented to be more permissive (see Rp-Bp section of usage.md which exposes
--extra_star_align_args as the workaround), but a default that's correct out of the box is better than a documented workaround.
Why we can't just adopt Rp-Bp's settings pipeline-wide
The same STAR alignment serves both Ribo-seq and RNA-seq samples (for paired translational efficiency analysis). RNA-seq reads at 100-150 nt with outFilterMismatchNmax 1 would filter out far too many; the same STAR index with sjdbOverhang 33 would miss long-overhang junctions only RNA-seq can resolve.
Options to consider
- Per-sample-type STAR args — apply Ribo-seq-tuned args only when
meta.sample_type == 'riboseq'. Smaller blast radius. Requires teaching FASTQ_ALIGN_STAR (and the shared STAR_GENOMEGENERATE) to branch on sample type.
- Apply Ribo-seq STAR tuning only to the second STAR pass (the
--extended_orf_analysis hybrid transcriptome alignment, which is already Ribo-seq-only). Smaller change. Doesn't help default-mode Rp-Bp.
- Two STAR indices — one with
sjdbOverhang 33 for Ribo-seq, one with 100 for RNA-seq. Doubles index storage but cleanly separates concerns.
- Stay with the current defaults + document override — what's in the modernisation PR today.
Pointers
- rpbp upstream STAR defaults: https://github.com/dieterich-lab/rp-bp/blob/master/src/rpbp/defaults.py (
star_options dict, lines ~58-72)
- Where the override lives currently:
--extra_star_align_args per-run override is already wired through conf/modules.config STAR_ALIGN block.
- This is not blocking the modernisation PR (
#160-#171 + #170); it's a separate refinement to consider once the modernisation lands.
Context
Surfaced while integrating Rp-Bp (
#169). Rp-Bp's upstream pipeline calls STAR with Ribo-seq-tuned settings; ours uses a single STAR config shared between Ribo-seq and RNA-seq samples for paired analyses. Detail from Rp-Bp'ssrc/rpbp/defaults.py:outFilterMismatchNmaxoutFilterMismatchNoverLmaxoutFilterTypeBySJoutNormalsjdbOverhang(index)seedSearchStartLmaxOverLreadwinAnchorMultimapNmaxalignIntronMin/MaxoutFilterMismatchNmax 1+outFilterMismatchNoverLmax 0.04: with ~30 nt Ribo-seq footprints, our default 10/0.3 allows up to 33% of the read to mismatch. That's lax for Ribo-seq; tight is right.sjdbOverhang 33: STAR docs recommendmax_read_length - 1. Building the index with 100 means junction detection is biased toward longer overhangs than Ribo-seq reads can support.Why this matters
--extra_star_align_argsas the workaround), but a default that's correct out of the box is better than a documented workaround.Why we can't just adopt Rp-Bp's settings pipeline-wide
The same STAR alignment serves both Ribo-seq and RNA-seq samples (for paired translational efficiency analysis). RNA-seq reads at 100-150 nt with
outFilterMismatchNmax 1would filter out far too many; the same STAR index withsjdbOverhang 33would miss long-overhang junctions only RNA-seq can resolve.Options to consider
meta.sample_type == 'riboseq'. Smaller blast radius. Requires teaching FASTQ_ALIGN_STAR (and the shared STAR_GENOMEGENERATE) to branch on sample type.--extended_orf_analysishybrid transcriptome alignment, which is already Ribo-seq-only). Smaller change. Doesn't help default-mode Rp-Bp.sjdbOverhang 33for Ribo-seq, one with 100 for RNA-seq. Doubles index storage but cleanly separates concerns.Pointers
star_optionsdict, lines ~58-72)--extra_star_align_argsper-run override is already wired throughconf/modules.configSTAR_ALIGNblock.#160-#171+#170); it's a separate refinement to consider once the modernisation lands.