Biostrings (version 2.40.2)

MIndex-class: MIndex objects

Description

The MIndex class is the basic container for storing the matches of a set of patterns in a subject sequence.

Arguments

Accessor methods

In the code snippets below, x is an MIndex object.
length(x): The number of patterns that matches are stored for.
names(x): The names of the patterns that matches are stored for.
startIndex(x): A list containing the starting positions of the matches for each pattern.
endIndex(x): A list containing the ending positions of the matches for each pattern.
elementNROWS(x): An integer vector containing the number of matches for each pattern.

Subsetting methods

In the code snippets below, x is an MIndex object.
x[[i]]: Extract the matches for the i-th pattern as an IRanges object.

Coercion

In the code snippets below, x is an MIndex object.
as(x, "CompressedIRangesList"): Turns x into an CompressedIRangesList object. This coercion changes x from one RangesList subtype to another with the underlying Ranges values remaining unchanged.

Other utility methods and functions

In the code snippets below, x and mindex are MIndex objects and subject is the XString object containing the sequence in which the matches were found.
unlist(x, recursive=TRUE, use.names=TRUE): Return all the matches in a single IRanges object. recursive and use.names are ignored.
extractAllMatches(subject, mindex): Return all the matches in a single XStringViews object.

Details

An MIndex object contains the matches (start/end locations) of a set of patterns found in an XString object called "the subject string" or "the subject sequence" or simply "the subject".

matchPDict function returns an MIndex object.

See Also

matchPDict, PDict-class, IRanges-class, XStringViews-class

Examples

Run this code
  ## See ?matchPDict and ?`matchPDict-inexact` for some examples.

Run the code above in your browser using DataLab