Description Usage Arguments Details Value See Also Examples
Miscellaneous utility functions operating on the matches returned by a
high-level matching function like matchPattern
,
matchPDict
, etc...
1 2 3 4 5 6 7 |
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
.
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.
lowlevel-matching,
matchPattern
,
matchPDict
,
XString-class,
XStringViews-class,
MIndex-class,
coverage,
align-utils
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## ---------------------------------------------------------------------
## 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...
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.