Skip to content

panic: index out of bounds #35

@wdecoster

Description

@wdecoster

Hi,

Great to see Rust tools at ONT :)
I just downloaded the latest binary and ran the command below:

modkit pileup --partition-tag HP --combine-strands --cpg --ref ~/GRCh38.fa alignment.cram calls.bed --region chr10:13107989-13108319

First, I noted that --cpg and --ref were required, and also the name of an output file while I want to partition per haplotype. That seems weird, and I don't know what would have happened to my output if it didn't end up panicking.

modkit outputted
> parsing region chr10:13107989-13108319
and then took a suspiciously long time (2min45s) before running into:

thread 'main' panicked at 'index out of bounds: the len is 196 but the index is 18446744073709551615', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/rust-htslib-0.43.1/src/bam/mod.rs:847:41
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The index position looks like an underflow to me. The same error happened on another comparable interval. Please let me know what I can do to help debug this.

Wouter

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions