MIndex-class {Biostrings} | R Documentation

## MIndex objects

### Description

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

### 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.

### 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 IntegerRangesList subtype to another with the underlying IntegerRanges 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.

### Author(s)

H. Pagès

### See Also

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

### Examples

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

[Package Biostrings version 2.60.2 Index]