Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

CRAM Reference Path Issue in Nextflow Environments

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
rust
領域
cli

調査の方向性

Start at the modkit pileup command and reproduce the CRAM reference-resolution failure using the command shown, a containerized environment, and a CRAM whose header points to an unavailable path. Investigate how --reference interacts with the embedded header reference; done when pileup can use the supplied reference and process such CRAMs successfully.

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

説明

troubleshooting

Hi,
Thanks for creating modkit. However I am having an issue.

When running modkit pileup (v.0.6.1) with CRAM files in containerized environments (e.g., Nextflow/Singularity pipelines), modkit fails with the error Error! should be at least 1 contig because it cannot resolve the reference genome path embedded in the CRAM header. The --reference flag does not override the header reference path, causing failures even when a valid reference is provided.

What Happens:

  1. CRAM files contain embedded reference paths in their headers (e.g., pointing to original file locations)
  2. When modkit processes these CRAMs through Nextflow, even with --reference flag and REF_PATH/REF_CACHE environment variables set, it still attempts to use the reference path from the CRAM header
  3. If that header reference path doesn't exist in the container/work directory, modkit fails to read contigs Error message: Error! should be at least 1 contig

I was able to resolve the issue by rewriting the reference path in the CRAM header before running modkit (e.g., updating the @SQ UR fields to point to a reference path accessible inside the container).

However, this becomes cumbersome when working with many samples in automated pipelines (e.g., Nextflow).

The modkit command I ran is:

modkit pileup \
   sample_ID \
    ./output/ \
    --reference genome_hg38.fa \
    --modified-bases 5mC \
    --phased \
    --combine-strands --cpg \
    --threads 12

This might also be an issue with HTSLIB or samtools, but I was wondering is there a way in modkit to:
Force the use of the reference specified with --reference, rr override/ignore the reference path embedded in the CRAM header?
If not, would this be something that could be supported in future releases?

Thank you in advance!

主要言語
Rust
スター
281
フォーク
35
PR マージ指標
30日以内にマージされた PR はありません

環境構築

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

はじめの一歩

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

nanoporetech/modkit のほかの issue

nanoporetech/modkit の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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