LongestCommonPrefix {Biostrings} | R Documentation |
Given an object of class "BioString" representing a suffix array, this function returns an object (of class "LongestCommonPrefix") representing a matrix of the longest common prefixes between any two elements in the suffix array.
LongestCommonPrefix(x)
x |
An object of class "BioString" representing a suffix array. |
The suffix array argument to the LongestCommonPrefix
function
is assumed to be created by the DNASuffixArray
function. In
other words, the suffixes are assumed to be sorted in increasing
order.
An object of class "LongestCommonPrefix".
Saikat DebRoy
DNASuffixArray
, LongestCommonPrefix-class
data('yeastSEQCHR1') yeast1 <- DNAString(yeastSEQCHR1) x <- substring(yeast1, c(1, 30)) x suf <- DNASuffixArray(x) lcp <- LongestCommonPrefix(suf)