Skip to content

Commit

Permalink
Include the regionblocks even if the total genome is < 1 million
Browse files Browse the repository at this point in the history
  • Loading branch information
WardDeb committed Jan 24, 2025
1 parent 3193ecd commit a42e55d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/covcalc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1323,6 +1323,9 @@ pub fn region_divider(regs: &Vec<Region>) -> Vec<Vec<Region>> {
bplen = 0;
}
}
if tempregionvec.len() > 0 {
blocks.push(tempregionvec.clone());
}
blocks
}

Expand Down
2 changes: 2 additions & 0 deletions src/multibamsummary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ pub fn r_mbams(

// Divide up the regions into regionBlocks
let regionblocks = region_divider(&regions);

assert!(regionblocks.len() > 0, "No regions to process. Exiting.");
if verbose {
println!("Regions divided into {} parallel blocks", regionblocks.len());
println!("Start coverage calculation");
Expand Down

0 comments on commit a42e55d

Please sign in to comment.