mems::AbstractMatch Class Reference

AbstractMatch is a pure virtual base class that defines an interface for both gapped and ungapped alignments among several sequences or several regions of the same sequence. More...

#include <AbstractMatch.h>

Inheritance diagram for mems::AbstractMatch:

Inheritance graph
[legend]
List of all members.

Public Types

enum  orientation { forward, reverse, undefined }

Public Member Functions

virtual gnSeqI AlignmentLength () const=0
 Returns the total length of this alignment in columns.

virtual AbstractMatchCopy () const=0
 creates a copy of this using a boost::pool::fast_pool_allocator

virtual void CropEnd (gnSeqI crop_amount)=0
 Deprecated: Use CropLeft and CropRight instead Removes the last crop_amount base pairs from the end of the match.

virtual void CropLeft (gnSeqI crop_amount, uint seqI)=0
 Crop this match from the left Removes the first crop_amount positions from the left side of the match.

virtual void CropRight (gnSeqI crop_amount, uint seqI)=0
 Crop this match from the right Removes the last crop_amount positions from the right side of the match.

virtual void CropStart (gnSeqI crop_amount)=0
 Deprecated: Use CropLeft and CropRight instead Removes the first crop_amount base pairs from the beginning of the match.

virtual int64 End (uint seqI) const
 Deprecated: use RightEnd() instead Returns the last coordinate of this match in sequence.

virtual uint FirstStart () const=0
 Returns the index of the first sequence this match occurs in.

virtual void Free ()=0
 frees storage used by this object in a boost::pool::fast_pool_allocator

virtual void GetAlignment (std::vector< bitset_t > &align_matrix) const=0
 Gets a copy of the alignment as an array of dynamic_bitsets.

virtual void GetColumn (gnSeqI col, std::vector< gnSeqI > &pos, std::vector< bool > &column) const=0
 Given an alignment column index, this function returns the corresponding sequence coordinates and whether each sequence is aligned in that column If a given sequence is not represented in the requested column, the position returned in pos should be that of the first nucleotide to the left of the requested column.

virtual void Invert ()=0
 Inverts the coordinates of this match.

virtual bool IsGap (uint seq, gnSeqI col) const=0
 returns true if the given row,column of the alignment has a gap character

virtual gnSeqI LeftEnd (uint seqI) const=0
 Returns the left end coordinate of this match at the seqI'th matching position/sequence.

virtual gnSeqI Length (uint seqI) const=0
 Returns the length of this match.

virtual void MoveEnd (int64 move_amount)=0
 Shift the left-end coordinates in reverse oriented positions by a given amount.

virtual void MoveStart (int64 move_amount)=0
 Shift the left-end coordinates in forward oriented positions by a given amount.

virtual uint Multiplicity () const=0
 Returns the multiplicity of the match.

int64 operator[] (uint seqI) const
 Deprecated: use LeftEnd() instead Returns the start coordinate of this match in sequence.

virtual orientation Orientation (uint seqI) const=0
 Returns the orientation of this match at the startI'th matching position/sequence, either AbstractMatch::forward or AbstractMatch::reverse.

virtual gnSeqI RightEnd (uint seqI) const
 Returns the right-end coordinate of this match at the seqI'th matching position/sequence (equal to LeftEnd(seqI) + Length(seqI) - 1).

virtual uint SeqCount () const=0
 Returns the number of sequences in the alignment which contains this match.

virtual void SetLeftEnd (uint seqI, gnSeqI start)=0
 sets the left end coordinate of this match in the seqI'th matching position/sequence

virtual void SetLength (gnSeqI len, uint seqI)=0
 Sets the length of this match to.

virtual void SetOrientation (uint seqI, orientation o)=0
 sets the relative orientation of this match in the seqI'th matching position/sequence

virtual void SetStart (uint seqI, int64 start)=0
 Deprecated: use SetLeftEnd() and SetOrientation instead Sets the start in sequence.

virtual int64 Start (uint startI) const=0
 Deprecated: use LeftEnd() and Orientation() instead.

virtual uint UsedSeq (uint seqI) const=0
 Returns the id of the i-th defined sequence in this match.


Detailed Description

AbstractMatch is a pure virtual base class that defines an interface for both gapped and ungapped alignments among several sequences or several regions of the same sequence.

Definition at line 256 of file AbstractMatch.h.


Member Enumeration Documentation

enum mems::AbstractMatch::orientation
 

Enumeration values:
forward  the alignment is on the forward strand
reverse  alignment on the reverse strand
undefined  there is no alignment on either strand

