Function
saAt
Shortcut for value(indexSA(..), ..).
saAt(position, index)
Include Headers
seqan/index.h
Parameters

position | A position in the array on which the value should be accessed.
index | The Index object holding the fibre. Types: IndexEsa

Return Values
A reference or proxy to the value.
Member of
Index
Examples
The following code shows how the BWT of a text can be computed.
File "index_textAt_indexText_saAt_indexRequire.cpp"

1 | #include <seqan/index.h>
2 |
3 | using namespace seqan;
4 |
5 | int main ()
6 | {
7 | Index<String<char> > index("MISSISSIPPI");
8 |
9 | // Because indices are build on demand we force the index creation here.
10 | indexRequire(index, FibreSA());
11 |
12 | std::cout << "BWT\tSuffices" << std::endl;
13 |
14 | for (unsigned i = 0; i < length(indexSA(index)); ++i)
15 | {
16 | unsigned textPos = (saAt(i, index) == 0) ? length(index) - 1 : saAt(i, index) - 1;
17 | std::cout << textAt(textPos, index) << "\t" << suffix(indexText(index), textPos) << std::endl;
18 | }
19 | return 0;
20 | }

BWT Suffices
P PI
S SIPPI
S SISSIPPI
M MISSISSIPPI
I I
P PPI
I IPPI
S SSIPPI
S SSISSIPPI
I ISSIPPI
I ISSISSIPPI
Example Programs
Index lcpAt, saAt
SeqAn - Sequence Analysis Library - www.seqan.de

Page built @2014/10/13 16:12:58