RNA chemistry assumptions are silent defaults; pipeline has no DNA path

Aperta
#148 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
15/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python

Direzione di ricerca

Start with the defaults in src/leech/configs.py (around lines 27-32) and the implicit RNA004 table fallback in commands/prepare.py (lines 121-131, resolved via leech/data/init.py). Then check the flag help in cli.py near lines 224 and 253, and confirm that pipeline/workflow/rules/prepare.smk never passes the reverse-signal option. Done means a single chemistry selector sets the related options together, and refinement raises an error when no table resolves. This is a design change, so agree on the approach in the thread before coding.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Found during the generalization audit (#125). Not currently listed there.

Problem — library defaults

Two direct-RNA assumptions are library-level defaults rather than declared choices:

https://github.com/rnabioco/leech/blob/main/src/leech/configs.py#L27-L32

reverse_signal: bool = True
...
refine_signal_map: bool = True

and refine_signal_map silently falls back to the bundled RNA004 9-mer table when no --kmer-table is given (commands/prepare.py:121-131 → leech/data/__init__.py:7, rna004_9mer_levels_v1.txt.gz).

So a DNA user who does not know to pass both --no-reverse-signal and --no-refine-signal-map gets a reversed signal and base boundaries refined against an RNA level table — silently wrong features rather than an error. The CLI help acknowledges this (cli.py:224, cli.py:253: "Use this flag for DNA data"), but a help string is not a guardrail.

Problem — pipeline

grep -rn "reverse.signal" pipeline/ returns nothing. --no-reverse-signal is never plumbed through prepare.smk, so the Snakemake workflow can only process direct-RNA data regardless of config.

Suggested fix

Introduce a single --chemistry {rna004, dna-r10, custom} selector that sets reverse_signal, refine_signal_map, and the kmer table together. Remove the implicit RNA004 fallback: if refinement is on and no table resolves for the chosen chemistry, raise instead of guessing. Plumb the resulting option through pipeline/workflow/rules/prepare.smk.

Related inconsistency

SignalConfig.anchor defaults to "reference" (configs.py:28) matching cli.py:229, but constants.DEFAULT_ANCHOR = "basecall" and CLAUDE.md both claim basecall is the default. See the dead-constants issue.

Lingua principale
Python
Stelle
0
Fork
0
Merge medio
11h 17m
PR unite (30g)
23

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rnabioco/leech

Tutte le issue di rnabioco/leech

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.