Definition at line 259 of file AbstractMatch.h.


Member Function Documentation

virtual gnSeqI mems::AbstractMatch::AlignmentLength  )  const [pure virtual]
 

Returns the total length of this alignment in columns.

Implemented in mems::MatchProjectionAdapter, mems::PairwiseMatchAdapter, mems::AbstractGappedAlignment< SparseAbstractMatch<> >, mems::UngappedLocalAlignment< mems::HybridAbstractMatch<> >, and mems::UngappedLocalAlignment< HybridAbstractMatch<> >.

Referenced by mems::PairwiseMatchAdapter::AlignmentLength(), mems::MatchProjectionAdapter::AlignmentLength(), and mems::GenericInterval< GappedBaseImpl >::Marble().

virtual AbstractMatch* mems::AbstractMatch::Copy  )  const [pure virtual]
 

creates a copy of this using a boost::pool::fast_pool_allocator

Implemented in mems::GappedAlignment, mems::MatchProjectionAdapter, mems::PairwiseMatchAdapter, mems::UngappedLocalAlignment< mems::HybridAbstractMatch<> >, and mems::UngappedLocalAlignment< HybridAbstractMatch<> >.

Referenced by mems::GenericInterval< GappedBaseImpl >::add(), mems::MatchProjectionAdapter::MatchProjectionAdapter(), and mems::MatchProjectionAdapter::operator=().

virtual void mems::AbstractMatch::CropEnd gnSeqI  crop_amount  )  [pure virtual]
 

Deprecated: Use CropLeft and CropRight instead Removes the last crop_amount base pairs from the end of the match.

Implemented in mems::GappedAlignment, mems::MatchProjectionAdapter, mems::PairwiseMatchAdapter, mems::UngappedLocalAlignment< mems::HybridAbstractMatch<> >, and mems::UngappedLocalAlignment< HybridAbstractMatch<> >.

Referenced by mems::PairwiseMatchAdapter::CropEnd(), mems::MatchProjectionAdapter::CropEnd(), and mems::GenericInterval< GappedBaseImpl >::Marble().

virtual void mems::AbstractMatch::CropLeft gnSeqI  crop_amount,
uint  seqI
[pure virtual]
 

Crop this match from the left Removes the first crop_amount positions from the left side of the match.

Implemented in mems::GappedAlignment, mems::MatchProjectionAdapter, mems::PairwiseMatchAdapter, mems::UngappedLocalAlignment< mems::HybridAbstractMatch<> >, and mems::UngappedLocalAlignment< HybridAbstractMatch<> >.

Referenced by mems::PairwiseMatchAdapter::CropLeft(), and mems::MatchProjectionAdapter::CropLeft().

virtual void mems::AbstractMatch::CropRight gnSeqI  crop_amount,
uint  seqI
[pure virtual]
 

Crop this match from the right Removes the last crop_amount positions from the right side of the match.

Implemented in mems::GappedAlignment, mems::MatchProjectionAdapter, mems::PairwiseMatchAdapter, mems::UngappedLocalAlignment< mems::HybridAbstractMatch<> >, and mems::UngappedLocalAlignment< HybridAbstractMatch<> >.

Referenced by mems::PairwiseMatchAdapter::CropRight(), and mems::MatchProjectionAdapter::CropRight().

virtual void mems::AbstractMatch::CropStart gnSeqI  crop_amount  )  [pure virtual]
 

Deprecated: Use CropLeft and CropRight instead Removes the first crop_amount base pairs from the beginning of the match.

Implemented in mems::GappedAlignment, mems::MatchProjectionAdapter, mems::PairwiseMatchAdapter, mems::UngappedLocalAlignment< mems::HybridAbstractMatch<> >, and mems::UngappedLocalAlignment< HybridAbstractMatch<> >.

Referenced by mems::PairwiseMatchAdapter::CropStart(), and mems::MatchProjectionAdapter::CropStart().

int64 mems::AbstractMatch::End uint  seqI  )  const [inline, virtual]
 

Deprecated: use RightEnd() instead Returns the last coordinate of this match in sequence.

Parameters:
seqI 

Definition at line 378 of file AbstractMatch.h.

References mems::NO_MATCH.

Referenced by mems::MuscleInterface::Align().

virtual uint mems::AbstractMatch::FirstStart  )  const [pure virtual]
 

Returns the index of the first sequence this match occurs in.

