[Seqan-dev] ESA computation
Hi,
I have a very basic question and it relates to constructing suffix
arrays. I know that i can construct and an SA by invoking :
createSuffixArray(); function and if i want a specific algorithm i do
this :
createSuffixArray(SA, seq, BwtWalk<BwtWalkFast>());
Now, when i want to compute LCP i saw this example:
indexRequire(myIndex, EsaLcp());
How do i specify that my SA in this case should be created with the same
BWT algorithm as in the case above.
concrete example:
:
seqan::String<char, seqan::MMap<> > mmapString;
if (!open(mmapString, toCString(options.inputFileName),
seqan::OPEN_RDONLY))
return 1; // Could not open file.
// Create RecordReader.
seqan::RecordReader<seqan::String<char, seqan::MMap<> >,
seqan::DoublePass<seqan::Mapped> >
reader(mmapString);
// Read file in one pass.
seqan::StringSet<seqan::CharString> ids;
seqan::StringSet<seqan::CharString> seqs;
if (read2(ids, seqs, reader, Fasta()) != 0)
return 1; // Could not read file.
typedef Index< StringSet<String<char> > > TMyIndex;
TMyIndex myIndex(seqs);
indexRequire(myIndex, EsaLcp());
:
Thank you