Class LocalMatchStore
Stores information about local matches.

Defined in <seqan/parse_lm.h>
Signature template <typename TSpec = void, TConfig = LocalMatchStoreConfig<TSpec> > struct LocalMatchStore;

Template Parameters

TSpec Specialization tag.
TConfig Configuration class.

Interface Function Overview

Member Variable Overview

Detailed Description

The LocalMatchStore provides information about matches. Similar to the FragmentStore, the information is split into multiple sub stores. Each sub store stores a part of the information.

The LocalMatchStore#matchStore stores the information about a match. The LocalMatchStore#sequenceNameStore stores the sequence names. These both sub stores are "core stores", they are filled with consistent information, i.e. for each sequence id in the matchStore, there has to be a valid entry in the sequenceNameStore.

The LocalMatchStore#cigarStore optionally stores CIGAR strings for the matches. Its entries are referenced by matchStore[i].id.


Read Lastz matches from a link RecordReader and then print them to stdout.

// Read local alignments from record reader.  Note that in real-world code,
// you should have error handling.
LocalMatchStore<> lmStore;
while (!atEnd(recordReader))
    readRecord(lmStore, recordReader, StellarGff());

// Print local alignment information to stdout.
std::cout << "# Reverse strandness is indicated by end < begin\n"
          << "#db\tdb_beg\tdb_end\tquery\tq_beg\tq_end\n";
for (unsigned i = 0; i < length(lmStore.matchStore); ++i)
    std::cout << lmStore.sequenceNameStore[lmStore.matchStore[i].queryId] << "\t"
              << lmStore.matchStore[i].queryBeginPos << "\t"
              << lmStore.matchStore[i].queryEndPos << "\t"
              << lmStore.sequenceNameStore[lmStore.matchStore[i].subjectId] << "\t"
              << lmStore.matchStore[i].subjectBeginPos << "\t"
              << lmStore.matchStore[i].subjectEndPos << "\n";

See Also

Interface Functions Detail

void appendLocalMatchStore(store, subjectId, subjectBeginPos, subjectEndPos, queryId, queryBeginPos, queryEndPos); void appendLocalMatchStore(store, subjectName, subjectBeginPos, subjectEndPos, queryName, queryBeginPos, queryEndPos, cigarStringBuffer);

Append a new local match to a LocalMatchStore


store The LocalMatchStore to add the local match to.
subjectId Numeric subject sequence identifier, IntegerConcept.
subjectName The textual name of the query sequence, CharString.
subjectBegin The begin position of the match in the subject, IntegerConcept.
subjectEnd The end position of the match in the subject, IntegerConcept.
queryId Numeric query sequence identifier, IntegerConcept.
queryName The textual name of the query sequence, CharString.
queryBegin The begin position of the match in the query, IntegerConcept.
queryEnd The end position of the match in the query, IntegerConcept.
cigarStringBuffer Buffer with the cigar string of the local alignment, CharString.

Matches on the reverse-complement are encoded by the begin position being greater than the begin position.

Data Races

Thread safety unknown!

int readRecord(store, reader, tag);

Read Lastz "general" format record.


store LocalMatchStore object to read into.
stream SinglePassRecordReader to read from.
tag The tag for selecting the format, one of BlastnTabular, LastzGeneral, and StellarGff.


int 0 on success, non-0 on errors and EOF

Data Races

Thread safety unknown!

Member Variables Detail

TCigarString LocalMatchStore::cigarStore

String storing the CIGAR strings.

TMatchStore LocalMatchStore::matchStore

String storing the LocalMatch local matches.

TStringSet LocalMatchStore::sequenceNameStore

StringSet storing the sequence names.