Implemented in mems::DenseAbstractMatch< MAX_SEQS >, mems::HybridAbstractMatch< FIXED_SEQ_COUNT, int64Alloc, uintAlloc >, mems::MatchProjectionAdapter, mems::PairwiseMatchAdapter, mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >, mems::HybridAbstractMatch<>, and mems::SparseAbstractMatch<>.

Referenced by mems::MatchLeftEndComparator::operator()().

virtual void mems::AbstractMatch::Free  )  [pure virtual]
 

frees storage used by this object in a boost::pool::fast_pool_allocator

Implemented in mems::GappedAlignment, mems::MatchProjectionAdapter, mems::PairwiseMatchAdapter, mems::UngappedLocalAlignment< mems::HybridAbstractMatch<> >, and mems::UngappedLocalAlignment< HybridAbstractMatch<> >.

Referenced by mems::MatchProjectionAdapter::operator=(), and mems::MatchProjectionAdapter::~MatchProjectionAdapter().

virtual void mems::AbstractMatch::GetAlignment std::vector< bitset_t > &  align_matrix  )  const [pure virtual]
 

Gets a copy of the alignment as an array of dynamic_bitsets.

Implemented in mems::GappedAlignment, mems::UngappedLocalAlignment< mems::HybridAbstractMatch<> >, and mems::UngappedLocalAlignment< HybridAbstractMatch<> >.

Referenced by mems::PairwiseMatchAdapter::GetAlignment(), mems::MatchProjectionAdapter::GetAlignment(), and mems::GetAlignment().

virtual void mems::AbstractMatch::GetColumn gnSeqI  col,
std::vector< gnSeqI > &  pos,
std::vector< bool > &  column
const [pure virtual]
 

Given an alignment column index, this function returns the corresponding sequence coordinates and whether each sequence is aligned in that column If a given sequence is not represented in the requested column, the position returned in pos should be that of the first nucleotide to the left of the requested column.

If no nucleotides exist to the left of the requested column, then a NO_MATCH is returned in pos for that sequence.

Implemented in mems::GappedAlignment, mems::MatchProjectionAdapter, mems::PairwiseMatchAdapter, mems::UngappedLocalAlignment< mems::HybridAbstractMatch<> >, and mems::UngappedLocalAlignment< HybridAbstractMatch<> >.

Referenced by mems::PairwiseMatchAdapter::GetColumn(), and mems::MatchProjectionAdapter::GetColumn().

virtual void mems::AbstractMatch::Invert  )  [pure virtual]
 

Inverts the coordinates of this match.

Implemented in mems::DenseAbstractMatch< MAX_SEQS >, mems::GappedAlignment, mems::HybridAbstractMatch< FIXED_SEQ_COUNT, int64Alloc, uintAlloc >, mems::MatchProjectionAdapter, mems::PairwiseMatchAdapter, mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >, mems::HybridAbstractMatch<>, and mems::SparseAbstractMatch<>.

Referenced by mems::PairwiseMatchAdapter::GetAlignment(), mems::PairwiseMatchAdapter::GetColumn(), and mems::MatchProjectionAdapter::Invert().

virtual bool mems::AbstractMatch::IsGap uint  seq,
gnSeqI  col
const [pure virtual]
 

returns true if the given row,column of the alignment has a gap character

Implemented in mems::GappedAlignment, mems::MatchProjectionAdapter, mems::PairwiseMatchAdapter, mems::UngappedLocalAlignment< mems::HybridAbstractMatch<> >, and mems::UngappedLocalAlignment< HybridAbstractMatch<> >.

Referenced by mems::PairwiseMatchAdapter::IsGap(), and mems::MatchProjectionAdapter::IsGap().

virtual gnSeqI mems::AbstractMatch::LeftEnd uint  seqI  )  const [pure virtual]
 

Returns the left end coordinate of this match at the seqI'th matching position/sequence.

Implemented in mems::DenseAbstractMatch< MAX_SEQS >, mems::HybridAbstractMatch< FIXED_SEQ_COUNT, int64Alloc, uintAlloc >, mems::MatchProjectionAdapter, mems::PairwiseMatchAdapter, mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >, mems::HybridAbstractMatch<>, and mems::SparseAbstractMatch<>.

Referenced by mems::checkConsistent(), mems::GetAlignment(), mems::getInterveningCoordinates(), mems::PairwiseMatchAdapter::LeftEnd(), mems::MatchProjectionAdapter::LeftEnd(), mems::MatchProjectionAdapter::Multiplicity(), and mems::ProgressiveAligner::pairwiseScoreTrackingMatches().

