mems::PairwiseMatchAdapter Class Reference

PairwiseMatchAdapter is a wrapper around an AbstractMatch that effectively projects a multi-match to a pairwise match. More...

#include <PairwiseMatchAdapter.h>

Inheritance diagram for mems::PairwiseMatchAdapter:

Inheritance graph
[legend]
Collaboration diagram for mems::PairwiseMatchAdapter:

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

PairwiseMatchAdapterClone () const
PairwiseMatchAdapterCopy () const
 creates a copy of this using a boost::pool::fast_pool_allocator

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

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

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

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

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

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

void GetAlignment (std::vector< mems::bitset_t > &align_matrix) const
void GetColumn (gnSeqI col, std::vector< gnSeqI > &pos, std::vector< bool > &column) const
 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.

void Invert ()
 Inverts the coordinates of this match.

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

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

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

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

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

uint Multiplicity () const
 Returns the multiplicity of the match.

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

 PairwiseMatchAdapter (AbstractMatch *match, uint seq1, uint seq2)
 PairwiseMatchAdapter ()
uint SeqCount () const
 Returns the number of sequences in the alignment which contains this match.

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

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

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

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

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

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


Public Attributes

bool inverted
AbstractMatchm
uint seq [2]
TrackingMatchtm

Detailed Description

PairwiseMatchAdapter is a wrapper around an AbstractMatch that effectively projects a multi-match to a pairwise match.

The adapter class forwards most function calls to the original match class, to which it stores a pointer. Use of non-const functions results in undefined state.

Definition at line 15 of file PairwiseMatchAdapter.h.


Constructor & Destructor Documentation

mems::PairwiseMatchAdapter::PairwiseMatchAdapter  )  [inline]
 

Definition at line 18 of file PairwiseMatchAdapter.h.

Referenced by Clone().

mems::PairwiseMatchAdapter::PairwiseMatchAdapter AbstractMatch match,
uint  seq1,
uint  seq2
[inline]
 

Definition at line 19 of file PairwiseMatchAdapter.h.

References inverted, and uint.


Member Function Documentation

gnSeqI mems::PairwiseMatchAdapter::AlignmentLength  )  const [inline, virtual]
 

Returns the total length of this alignment in columns.

Implements mems::AbstractMatch.

Definition at line 64 of file PairwiseMatchAdapter.h.

References mems::AbstractMatch::AlignmentLength().

PairwiseMatchAdapter* mems::PairwiseMatchAdapter::Clone  )  const [inline]
 

Definition at line 27 of file PairwiseMatchAdapter.h.

References PairwiseMatchAdapter().

PairwiseMatchAdapter* mems::PairwiseMatchAdapter::Copy  )  const [inline, virtual]
 

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

Implements mems::AbstractMatch.

Definition at line 29 of file PairwiseMatchAdapter.h.

References mems::m_allocateAndCopy().

Referenced by mems::getPairwiseLCBs().

void mems::PairwiseMatchAdapter::CropEnd gnSeqI  crop_amount  )  [inline, virtual]
 

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

Implements mems::AbstractMatch.

Definition at line 67 of file PairwiseMatchAdapter.h.

References mems::AbstractMatch::CropEnd().

void mems::PairwiseMatchAdapter::CropLeft gnSeqI  crop_amount,
uint  seqI
[inline, virtual]
 

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

Implements mems::AbstractMatch.

Definition at line 68 of file PairwiseMatchAdapter.h.

References mems::AbstractMatch::CropLeft(), and uint.

void mems::PairwiseMatchAdapter::CropRight gnSeqI  crop_amount,
uint  seqI
[inline, virtual]
 

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

Implements mems::AbstractMatch.

Definition at line 69 of file PairwiseMatchAdapter.h.

References mems::AbstractMatch::CropRight(), and uint.

void mems::PairwiseMatchAdapter::CropStart gnSeqI  crop_amount  )  [inline, virtual]
 

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

Implements mems::AbstractMatch.

Definition at line 66 of file PairwiseMatchAdapter.h.

References mems::AbstractMatch::CropStart().

uint mems::PairwiseMatchAdapter::FirstStart  )  const [inline, virtual]
 

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

Implements mems::AbstractMatch.

Definition at line 63 of file PairwiseMatchAdapter.h.

References uint.

void mems::PairwiseMatchAdapter::Free  )  [inline, virtual]
 

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

Implements mems::AbstractMatch.

Definition at line 34 of file PairwiseMatchAdapter.h.

References mems::m_free().

void mems::PairwiseMatchAdapter::GetAlignment std::vector< mems::bitset_t > &  align_matrix  )  const [inline]
 

Definition at line 70 of file PairwiseMatchAdapter.h.

References mems::AbstractMatch::GetAlignment(), mems::AbstractMatch::Invert(), and inverted.

void mems::PairwiseMatchAdapter::GetColumn gnSeqI  col,
std::vector< gnSeqI > &  pos,
std::vector< bool > &  column
const [inline, 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.

Implements mems::AbstractMatch.

Definition at line 82 of file PairwiseMatchAdapter.h.

References mems::AbstractMatch::GetColumn(), mems::AbstractMatch::Invert(), and inverted.

void mems::PairwiseMatchAdapter::Invert  )  [inline, virtual]
 

