[][src]Function bio::alignment::sparse::lcskpp

pub fn lcskpp(matches: &[(u32, u32)], k: usize) -> SparseAlignmentResult

Sparse DP routine for Longest Common Subsequence in length k substrings. Also known of LCSk++ From LCSk++: Practical similarity metric for long strings. Filip Pavetić, Goran Žužić, Mile Šikić Paper here :https://arxiv.org/abs/1407.2407. Original implementation here: https://github.com/fpavetic/lcskpp

Arguments

  • matches - a vector of tuples indicating the (string1 position, string2 position) kmer matches between the strings
  • k - the kmer length used for matching

Return value

The method returns a SparseAlignmentResult struct with the following fields:

  • path is the LCSk++ path, represented as vector of indices into the input matches vector.
  • score is the score of the path, which is the number of bases covered by the matched kmers.
  • dp_vector is the full DP vector, which can generally be ignored. (It may be useful for testing purposes).