virtual gnSeqI mems::AbstractMatch::Length uint  seqI  )  const [pure virtual]
 

Returns the length of this match.

Implemented in mems::MatchProjectionAdapter, mems::PairwiseMatchAdapter, mems::AbstractGappedAlignment< SparseAbstractMatch<> >, mems::UngappedLocalAlignment< mems::HybridAbstractMatch<> >, and mems::UngappedLocalAlignment< HybridAbstractMatch<> >.

Referenced by mems::MuscleInterface::Align(), mems::GetAlignment(), mems::PairwiseMatchAdapter::Length(), and mems::MatchProjectionAdapter::Length().

virtual void mems::AbstractMatch::MoveEnd int64  move_amount  )  [pure virtual]
 

Shift the left-end coordinates in reverse oriented positions by a given amount.

Implemented in mems::DenseAbstractMatch< MAX_SEQS >, mems::HybridAbstractMatch< FIXED_SEQ_COUNT, int64Alloc, uintAlloc >, mems::MatchProjectionAdapter, mems::PairwiseMatchAdapter, mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >, mems::HybridAbstractMatch<>, and mems::SparseAbstractMatch<>.

Referenced by mems::PairwiseMatchAdapter::MoveEnd(), and mems::MatchProjectionAdapter::MoveEnd().

virtual void mems::AbstractMatch::MoveStart int64  move_amount  )  [pure virtual]
 

Shift the left-end coordinates in forward oriented positions by a given amount.

Implemented in mems::DenseAbstractMatch< MAX_SEQS >, mems::HybridAbstractMatch< FIXED_SEQ_COUNT, int64Alloc, uintAlloc >, mems::MatchProjectionAdapter, mems::PairwiseMatchAdapter, mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >, mems::HybridAbstractMatch<>, and mems::SparseAbstractMatch<>.

Referenced by mems::PairwiseMatchAdapter::MoveStart(), and mems::MatchProjectionAdapter::MoveStart().

virtual uint mems::AbstractMatch::Multiplicity  )  const [pure virtual]
 

Returns the multiplicity of the match.

e.g. the number of sequences this match occurs in

Implemented in mems::DenseAbstractMatch< MAX_SEQS >, mems::HybridAbstractMatch< FIXED_SEQ_COUNT, int64Alloc, uintAlloc >, mems::MatchProjectionAdapter, mems::PairwiseMatchAdapter, mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >, mems::HybridAbstractMatch<>, and mems::SparseAbstractMatch<>.

Referenced by mems::MuscleInterface::Align().

int64 mems::AbstractMatch::operator[] uint  seqI  )  const [inline]
 

Deprecated: use LeftEnd() instead Returns the start coordinate of this match in sequence.

Parameters:
seqI 

Definition at line 287 of file AbstractMatch.h.

References mems::MatchStartComparator< MatchType >::m_seq.

virtual orientation mems::AbstractMatch::Orientation uint  seqI  )  const [pure virtual]
 

Returns the orientation of this match at the startI'th matching position/sequence, either AbstractMatch::forward or AbstractMatch::reverse.

Implemented in mems::DenseAbstractMatch< MAX_SEQS >, mems::HybridAbstractMatch< FIXED_SEQ_COUNT, int64Alloc, uintAlloc >, mems::MatchProjectionAdapter, mems::PairwiseMatchAdapter, mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >, mems::HybridAbstractMatch<>, and mems::SparseAbstractMatch<>.

Referenced by mems::GetAlignment(), mems::PairwiseMatchAdapter::Orientation(), and mems::MatchProjectionAdapter::Orientation().

virtual gnSeqI mems::AbstractMatch::RightEnd uint  seqI  )  const [inline, virtual]
 

Returns the right-end coordinate of this match at the seqI'th matching position/sequence (equal to LeftEnd(seqI) + Length(seqI) - 1).

Definition at line 298 of file AbstractMatch.h.

Referenced by mems::GappedAlignment::GetColumn(), mems::getInterveningCoordinates(), and mems::printMatch().

virtual uint mems::AbstractMatch::SeqCount  )  const [pure virtual]
 

Returns the number of sequences in the alignment which contains this match.

Implemented in mems::DenseAbstractMatch< MAX_SEQS >, mems::HybridAbstractMatch< FIXED_SEQ_COUNT, int64Alloc, uintAlloc >, mems::MatchProjectionAdapter, mems::PairwiseMatchAdapter, mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >, mems::HybridAbstractMatch<>, and mems::SparseAbstractMatch<>.