Inverts the coordinates of this match.

Implements mems::AbstractMatch.

Definition at line 65 of file PairwiseMatchAdapter.h.

References inverted.

Referenced by mems::getPairwiseLCBs().

bool mems::PairwiseMatchAdapter::IsGap uint  seqI,
gnSeqI  col
const [inline, virtual]
 

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

Implements mems::AbstractMatch.

Definition at line 98 of file PairwiseMatchAdapter.h.

References mems::AbstractMatch::IsGap(), and uint.

gnSeqI mems::PairwiseMatchAdapter::LeftEnd uint  seqI  )  const [inline, virtual]
 

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

Implements mems::AbstractMatch.

Definition at line 50 of file PairwiseMatchAdapter.h.

References mems::AbstractMatch::LeftEnd(), and uint.

gnSeqI mems::PairwiseMatchAdapter::Length uint  seqI  )  const [inline, virtual]
 

Returns the length of this match.

Implements mems::AbstractMatch.

Definition at line 42 of file PairwiseMatchAdapter.h.

References mems::AbstractMatch::Length(), and uint.

void mems::PairwiseMatchAdapter::MoveEnd int64  move_amount  )  [inline, virtual]
 

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

Implements mems::AbstractMatch.

Definition at line 60 of file PairwiseMatchAdapter.h.

References mems::AbstractMatch::MoveEnd().

void mems::PairwiseMatchAdapter::MoveStart int64  move_amount  )  [inline, virtual]
 

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

Implements mems::AbstractMatch.

Definition at line 59 of file PairwiseMatchAdapter.h.

References mems::AbstractMatch::MoveStart().

uint mems::PairwiseMatchAdapter::Multiplicity  )  const [inline, virtual]
 

Returns the multiplicity of the match.

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

Implements mems::AbstractMatch.

Definition at line 61 of file PairwiseMatchAdapter.h.

References uint.

orientation mems::PairwiseMatchAdapter::Orientation uint  seqI  )  const [inline, virtual]
 

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

Implements mems::AbstractMatch.

Definition at line 51 of file PairwiseMatchAdapter.h.

References inverted, mems::AbstractMatch::Orientation(), and uint.

Referenced by mems::getPairwiseLCBs().

uint mems::PairwiseMatchAdapter::SeqCount  )  const [inline, virtual]
 

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

Implements mems::AbstractMatch.

Definition at line 62 of file PairwiseMatchAdapter.h.

References uint.

void mems::PairwiseMatchAdapter::SetLeftEnd uint  seqI,
gnSeqI  start
[inline, virtual]
 

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

Implements mems::AbstractMatch.

Definition at line 57 of file PairwiseMatchAdapter.h.

References mems::AbstractMatch::SetLeftEnd(), and uint.

void mems::PairwiseMatchAdapter::SetLength gnSeqI  len,
uint  seqI
[inline, virtual]
 

Sets the length of this match to.

Parameters:
len 

Implements mems::AbstractMatch.

Definition at line 43 of file PairwiseMatchAdapter.h.

References mems::AbstractMatch::SetLength(), and uint.

void mems::PairwiseMatchAdapter::SetOrientation uint  seqI,
orientation  o
[inline, virtual]
 

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

Implements mems::AbstractMatch.

Definition at line 58 of file PairwiseMatchAdapter.h.

References mems::AbstractMatch::SetOrientation(), and uint.

void mems::PairwiseMatchAdapter::SetStart uint  seqI,
int64  start
[inline, virtual]
 

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

Parameters:
seqI of this match to
start 

Implements mems::AbstractMatch.

Definition at line 49 of file PairwiseMatchAdapter.h.

References mems::AbstractMatch::SetStart(), and uint.

int64 mems::PairwiseMatchAdapter::Start uint  startI  )  const [inline, virtual]
 

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

Returns the start coordinate of this match in sequence

Parameters:
startI 

Implements mems::AbstractMatch.

Definition at line 44 of file PairwiseMatchAdapter.h.

References inverted, mems::AbstractMatch::Start(), and uint.

uint mems::PairwiseMatchAdapter::UsedSeq uint  seqI  )  const [inline, virtual]
 

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

Implements mems::AbstractMatch.

Definition at line 99 of file PairwiseMatchAdapter.h.

References mems::AbstractMatch::Start(), and uint.


Member Data Documentation

bool mems::PairwiseMatchAdapter::inverted
 

Definition at line 111 of file PairwiseMatchAdapter.h.

Referenced by GetAlignment(), GetColumn(), Invert(), Orientation(), PairwiseMatchAdapter(), and Start().

AbstractMatch* mems::PairwiseMatchAdapter::m
 

Definition at line 108 of file PairwiseMatchAdapter.h.

uint mems::PairwiseMatchAdapter::seq[2]
 

Definition at line 110 of file PairwiseMatchAdapter.h.

TrackingMatch* mems::PairwiseMatchAdapter::tm
 

Definition at line 109 of file PairwiseMatchAdapter.h.

Referenced by mems::getPairwiseLCBs().


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