|
|
@@ -103,16 +103,21 @@ pub fn get_n_start(
|
|
|
) -> Result<usize> {
|
|
|
bam.fetch((chr, start, stop))?;
|
|
|
|
|
|
- let mut start_positions = Vec::new();
|
|
|
+ // let mut start_positions = Vec::new();
|
|
|
+ let mut n_start = 0;
|
|
|
for read in bam.records() {
|
|
|
let record = read.context(format!("eRR"))?;
|
|
|
let rstart = record.pos() as i32;
|
|
|
if rstart >= start && rstart < stop {
|
|
|
- start_positions.push(rstart);
|
|
|
+ if record.qual() > 40 {
|
|
|
+ n_start += 1;
|
|
|
+ }
|
|
|
+ // start_positions.push(rstart);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- Ok(start_positions.len())
|
|
|
+ Ok(n_start)
|
|
|
+ // Ok(start_positions.len())
|
|
|
}
|
|
|
|
|
|
pub fn range_depths(
|