chunk format: one `CHUNK_FIELDS` spec, ASCII text in `ChunkSpool`, one BAM tag parser

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
22/100
issue の種類
リファクタリング
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
python
領域
data

調査の方向性

Start with the four copies of the chunk field list in chunking/serialization.py (iter_chunk_columns, load_chunks), chunking/table.py (_INT_FIELDS/_TEXT_FIELDS), and the classifier in tests/test_backend_parity.py, then the -5/5 defaults near line 381. Done means one CHUNK_FIELDS spec feeds all of them, ChunkSpool stores text as S widened blockwise, tests/test_chunk_writer.py still passes with identical .npz bytes, and the parity test fails on an unclassified field.

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

説明

enhancement review-2026-09

Tier P3 · effort M · from the 2026-09-13 review (prep F7, F10, F12)

  • The chunk record's field list is spelled four times: chunking/serialization.py:349-477 (iter_chunk_columns, write), :1044-1176 (load_chunks, read as dicts), chunking/table.py:28-47 (_INT_FIELDS/_TEXT_FIELDS, read as columns), and the classifier in tests/test_backend_parity.py. serialization.py:381-382 defaults feature_start/feature_end to literal -5/5 — a third spelling of the rule resolve_feature_window centralised in #189 (never hit, since both backends set them, but a trap).
  • ChunkSpool keeps every text member as <U in RAM (serialization.py:720-724): read_ids U36 (144 B), sequences_with_kmer_context ~U56 (224 B), sequences U11 (44 B) plus three small ones ≈ 450 B/chunk ≈ 3 GB at 6.7M chunks — the dominant RSS of data prepare now that arrays spill; text_column() (:748-760) then concatenates a second transient copy. table.py:144-165 already reads text as fixed-width S.
  • mv/ns/ts are parsed in io/bam_reader.py:151-157 (ReadInfo.__init__) and again in features.py:131-155 (extract_move_table); CL in bam_reader.py:160-166 and preparation/reader.py:277-281.
Acceptance criteria
  • One CHUNK_FIELDS spec (field, member, dtype, missing sentinel, is_text) consumed by the writer, the dict loader, ChunkTable and the parity test's classifier; _text() and the -1 sentinels are properties of the spec; the -5/5 literals are gone. Adding a field is one edit plus its parity classification.
  • ChunkSpool holds text as fixed-width S and widens to <U blockwise in _write_text_member; the .npz bytes are identical (tests/test_chunk_writer.py); peak RSS of data prepare on the fixture drops (record it).
  • MoveTable.from_alignment(aln) is the single tag parser; ReadInfo and extract_move_table delegate; ReadInfo.from_alignment owns CL.
  • tests/test_backend_parity.py still fails on an unclassified field.
Non-goals
  • The struct-of-arrays Rust return (separate issue), though this spec is what it should target.
主要言語
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 を短くまとめたダイジェスト。