Skip to content

Commit a42e55d

Browse files
committed
Include the regionblocks even if the total genome is < 1 million
1 parent 3193ecd commit a42e55d

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/covcalc.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1323,6 +1323,9 @@ pub fn region_divider(regs: &Vec<Region>) -> Vec<Vec<Region>> {
13231323
bplen = 0;
13241324
}
13251325
}
1326+
if tempregionvec.len() > 0 {
1327+
blocks.push(tempregionvec.clone());
1328+
}
13261329
blocks
13271330
}
13281331

src/multibamsummary.rs

+2
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ pub fn r_mbams(
136136

137137
// Divide up the regions into regionBlocks
138138
let regionblocks = region_divider(&regions);
139+
140+
assert!(regionblocks.len() > 0, "No regions to process. Exiting.");
139141
if verbose {
140142
println!("Regions divided into {} parallel blocks", regionblocks.len());
141143
println!("Start coverage calculation");

0 commit comments

Comments
 (0)