Class BlastMatch
An data structure to hold a blast match, also known as high-scoring segment pair (HSP)

Implements AssignableConcept, CopyConstructibleConcept, DefaultConstructibleConcept, EqualityComparableConcept, LessThanComparableConcept
All Impl'd AssignableConcept, CopyConstructibleConcept, DefaultConstructibleConcept, EqualityComparableConcept, LessThanComparableConcept
Defined in <seqan/blast.h>
Signature struct BlastMatch<TAlign, TPos, TQId, TSId> { ... };

Template Parameters

TAlignRow0 Type of the first alignment row, usually Gaps
TAlignRow1 Type of the second alignment row, usually Gaps
TPos Position type of the sequences, defaults to uint32_t
TQId Type of qId, defaults to std::string
TSId Type of sId, defaults to std::string
TSAccs Type of sAccs, defaults to std::vector of std::string
TSTaxIds Type of sTaxIds, defaults to String of uint32_t

Member Function Overview

Member Functions Inherited From AssignableConcept

Member Functions Inherited From EqualityComparableConcept

Member Functions Inherited From LessThanComparableConcept

Interface Function Overview

Interface Functions Inherited From AssignableConcept

Member Variable Overview

Detailed Description

You should set the following members manually: qId, sId, qLength, sLength, qFrameShift and sFrameShift.

If you then also set valid alignRow-members (alignRow0, alignRow1), you can let the other members be computed by computeAlignmentStats and computeBitScore, computeEValue.

Member Functions Detail

BlastMatch::BlastMatch() BlastMatch::BlastMatch(sId) BlastMatch::BlastMatch(qId, sId) [deprecated]

Constructor, can be called with arguments for qId and sId.

Data Races

Thread safety unknown!

bool BlastMatch::operator< (BlastMatch const & bm2) const

The comparison operator (for sorting by bit-score).

To facilitate fast sorting of matches in a BlastRecord, only the bit-score is compared. Also large bit-score are sorted to front (i.e. operator< on BlastMatch checks operator>= on the bitScores).

Data Races

Thread safety unknown!

Interface Functions Detail

void computeAlignmentStats(blastMatch, context);

Compute the alignStats member of a BlastMatch.

Parameters

blastMatch A BlastMatch that has a valid align member.
context A BlastIOContext with parameters and buffers.

The alignRow-members (alignRow0, alignRow1) are used as in-parameter to compute the alignStats member. This includes the raw score, amount of gaps, mismatches et cetera. This is a prerequisite for printing a match to file or computing it's e-value.

Data Races

Thread safety unknown!

double computeBitScore(blastMatch, context);

Compute the bit-score for a BlastMatch.

Parameters

blastMatch A BlastMatch that has a valid align member.
context A BlastIOContext with parameters and buffers.

Returns

double blastMatch.bitScore after computation

Remarks

This will compute the bit-score for a BlastMatch. At least the following members need to be set before calling this function:

  • blastMatch.alignStats.alignmentScore (if you have valid alignRow-members (alignRow0, alignRow1), you can call computeAlignmentStats to compute the stats member).
  • Data Races

    Thread safety unknown!

    double computeEValue(blastMatch, context);

    Compute the E-Value for a BlastMatch.

    Parameters

    blastMatch A BlastMatch that has a valid align member.
    context A BlastIOContext with parameters and buffers.

    Returns

    double blastMatch.eValue after computation

    Remarks

    This will compute the e-value for a BlastMatch. At least the following members need to be set before calling this function:

  • blastMatch.alignStats.alignmentScore (if you have valid alignRow-members (alignRow0, alignRow1), you can call computeAlignmentStats to compute the stats member).
  • blastMatch.qLength
  • context.dbTotalLength
  • Note, that in contrast to the general interface (computeEValue), this interface caches some computation steps in the context and is therefore faster.

    Data Races

    Thread safety unknown!

    Member Variables Detail

    TAlign BlastMatch::alignRow0

    First alignment row (Gaps object).

    TAlign BlastMatch::alignRow1

    Second alignment row (Gaps object).

    AlignmentStats BlastMatch::alignStats

    An AlignmentStats object holding further stats of the alignment.

    double BlastMatch::bitScore

    The bit-score of the alignment.

    double BlastMatch::eValue

    The e-value of the alignment.

    TPos BlastMatch::qEnd

    The end of the alignment on the (possibly translated) query sequence.

    char BlastMatch::qFrameShift

    An indicator for query frame and query strand.

    one out of { -3, -2, -1, +1, +2, +3 } where the absolute value - 1 is the shift of the translation frame and a negative sign indicates the reverse complement strand [query sequence, only applies for BlastFormatProgram == BLASTX | TBLASTX]; -1 implies reverse complement for BLASTN.

    TQId BlastMatch::qId

    The verbose Id of the query.

    TPos BlastMatch::qLength

    The length of the original query sequence (possibly before translation).

    TPos BlastMatch::qStart

    The start of the alignment on the (possibly translated) query sequence.

    TSId BlastMatch::sAccs

    The Accession number(s) of the subject.

    TPos BlastMatch::sEnd

    The end of the alignment on the (possibly translated) subject sequence.

    char BlastMatch::sFrameShift

    An indicator for subject frame and subject strand.

    one out of { -3, -2, -1, +1, +2, +3 } where the absolute value - 1 is the shift of the translation frame and a negative sign indicates the reverse complement strand [subject sequence, only applies for BlastFormatProgram == TBLASTN | TBLASTX].

    TSId BlastMatch::sId

    The verbose Id of the subject.

    TPos BlastMatch::sLength

    The length of the original subject sequence (possibly before translation).

    TPos BlastMatch::sStart

    The start of the alignment on the (possibly translated) subject sequence.

    TSId BlastMatch::sTaxIds

    The taxonomic ID(s) of the subject.