Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

CRAM Reference Path Issue in Nextflow Environments

Aperta
#584 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
rust
Ambito
cli

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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!

Lingua principale
Rust
Stelle
276
Fork
33
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nanoporetech/modkit

Tutte le issue di nanoporetech/modkit

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.