INNER CODE UNIT · Rust
run
mbhall88/rasusa · src/alignment/mod.rs:30
fn run(&mut self) -> Result<()> {
match self.strategy {
SubsamplingStrategy::Stream => self.run_stream(),
SubsamplingStrategy::Fetch => self.run_fetch(),
}
}
}
impl Alignment {
// a function which infers data type (paired and or single end) by looking at the first 10 records
fn check_pair(&self) -> Result<bool> {
// set up reader. Only the first 10 records are read below, so multithreaded BGZF
// decoding would pay worker-pool spin-up costs for no benefit - always use 1 thread here.
let mut reader = build_alignment_reader(&self.aln, NonZeroUsize::new(1).unwrap())?;
let header = reader.read_header()?;
// read records only to check what type of the data