Last chance! 50% off unlimited learning
Sale ends in
matchPattern
,
matchPDict
, etc...
mismatch(pattern, x, fixed=TRUE)
nmatch(pattern, x, fixed=TRUE)
nmismatch(pattern, x, fixed=TRUE)
"coverage"(x, shift=0L, width=NULL, weight=1L)
"coverage"(x, shift=0L, width=NULL, weight=1L)
mismatch
(typically, one returned
by matchPattern(pattern, subject)
). An MIndex object for coverage
, or any object for
which a coverage
method is defined. See ?coverage
.
?`lowlevel-matching`
.
?coverage
.
x
counts.
mismatch
: a list of integer vectors.nmismatch
: an integer vector containing the length of the vectors
produced by mismatch
.coverage
: an Rle object indicating
the coverage of x
.
See ?coverage
for the details.
If x
is an MIndex object, the coverage of a given position
in the underlying sequence (typically the subject used during the search
that returned x
) is the number of matches (or hits) it belongs to.
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.
matchPattern
,
matchPDict
,
XString-class,
XStringViews-class,
MIndex-class,
coverage,
align-utils
## ---------------------------------------------------------------------
## 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...
Run the code above in your browser using DataLab