smithlabcode / ribotricer

A tool for accurately detecting actively translating ORFs from Ribo-seq data
http://doi.org/djv4
GNU General Public License v3.0
28 stars 8 forks source link

Control over minimum coverage + better error messages #154

Closed pinin4fjords closed 3 months ago

pinin4fjords commented 3 months ago

Is your feature request related to a problem? Please describe.

Minimum metagene coverage is essentially hard-coded, since a default value is set here, and no interface to that value is provided when calling the function in places like this.

The result is that no reads are selected, and errors appear like:

WARNING: no periodic read length found... using cutoff 0.0

That doesn't really describe the issue- the problem is that no reads passed the coverage threshold.

This also prevents operation in relatively low read counts, which might make sense scientifically, but makes the module hard to use in test scenarios (where scientific validity is not required).

Describe the solution you'd like Would you be amenable to a detect-orfs CLI parameter which controls this value? Happy to make a PR.

There should also be an error triggered when all reads are removed in the coverage filter, to make it clear that periodicity is not the problem.

Additional context Attempting to include ribotricer in the nf-core riboseq workflow.

pinin4fjords commented 3 months ago

Roughly like https://github.com/smithlabcode/ribotricer/pull/155 (whipped up in 10 mins, so just illustrating)

saketkc commented 3 months ago

Closed by #155