pub fn find_kmer_matches_seq1_hashed(
    seq1_set: &HashMapFx<&[u8], Vec<u32>>,
    seq2: &[u8],
    k: usize,
) -> Vec<(u32, u32)> {
    let mut matches = Vec::new();

    for i in 0..(seq2.len() + 1).saturating_sub(k) {
        let slc = &seq2[i..i + k];
        if let Some(matches1) = seq1_set.get(slc) {
            for pos1 in matches1 {
                matches.push((*pos1, i as u32));
            }
        }
    }

    matches.sort_unstable();
    matches
}
// Find all matches of length k between two strings where the first string is
// already hashed by using the function sparse::hash_kmers
Find all matches of length k between two strings where the first string is
already hashed by using the function sparse::hash_kmers
Find all matches of length k between two strings where the first string is already hashed by using the function sparse :: hash_kmers
pub fn find_kmer_matches_seq1_hashed(
    seq1_set: &HashMapFx<&[u8], Vec<u32>>,
    seq2: &[u8],
    k: usize,
) -> Vec<(u32, u32)> {
    let mut matches = Vec::new();
    for i in 0..(seq2.len() + 1).saturating_sub(k) {
        let slc = &seq2[i..i + k];
        if let Some(matches1) = seq1_set.get(slc) {
            for pos1 in matches1 {
                matches.push((*pos1, i as u32));
            }
        }
    }
    matches.sort_unstable();
    matches
}
pub fn find_kmer_matches_seq1_hashed ( seq1_set : & HashMapFx < & [ u8 ] , Vec < u32 > > , seq2 : & [ u8 ] , k : usize , ) -> Vec < ( u32 , u32 ) > { let mut matches = Vec :: new ( ) ; for i in 0 .. ( seq2 . len ( ) + 1 ) . saturating_sub ( k ) { let slc = & seq2 [ i .. i + k ] ; if let Some ( matches1 ) = seq1_set . get ( slc ) { for pos1 in matches1 { matches . push ( ( * pos1 , i as u32 ) ) ; } } } matches . sort_unstable ( ) ; matches }
Find all matches of length k between two strings where the first string is
already hashed by using the function sparse::hash_kmers
Find all matches of length k between two strings where the first string is already hashed by using the function sparse :: hash_kmers
seq1_set
&HashMapFx<&[u8], Vec<u32>>
seq2
&[u8]
k
usize
seq1_set
&HashMapFx<&[u8], Vec<u32>>
seq2
&[u8]
k
usize