Utility functions operating on the matches returned by a high-level matching function
Miscellaneous utility functions operating on the matches returned by a
high-level matching function like matchPattern
,
matchPDict
, etc...
mismatch(pattern, x, fixed=TRUE) nmatch(pattern, x, fixed=TRUE) nmismatch(pattern, x, fixed=TRUE) ## S4 method for signature 'MIndex' coverage(x, shift=0L, width=NULL, weight=1L) ## S4 method for signature 'MaskedXString' coverage(x, shift=0L, width=NULL, weight=1L)
pattern |
The pattern string. |
x |
An XStringViews object for An MIndex object for |
fixed |
See |
shift, width |
See |
weight |
An integer vector specifying how much each element in |
The mismatch
function gives the positions of the mismatching
letters of a given pattern relatively to its matches in a given subject.
The nmatch
and nmismatch
functions give the number of
matching and mismatching letters produced by the mismatch
function.
The coverage
function computes the "coverage" of a subject
by a given pattern or set of patterns.
mismatch
: a list of integer vectors.
nmismatch
: an integer vector containing the length of the vectors
produced by mismatch
.
## --------------------------------------------------------------------- ## mismatch() / nmismatch() ## --------------------------------------------------------------------- subject <- DNAString("ACGTGCA") m <- matchPattern("NCA", subject, max.mismatch=1, fixed=FALSE) mismatch("NCA", m) nmismatch("NCA", m) ## --------------------------------------------------------------------- ## coverage() ## --------------------------------------------------------------------- coverage(m) ## See ?matchPDict for examples of using coverage() on an MIndex object...
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.