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

`pileup` command is giving BED files that `dmr` command says `invalid-bedmethyl-data`.

Aperta
#580 8 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
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
rust

Direzione di ricerca

Start by comparing the BED-methyl output from modkit pileup with the record rejected by modkit dmr pair. Inspect modkit-core/src/pileup/subcommand.rs and the DMR validation path indicated by the invalid-bedmethyl-data error; use the supplied commands and logs as the reproduction. Done means pileup output is accepted by dmr without the reported coverage/count inconsistency.

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

Descrizione

troubleshooting

pileup command is giving BED files that dmr command says invalid-bedmethyl-data. I have attached the output of DMR and the commands I have run.

OUTPUT (DMR)

> reading reference FASTA at "<genome_fasta_name>.fasta"
> 1521 common sequence(s) between FASTA and both samples
> running single-site analysis
> using default prior, Beta(α: 0.55, β: 0.55)
> estimating max coverages from data
> sampled 1094523 a records and 905404 b records, calculating max coverages for 95th percentile
> calculated max coverage for a: 6 and b: 21
> running with replicates, but not matched samples
> batch failed: invalid data, valid coverage (1) is not equal to the sum of canonical and modified counts (0), [BedMethylLine { chrom: "AAKM01000036", interval: Interval { start: 7056, stop: 7057, val: () }, raw_mod_code: Code('h'), strand: Positive, count_methylated: 0, valid_coverage: 1, count_canonical: 0, count_other: 1, count_delete: 0, count_fail: 0, count_diff: 0, count_nocall: 0 }] chrom: AAKM01000036 starting at 7056, stopping
> 12 batches processed                                                                                                                                                                 > Error! invalid-bedmethyl-data

PILEUP LOGS

[modkit-logging/src/lib.rs::69][2026-02-07 10:41:20][DEBUG] command line: modkit pileup J_CC_5hmC.bam J_CC_5hmC.bed.gz --modified-bases 5hmC --reference /home/<genome_fasta_name>.fasta --log J_CC_5hmC.log --bgzf
[modkit-core/src/pileup/subcommand.rs::802][2026-02-07 10:41:20][INFO] discarded 1107 contigs with zero aligned reads
[modkit-core/src/pileup/subcommand.rs::576][2026-02-07 10:41:20][INFO] parsed 1 base modification(s). Base modifications other than 'C:h' will be counted as 'N_other'.
[modkit-core/src/pileup/subcommand.rs::653][2026-02-07 10:41:20][INFO] adding single-base motif: 'C 0'
[modkit-core/src/pileup/subcommand.rs::944][2026-02-07 10:41:20][INFO] using bgzf compression with 4 compression threads
[modkit-core/src/command_utils.rs::102][2026-02-07 10:41:20][INFO] attempting to sample 10042 reads
[modkit-core/src/reads_sampler/mod.rs::49][2026-02-07 10:41:20][DEBUG] found BAM index, sampling reads in 1000000 base pair chunks
[modkit-core/src/reads_sampler/sampling_schedule.rs::261][2026-02-07 10:41:20][DEBUG] removed 0 contigs from schedule with <= 1 reads
[modkit-core/src/reads_sampler/sampling_schedule.rs::141][2026-02-07 10:41:20][DEBUG] derived sampling schedule, sampling total 11547 reads from 1641 contigs, 0 unmapped reads
[modkit-core/src/reads_sampler/sampling_schedule.rs::164][2026-02-07 10:41:20][DEBUG] schedule
 chrom  count/frac

DMR Command

modkit dmr pair \
  -a UNC_ED_5hmC.bed.gz \
  -a UNC_YR1_5hmC.bed.gz \
  -a UNC_YR2_5hmC.bed.gz \
  -a UNC_EL_5hmC.bed.gz \
  -a UNC_FY_5hmC.bed.gz \
  -b CM_EL_5hmC.bed.gz \
  -b CM_EJ_5hmC.bed.gz \
  -o DMR_UNC_vs_CM_5hmC.bed \
  --ref "${REF}" \
  --base C \
  --threads "${THREADS}" \
  --log-filepath DMR_UNC_vs_CM_5hmC.log

PILEUP Command. mod = 5hmC

pileup () {
    local bam=$1
    local mod=$2
    local prefix=$3
    log "Running modkit pileup (${mod}) for ${prefix}"
    modkit pileup \
        "${bam}" \
        "${prefix}_${mod}.bed.gz" \
        --modified-bases "${mod}" \
        --reference "${REF}" \
        --log "${prefix}_${mod}.log" \
        --bgzf
}

I had run modified basecalling for 5mC 5hmC to create modified BAM files. @ArtRand

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.