chunking: edge guard hardcodes 5 bases instead of using kmer_context
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 62/100
Hướng nghiên cứu
Start in src/leech/chunking/extractor.py around lines 350 and 360, where the edge guard uses a hardcoded 5, then check src/leech/preparation/parallel.py lines 142-144 and the feature_start fallbacks at lines 275-276. Replace the constants with the configured ChunkConfig.kmer_context, threading it into _find_motif_positions, and change the or -5 fallback to an explicit None check. Done when kmer_context=10 and kmer_context=2 both produce the expected edge guard and feature_start=0 is preserved.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Found during the generalization audit (#125). Not tRNA-specific, but the same class of baked-in default.
Problem
The chunk edge guard hardcodes 5 bases rather than using the configured kmer_context:
src/leech/chunking/extractor.py:350—base_idx = int(np.clip(base_idx, 5, leech_read.num_bases - 6))src/leech/chunking/extractor.py:360—focus_bases = list(range(5, leech_read.num_bases - 5))src/leech/preparation/parallel.py:142-144—return list(range(5, max(5, num_bases - 5)))
5 is DEFAULT_KMER_CONTEXT, but ChunkConfig.kmer_context is configurable. A run with kmer_context=10 still guards only 5 bases, so edge chunks get N-padded k-mers; a run with kmer_context=2 needlessly discards usable focus bases.
Same pattern, lower stakes
src/leech/chunking/serialization.py:80-81—chunk.get("feature_start", -5)src/leech/preparation/parallel.py:275-276—config.chunk.feature_start or -5
The second one has an additional bug: or treats a legitimate feature_start=0 as falsy and silently substitutes -5. Should be an explicit is None check.
Suggested fix
Use chunk_config.kmer_context at all three guard sites (np.clip(base_idx, k, num_bases - k - 1), range(k, num_bases - k)), thread it into _find_motif_positions, and derive the feature_start/feature_end fallbacks from it as well.
- Ngôn ngữ chính
- Python
- Star
- 0
- Fork
- 0
- Merge trung bình
- 11 giờ 17 phút
- Pull request đã merge (30 ngày)
- 23
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của rnabioco/leech
-
load_model_from_checkpoint drops num_out/signal_in_channels for models whose __init__ takes **kwargsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 Hơn một tuần Mức phù hợp với người mới 18/100
Maintainer thường phản hồi trong vòng 1 ngày
-
model train-many: one launcher that owns an allocation and trains a queue of configs across its GPUsĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 18/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của rnabioco/leech
Issue tương tự
-
docs: powerpc not supportedĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
microsoft/TokenEconomizer#360 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
reasons-gate
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
benthomasson/reasons-service#190 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày