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

modkit pileup --include-bed silently rejects BED4 files, produces zero valid positions with no warning

Aperta
#605 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/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 entry point and trace how --include-bed parses the supplied BED file. Reproduce the BED4 command from the issue, then add coverage for the observed behavior and ensure completion is either a clear warning for rejected positions or successful BED4 interval handling.

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

Descrizione

bug

Description

When --include-bed is passed a BED4 file (4 columns: chr, start, end, name), modkit pileup silently parses zero valid positions and produces an empty or near-empty bedMethyl output. No warning or error is emitted to indicate that the BED file was rejected or that positions were skipped.

Steps to reproduce

# BED4 file — standard UCSC CpG island download format
# chr  start  end  name
# chr1 10468  11240  CpG: 111

modkit pileup   input.bam   output.bedmethyl   --ref reference.fasta   --include-bed cpg_islands.bed4   --modified-bases 5mC   --cpg

Result: output.bedmethyl is empty (or contains only a header). No warning is printed.

Expected behaviour

modkit should either:

  1. Emit a clear warning: "WARNING: --include-bed file has 4 columns; expected BED3 (chr/start/end) or BED6 (chr/start/end/name/score/strand). Zero positions parsed.", or
  2. Accept BED4 by treating columns 1–3 as the interval and ignoring column 4

Context

This was discovered while using modkit pileup with a standard UCSC CpG island BED file downloaded from the UCSC Table Browser. UCSC CpG island exports are BED4 by default. The silent failure is particularly confusing because the tool exits with code 0 and the output file is created — it just contains no data.

The workaround is to strip column 4 before passing to --include-bed:

cut -f1-3 cpg_islands.bed4 > cpg_islands.bed3
modkit pileup ... --include-bed cpg_islands.bed3

Environment

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.