Skip to content

Commit

Permalink
adding checking for when MNV is of length 1?
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysnewell committed Jul 23, 2020
1 parent 51d1288 commit 09def0b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/estimation/bams/process_bam.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ pub fn process_bam<R: NamedBamReader,
}
},
_ => {
debug!("found {:?} but not confirmed wrongly", &mnv);
},
}
})
Expand Down Expand Up @@ -290,11 +289,20 @@ pub fn process_bam<R: NamedBamReader,
if alt[mnv_pos] == read_char {

mnv = alt.clone();
debug!("Potential MNV {} {:?} {}", &mnv_pos, &mnv, &read_char);
debug!("Potential MNV pos {} var {:?} read {} ref {:?}", &mnv_pos, &mnv, &read_char, &base.refr);

mnv_pos += 1;
potential_mnv = true;
mnv_cursor = cursor as i64;

// Then it is automatically assigned
if mnv_pos == mnv.len() {
base.assign_read(record.qname().to_vec());
base.truedepth[sample_idx] += 1;
mnv = vec!();
mnv_pos = 0;
potential_mnv = false;
}
}
},
Variant::None => {
Expand Down

0 comments on commit 09def0b

Please # to comment.