INNER CODE UNIT · Rust
find_homopolymers
google/best · src/intervals.rs:36
pub fn find_homopolymers(
seq: &fasta::record::Sequence,
start: usize,
end: usize,
strand_rev: bool,
) -> Vec<FeatureInterval> {
let mut res = Vec::new();
let mut hp_len = 0;
let mut prev = b'?';
for i in start..=end {
let curr = seq
.get(Position::new(i).unwrap())
.unwrap()
.to_ascii_uppercase();
if curr == prev && i != end {
hp_len += 1;