let builder= alignment::io::indexed_reader::Builder::default();
let index = bam::bai::read(bai_file).unwrap();
let mut reader = builder
.set_index(index)
.build_from_path(bam_file).unwrap();
Case1
The bam file I used is:
├── test.bam
└── test.bai
thread 'main' panicked at src/main.rs:55:36:
called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Case2
The bam file I used is:
├── test.bam
└── test.bam.bai
At this time, no error appears.
The issue here seems to be that the index is not recognized even though the index is specified using set_index.
Here is the code I used:
Case1
The bam file I used is:
Case2
The bam file I used is:
At this time, no error appears.
The issue here seems to be that the index is not recognized even though the index is specified using
set_index
.