Referenced by mems::checkConsistent(), mems::MatchLeftEndComparator::operator()(), and mems::printMatch().

virtual void mems::AbstractMatch::SetLeftEnd uint  seqI,
gnSeqI  start
[pure virtual]
 

sets the left end coordinate of this match in the seqI'th matching position/sequence

Implemented in mems::DenseAbstractMatch< MAX_SEQS >, mems::HybridAbstractMatch< FIXED_SEQ_COUNT, int64Alloc, uintAlloc >, mems::MatchProjectionAdapter, mems::PairwiseMatchAdapter, mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >, mems::HybridAbstractMatch<>, and mems::SparseAbstractMatch<>.

Referenced by mems::PairwiseMatchAdapter::SetLeftEnd(), and mems::MatchProjectionAdapter::SetLeftEnd().

virtual void mems::AbstractMatch::SetLength gnSeqI  len,
uint  seqI
[pure virtual]
 

Sets the length of this match to.

Parameters:
len 

Implemented in mems::MatchProjectionAdapter, mems::PairwiseMatchAdapter, mems::AbstractGappedAlignment< SparseAbstractMatch<> >, mems::UngappedLocalAlignment< mems::HybridAbstractMatch<> >, and mems::UngappedLocalAlignment< HybridAbstractMatch<> >.

Referenced by mems::PairwiseMatchAdapter::SetLength(), and mems::MatchProjectionAdapter::SetLength().

virtual void mems::AbstractMatch::SetOrientation uint  seqI,
orientation  o
[pure virtual]
 

sets the relative orientation of this match in the seqI'th matching position/sequence

Implemented in mems::DenseAbstractMatch< MAX_SEQS >, mems::HybridAbstractMatch< FIXED_SEQ_COUNT, int64Alloc, uintAlloc >, mems::MatchProjectionAdapter, mems::PairwiseMatchAdapter, mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >, mems::HybridAbstractMatch<>, and mems::SparseAbstractMatch<>.

Referenced by mems::PairwiseMatchAdapter::SetOrientation(), and mems::MatchProjectionAdapter::SetOrientation().

virtual void mems::AbstractMatch::SetStart uint  seqI,
int64  start
[pure virtual]
 

Deprecated: use SetLeftEnd() and SetOrientation instead Sets the start in sequence.

Parameters:
seqI of this match to
start 

Implemented in mems::DenseAbstractMatch< MAX_SEQS >, mems::HybridAbstractMatch< FIXED_SEQ_COUNT, int64Alloc, uintAlloc >, mems::MatchProjectionAdapter, mems::PairwiseMatchAdapter, mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >, mems::HybridAbstractMatch<>, and mems::SparseAbstractMatch<>.

Referenced by mems::PairwiseMatchAdapter::SetStart(), and mems::MatchProjectionAdapter::SetStart().

virtual int64 mems::AbstractMatch::Start uint  startI  )  const [pure virtual]
 

Deprecated: use LeftEnd() and Orientation() instead.

Returns the start coordinate of this match in sequence

Parameters:
startI 

Implemented in mems::DenseAbstractMatch< MAX_SEQS >, mems::HybridAbstractMatch< FIXED_SEQ_COUNT, int64Alloc, uintAlloc >, mems::MatchProjectionAdapter, mems::PairwiseMatchAdapter, mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >, mems::HybridAbstractMatch<>, and mems::SparseAbstractMatch<>.

Referenced by mems::MuscleInterface::Align(), mems::checkConsistent(), mems::MatchLeftEndComparator::operator()(), mems::printMatch(), mems::PairwiseMatchAdapter::Start(), mems::MatchProjectionAdapter::Start(), mems::PairwiseMatchAdapter::UsedSeq(), and mems::MatchProjectionAdapter::UsedSeq().

virtual uint mems::AbstractMatch::UsedSeq uint  seqI  )  const [pure virtual]
 

Returns the id of the i-th defined sequence in this match.

Implemented in mems::DenseAbstractMatch< MAX_SEQS >, mems::HybridAbstractMatch< FIXED_SEQ_COUNT, int64Alloc, uintAlloc >, mems::MatchProjectionAdapter, mems::PairwiseMatchAdapter, mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >, mems::HybridAbstractMatch<>, and mems::SparseAbstractMatch<>.


The documentation for this class was generated from the following file:
Generated on Fri Mar 14 06:01:38 2008 for libMems by doxygen 1.3.6