Class Specialization
IndexQGram
An index based on an array of sorted q-grams. Especially useful for q-gram/k-mer searches.
Index<TText, IndexQGram<TShapeSpec[, TSpec]> >
Include Headers
seqan/index.h
Parameters
TText
The text type.
Types: String
TShapeSpec
The Shape specialization type.
Note: This can be either a TSpec argument (e.g. SimpleShape) or a complete Shape class (e.g. Shape<Dna, SimpleShape>).
TSpec
The specializing type.
Default: Default
Remarks
The fibres (see Index and Fibre) of this index are a suffix array sorted by the first q characters (see QGramSA) and a q-gram directory (see QGramDir). The size of the q-gram directory is |Σ|^q. On a 32bit system the q-gram length is limited to 3 for char alphabets or 13-14 for Dna alphabets. Consider to use the OpenAddressing q-gram index for longer q-grams if you don't need q-grams to be sorted.
Specialization of
Specializations
BucketRefinementAn index based on a refined array of sorted q-grams.
OpenAddressingAn index based on an array of sorted q-grams.
Metafunctions
FibreType of a specific container member (fibre). (Index)
SAValueThe default alphabet type of a suffix array, i.e. the type to store a position of a string or string set. (Index)
Functions
clearResets an object. (Index)
countOccurrencesReturns the number of occurrences of representative substring or a q-gram in the index text.
countOccurrencesMultipleReturns the number of occurrences of a q-gram for every sequence of a StringSet .
countSequencesReturn the number of sequences in an index' underlying text. (Index)
createQGramIndexBuilds a q-gram index on a sequence.
dirAtShortcut for value(indexDir(..), ..).
endThe end of a container. (Index)
getFibreReturns a specific fibre of a container. (Index)
getKmerSimilarityMatrixCreates a matrix storing the number of common q-grams between all pairs of sequences.
getOccurrenceReturns an occurrence of the representative substring or a q-gram in the index text.
getOccurrencesReturns all occurrences of the representative substring or a q-gram in the index text.
getStepSizeReturn the q-gram step size used for index creation.
indexBucketMapShortcut for getFibre(.., QGramBucketMap).
indexCountsShortcut for getFibre(.., QGramCounts).
indexCountsDirShortcut for getFibre(.., QGramCountsDir).
indexCreateCreates a specific Fibre. (Index)
indexDirShortcut for getFibre(.., QGramDir).
indexRequireOn-demand creation of a specific Fibre. (Index)
indexSAShortcut for getFibre(.., FibreSA). (Index)
indexShapeShortcut for getFibre(.., QGramShape).
indexSuppliedReturns whether a specific Fibre is present. (Index)
indexTextShortcut for getFibre(index, FibreText()). (Index)
lengthThe number of characters in the underlying text of the index is returned. (Index)
openThis functions opens an index from disk. (Index)
rangeReturns the suffix array interval borders of occurrences of representative substring or a q-gram in the index text.
saveThis functions saves an index to disk. (Index)
setHaystackSets the haystack of a Finder object. (Index)
setStepSizeChange the q-gram step size used for index creation.
Examples
The following code prints all occurrences of the gapped q-gram "AT-A" in "CATGATTACATA".
1#include <iostream>
2#include <seqan/index.h>
3
4using namespace seqan;
5
6int main ()
7{
8    Index<DnaString, IndexQGram<OneGappedShape> > index("CATGATTACATA");
9    stringToShape(indexShape(index), "1101");
10
11    hash(indexShape(index), "ATCA");
12    for (unsigned i = 0; i < length(getOccurrences(index, indexShape(index))); ++i)
13        std::cout << getOccurrences(index, indexShape(index))[i] << std::endl;
14
15    return 0;
16}
1
4
SeqAn - Sequence Analysis Library - www.seqan.de
 

Page built @2013/07/11 09:12:38