Hi there, quick question about Ribocode. In my exp...
# riboseq
f
Hi there, quick question about Ribocode. In my experience over the past few weeks, Ribocode in the dev version keeps crashing and runs only complete when
--skip_ribocode
is selected. I think I’ll have 2more Ribo-seq runs later today or tomorrow, so I was wondering if this has been looked at/fixed by any chance? Many thanks! @Jonathan Manning @Jack Tierney
j
I was just going to look into this this morning to figure out if it's something we can do anything about.
j
I'm sorry, I'm not up to date on this. What does crashing mean here?
j
Oh god. Apologies @Sebastian Uhrig. My Github notifications are a mess.
f
I also had:
Copy code
Caused by:
  Missing output file(s) `*.txt` expected by process `NFCORE_RIBOSEQ:RIBOSEQ:RIBOCODE_RIBOCODE (pool1_trimmed_...)` (note: input files are not included in the default matching set)


Command executed:

  RiboCode \
      -a annotation \
      -c pool1_trimmed_..._pre_config.txt \
      -o pool1_trimmed_..._CTTGTA \
       2>&1 || test -s pool1_trimmed_....txt

Command exit status:
  0

Command output:
  Error, can not determine the P-site locations.Please check your input parameters and try again.
j
My experience with this is that they do a significance test to find the periodic read lengths and its far too stringent. A potential workaround would be us telling RiboCode what read lengths to use rather than the tool determining it.
i
sounds reasonable, but would anyone know a priori what read lengths are periodic enough to trust ribocode's output? here's some qc from ribowaltz for the sample specified on github. so i reckon for the test_full we can force it to reads 28-29 nt long
j
I think we can wire up the ribowaltz outputs for this
Proposal from my l'il friend
... but looks a little complex. I'll iterate
i
i wonder why ribocode rejects even lengths of 28-29 on this data though
they should be having more than 65% in frame 0?
maybe the p-value is poor?
so maybe just relaxing the p value might suffice if that's easily configurable?
j
I'll see what that does
j
Relaxing the p-value is what we did to get the module tests to pass on the test data but I hadn't considered that effectively all datasets would be considered insufficient. @Edward Wallace in his wisdom warned of this a long time ago
i
i have used ribocode successfully out-of-the box on some riboseq data, but tbf that was excellent quality data
f
in my mind, at the very least Ribocode shouldn’t crash the entire pipeline but get ignored on error?
j
Shouldnt that be the case for any of what we class as 'Ribo-seq specific tools' in the diagram
j
The pval fix worked for me, we can add it to the test_full profile at the very least. @Jack Tierney - small fix to the module: https://github.com/nf-core/modules/pull/10295. This was blocking the OOM retry strategy because it was throwing
1
rather than
137
(then I'll update the module in the workflow)
j
Queued to merge now!
thankyou 2
j
Thanks! Here's the workflow side: https://github.com/nf-core/riboseq/pull/147 I've updated the test_full profile, and the docs. Does this cover us, or do we want anything fancier?
j
I think its okay. The significance test checks that f0 > f1 and f0 > f2 and the f0 percent is a separate check. Sometimes lowering f0_percent will be enough but other times you won't be able to get significant differences between f0 and the other frames. This is in-part becasue the window they assess for this is 51nt (17 codons/observations)
j
@Felix Krueger, as the OP, does this satisfy you? Just involves tweaking the thresholds like this.
f
That looks simple enough - and if it stops Ribocode from crashing entire runs - I’m happy! Thanks for the quick fix!
I’ve got 2 runs queued up, shall I try out the new
dev
later this afternoon?
j
Tests are still running, might take an hour
⏳ 1
Merged!
f
great stuff, I’ll go ahead and launch a run from
dev
! 🤞
Meh, still getting:
🌟
j
f
Also this:
j
could you let me know how you're running, params etc?
f
very quick call, ust 2 mins?
j
sure
Could you try it off this branch Felix?
fix/update-samtools-sort-subworkflows
I broke something in the 'primary alignments' PR, think I forgot to commit some component updates. I'll make a note to update tests to catch this in future. PR'd here: https://github.com/nf-core/riboseq/pull/148
f
The fix/branch fails like so:
j
dangit, sorry, was trying to be too quick. Be right back...
tests are running and haven't died, I hope I've resolved the fallout, but we won't know for sure for a little while. Try if you're really keen!
I'll need to update snapshots tomorrow
f
Try if you’re really keen!
You know how to get me! … and it seems to be running now! Thanks!
Ribocode metaplot failed:
Copy code
Command error:
  [2026-03-02 20:20:39] Create metaplot file and predict the P-site locations ...
  No obviously periodicity are detected from bam file pool1_CTTGTA_trimmed_1_NTG_NT_ATCG.umi_dedup.transcriptome.namesorted.bam,
  it could be due to poor quality sequencing.
  Please check the metagene plots and try again by lowering the value of frame0_percent
  [2026-03-02 20:21:01] Complete prediction of the P-site locations
  ERROR: metaplots created config file with no data (only header).
  This usually indicates insufficient periodic signal in Ribo-Seq data.
  Consider lowering the cutoff via ext.args (e.g., '-f0_percent 0.5').
  FUSION_GPU_USED=false
  	Loading transcripts.pickle ...
j
At least the error is clear- did you supply those thresholds?
f
in the 5th round of down-adjusting…. If this fails again I will just skip Ribocode entirely.
hehe
RiboCode: error: unrecognized arguments: -f0_percent 0.3
Copy code
usage: RiboCode [-h] -a ANNOT_DIR -c CONFIG_FILE [-l {yes,no}]
                [-s START_CODON] [-A ALTERNATIVE_START_CODONS] [-S STOP_CODON]
                [-t TRANSL_TABLE] [-m MIN_AA_LENGTH]
                [--dependence_test {none,mic,pcc}]
                [--stouffer_adj {none,nyholt,liji,gao,galwey}]
                [-p PVAL_CUTOFF]
                [--pval_adj {fdr_bh,bonferroni,sidak,holm-sidak,holm,simes-hochberg,hommel,fdr_by,fdr_tsbh,fdr_tsbky}]
                [-g] [-b] [-o OUTPUT_NAME] [-V]
j
Does RiboCode still output the metaplots in these instances? I suspect its that some codon is making it fail the f0>out of frame tests
f
The plots are being putput as PDF in the metaplot stage.
It reallt looks like ``-f0_percent`` is not avalid argument for RiboCode itself?
Screenshot 2026-03-03 at 10.35.45.png
The main RiboCode command (ORF detection) does not accept
-f0_percent
. That parameter belongs to the
RiboCode metaplots
step, which generates the config file used by RiboCode. So that error message needs to be amended.
this 1
Or maybe it was me misinterpreting the error (but then if it confused me, it might confuse others, too.
Copy code
echo "  - Invalid config file from metaplots (try lowering cutoff via ext.args, e.g., '-f0_percent 0.5')" >&2
OK confirmed, taking out that param from
RIBOCODE_RIBOCODE
let the workflow succeed in its entirety!
🎉 1
j
OK, fix to ribocode module error message: https://github.com/nf-core/modules/pull/10316. Can someone approve?
j
Seems like that data is genuinely not biased enough to f0. I think we need to warn that lowering these params means user should have less confidence in the RiboCode outputs
j
Make a suggestion on that PR?
i
i was gonna suggest @Jack Tierney’s comment that when this f0_percent param is reduced, ORF calls might not be as reliable should be added to the ribocode's usage docs for the pipeline, but it seems we don't have a section on ribocode there
homer disappear 1
j
Here's the PR with all the resolutions from this thread: https://github.com/nf-core/riboseq/pull/148 if anyone would care to review? Mostly hangover issues from the primary mappings PR that weren't caught.