Class
Shape
Stores hash value and shape for an ungapped or gapped q-gram.
Parameters
The Value type of the string the shape is applied to (e.g. | |
The specializing type. Default: SimpleShape, for ungapped q-grams. |
Remarks
Specializations
| A fixed gapped shape. | |
| A variable gapped shape. | |
| A variable shape with one optional gap. | |
| A variable length ungapped shape (also called q-gram or k-mer). | |
| A fixed length ungapped shape (also called q-gram or k-mer). |
Metafunctions
| Type of the object a given object depends on. | |
| Number of elements in a fixed-size container. | |
| Type of an object that is suitable to hold size information. | |
| Type of the items in the container or behind an iterator. | |
| Number of different values a value type object can have. | |
| Number of relevant positions in a shape. |
Member Functions
| Constructor |
Functions
| Returns the number of occurrences of representative substring or a q-gram in the index text. | |
| Returns the number of occurrences of a q-gram for every sequence of a StringSet . | |
| Builds an index on a StringSet storing how often a q-gram occurs in each sequence. | |
| Builds a q-gram index on a sequence. | |
| Builds the directory of a q-gram index on a sequence. | |
| Builds the suffix array of a q-gram index on a sequence. | |
| Returns an occurrence of the representative substring or a q-gram in the index text. | |
| Returns all occurrences of the representative substring or a q-gram in the index text. | |
| Computes a (lower) hash value for a shape applied to a sequence. | |
| Computes an unique hash value of a shape applied to a sequence, even if the sequence is shorter than the shape span | |
| Computes a unique hash value for the adjacent shape, even if it is shorter than q. | |
| Computes an upper unique hash value of a shape applied to a sequence, even if the sequence is shorter than the shape span. | |
| Preprocessing step of a pure hashNext loop. | |
| Computes the hash value for the adjacent shape. | |
| Computes an upper hash value for a shape applied to a sequence. | |
| Shortcut for | |
| The number of items/characters. | |
| Returns the suffix array interval borders of occurrences of representative substring or a q-gram in the index text. | |
| Converts a given shape into a sequence of '1' (relevant position) and '0' (irrelevant position). | |
| Reference to the value. | |
| Number of relevant positions in a shape. |
Examples
The following code shows how one can use a gapped shape to search for the pattern "ACxA" in a reference. First
we assign a form to the shape and then compute the corresponding hash value. The hash value of a string and a Shape
object is unique, such that one can retrieve the string from a shape if the hash value is known.
File "shape.cpp"
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 |
Hit at position: 0
Hit at position: 14
Hit at position: 17
SeqAn - Sequence Analysis Library - www.seqan.de
