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

Abierto
#148 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
15/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
python

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
0
Forks
0
Merge medio
11 h 17 min
PR fusionados (30 d)
23

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de rnabioco/leech

Todos los issues de rnabioco/leech

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.