CellRanger4 + clip5pNbases/clip3pNbases misplaces reads by clip5pNbases
メンテナーはふだん 4 日以内に返信
まだ誰も着手していません。
- #241 @BenjaminDEMAILLE による — マージされずにクローズ
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- rust
調査の方向性
issue にあるコマンドとデータセットで不一致を再現し、次に clipping が aligner に到達する経路と POS の導出方法を追跡してください。まず src/io/sam.rs:1106 と solo::clip_adapter_cr4_with_tso を確認し、apply_read_clips はすでに確認済みとして扱ってください。CellRanger4 と fixed-clip を組み合わせた設定で、STAR に対する ±5 の POS 差分が発生しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
--clipAdapterType CellRanger4 combined with a non-zero --clip5pNbases / --clip3pNbases misplaces most reads by exactly clip5pNbases. Each option on its own is fine; only the pairing breaks.
Found while validating the CR4 clip work in the hyalite PR (#198 ). It predates that PR and is not caused by it.
Reproduction
Real 10x mouse chr19 (see CONTRIBUTING.md for dataset) , rustar and STAR 2.7.11b with the same flags:
SC=test/data/singlecell
COMMON="--readFilesIn $SC/reads/S10_L001_R2_001.fastq.gz $SC/reads/S10_L001_R1_001.fastq.gz \
--readFilesCommand zcat --soloType CB_UMI_Simple \
--soloCBwhitelist $SC/reference/10xv2_whitelist_sub50K.txt --soloFeatures Gene \
--clipAdapterType CellRanger4 --clip5pNbases 5 --clip3pNbases 3 \
--outSAMattributes NH HI AS nM --outSAMtype SAM --runThreadN 4"
./target/release/rustar-aligner --runMode alignReads --genomeDir $SC/solo_idx \
--sjdbGTFfile $SC/reference/gencode.vM19.annotation.chr19.gtf \
$COMMON --outFileNamePrefix $SC/rustar_cr4clip_
STAR --genomeDir $SC/star_solo_idx $COMMON --outFileNamePrefix $SC/star_cr4clip_
Then histogram the per-read POS delta (rustar − STAR) over primary records present in both.
What it looks like
POS delta, ~16.8k reads in both:
| delta | reads |
|---|---|
| −5 | 8527 |
| +5 | 3546 |
| 0 | 552 |
−5 and +5 are exactly clip5pNbases. Same read at the same POS carries CIGARs differing by 5 in the leading soft clip, e.g. 5S82M3S (rustar) vs 10S77M3S (STAR).
Mapped counts stay close — 14747 vs 14687 uniquely mapped — so reads are being misplaced, not lost, which is why Log.final.out looks healthy.
Scope: only the combination
| configuration | result |
|---|---|
CellRanger4 alone |
fine — 0 clip diffs, 900 other (the usual mapping/tie baseline) |
--clip5pNbases 5 --clip3pNbases 3 alone (no CR4) |
fine — 1 leading-clip diff, 980 other |
| both together | broken — 15605 differing, dominated by ±5 |
Notes for whoever picks this up
- Not
apply_read_clips(src/io/sam.rs:1106). It already swaps lead/trail for reverse strand and does not touch POS. I checked this first; it's clean. The cause is upstream, in what sequence reaches the aligner or how POS is derived from it. - The bidirectional ±5 split (~70/30) suggests something strand-dependent, but that is a hypothesis, not a finding.
- The POS-delta histogram is the diagnostic that made this obvious. CIGAR-level diffing hid it, because the CIGARs look individually plausible.
Dead end — please don't repeat it
STAR's ClipMate::clip does the fixed N-trim before the adapter trim, so our poly-A scan window is formally wrong for this pairing (we scan raw[TSO..], STAR scans raw[TSO+clip5p .. len-clip3p]). I tried narrowing the window to match, and agreement got worse: leading-clip diffs went 475 → 549, because the position bug swamps the window effect. It's reverted, with an NB comment at solo::clip_adapter_cr4_with_tso.
Fix the position bug first; then the window correction can be measured honestly.
Why it matters now
#176 makes clip_adapter_type = "CellRanger4" a default on 10x geometry (CELLRANGER_DEFAULTS). Today CR4 is opt-in, so this only bites users who asked for it. If #176 lands first, any 10x user who adds --clip5pNbases hits this without ever typing --clipAdapterType CellRanger4.
This should be fixed before #176 merges.
- 主要言語
- Rust
- スター
- 94
- フォーク
- 9
- 平均マージ
- 15時間 24分
- マージ済み PR(30日)
- 24
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
scverse/rustar-aligner のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
scverse/rustar-aligner#354 ·
メンテナーはふだん 4 日以内に返信
-
New dependency for 10x `.h5` output: `hdf5-pure` (pure Rust, no libhdf5)対応中かも @Psy-Fer が 9 日前に担当しました。 オープンdependencies
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
scverse/rustar-aligner#341 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 4 日以内に返信
-
CellRanger-compatible `outs/` output (`metrics_summary.csv`, `.h5` matrices, `web_summary.html`) — checking the development method before opening PRs対応中かも @Psy-Fer が 8 日前に担当しました。 オープンsensitive license
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
scverse/rustar-aligner#340 · コメント 1 件 · リアクション 1 件 · 担当者 1 名 ·
メンテナーはふだん 4 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 1/100
scverse/rustar-aligner#324 ·
メンテナーはふだん 4 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 8/100
scverse/rustar-aligner#299 ·
メンテナーはふだん 4 日以内に返信
scverse/rustar-aligner の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
ScoopInstaller/Extras#19275 ·
メンテナーはふだん 1 日以内に返信
-
area:plugins kind:bug priority:p2 ready
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
bug priority: medium ui
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
storytold/gridcraft#3496 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bip39: Mnemonic::new_from_phrase rejects phrases with extra or non-space whitespace対応中かも @chukwudiikeh が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信