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

オープン
#148 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
15/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
静か
技術スタック
python

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
0
フォーク
0
平均マージ
11時間 17分
マージ済み PR(30日)
23

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rnabioco/leech のほかの issue

rnabioco/leech の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。