motif search: indel tolerance is hardcoded to 7-bp motif geometry
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 38/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- python
- Ambito
- bioinformatics
Direzione di ricerca
Start in src/leech/io/motif_search.py at the allow_edge_indels block (around lines 78-86) and the length check near lines 358-366, and note how motif_offset is already used. The issue leaves the protected-region definition and the default for max_length_delta open, so settle those with maintainers first. Done means the searcher takes edge_tolerance and max_length_delta as parameters with defaults that keep CCATGGC behaviour unchanged, and that tests cover a 2-bp and a 15-bp motif.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Found during the generalization audit (#125). Not currently listed there.
Problem
Indel tolerance in reference-based motif search is hardcoded to the geometry of a 7-bp tRNA motif:
https://github.com/rnabioco/leech/blob/main/src/leech/io/motif_search.py#L78-L86
if allow_edge_indels:
# Only check core region (exclude ±3bp edges for 7bp motif)
# For CCATGGC (7bp), this checks only middle position (amino acid site)
motif_len = ref_end - ref_start
edge_tolerance = min(3, motif_len // 2) # ±3bp or half motif length
and again at :358-366:
# Lenient check when accepting indels - within ±3bp tolerance
length_ok = abs(mapped_len - motif_len) <= 3
The 3 is tuned to CCATGGC. For a 2-bp motif, min(3, motif_len // 2) collapses the protected core to nothing. For a 15-bp motif, a <= 3 length tolerance is far tighter than the ±3 edge exclusion implies. Neither constant scales.
Suggested fix
Parameterize on the searcher: edge_tolerance: int | None = None (defaulting to motif_len // 2, so the protected core is always the single focus base) and max_length_delta: int | None = None (defaulting to something derived from motif length).
Better still, define the protected region relative to motif_offset rather than as a symmetric edge exclusion — motif_offset already names the position that matters, and the comment at :80 says the intent was exactly that.
- 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rnabioco/leech
-
load_model_from_checkpoint drops num_out/signal_in_channels for models whose __init__ takes **kwargsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 Più di una settimana Idoneità per principianti 18/100
I maintainer di solito rispondono entro 1 giorno
-
model train-many: one launcher that owns an allocation and trains a queue of configs across its GPUsAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 18/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di rnabioco/leech
Issue simili
-
ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
accepted
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
future-agi/future-agi#5070 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
juandresrodca/AdminForge#69 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
deepset-ai/haystack-integrations#817 ·
I maintainer di solito rispondono entro 12 giorni
-
[Bug]: test_remote_realpath_uses_argument_vector fails on Windows with Python 3.13+ (ntpath.isabs)Forse già presa @gouyu-hou l’ha presa oggi. Apertatriage/confirmed
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
agentscope-ai/agentscope#4397 ·
I maintainer di solito rispondono entro 2 giorni