mems::GappedAlignment Class Reference

#include <GappedAlignment.h>

Inheritance diagram for mems::GappedAlignment:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

GappedAlignmentClone () const
GappedAlignmentCopy () const
 creates a copy of this using a boost::pool::fast_pool_allocator

virtual void CropEnd (gnSeqI crop_amount)
 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)
 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)
 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)
 Deprecated: Use CropLeft and CropRight instead Removes the first crop_amount base pairs from the beginning of the match.

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

 GappedAlignment (uint seq_count, gnSeqI align_length)
 GappedAlignment ()
void GetAlignment (std::vector< bitset_t > &align_matrix) const
 Gets a copy of the alignment as an array of dynamic_bitsets.

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.

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

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

void SetAlignment (const std::vector< std::string > &seq_align)
 Sets the alignment.

virtual AbstractMatchSplit (gnSeqI before_column)
 Splits the alignment before the specified column.

void swap (GappedAlignment &other)

Protected Member Functions

void CropEndCoords (gnSeqI crop_amount)
void CropStartCoords (gnSeqI crop_amount)
void swap (GappedAlignment *other)

Protected Attributes

std::vector< std::string > align_matrix

Friends

const std::vector< std::string > & GetAlignment (const GappedAlignment &ga, const std::vector< genome::gnSequence * > &seq_table)
std::ostream & operator<< (std::ostream &os, const GappedAlignment &ga)
 Writes this GappedAlignment to the specified output stream (e.g.

std::istream & operator>> (std::istream &is, GappedAlignment &ga)
 Reads a GappedAlignment from the specified input stream (e.g.


Constructor & Destructor Documentation

mems::GappedAlignment::GappedAlignment  ) 
 

Definition at line 23 of file GappedAlignment.cpp.

Referenced by Clone().

mems::GappedAlignment::GappedAlignment uint  seq_count,
gnSeqI  align_length
 

Definition at line 27 of file GappedAlignment.cpp.

References uint.


Member Function Documentation

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

Definition at line 31 of file GappedAlignment.h.

References GappedAlignment().

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

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

Implements mems::AbstractMatch.

Definition at line 86 of file GappedAlignment.h.

References mems::m_allocateAndCopy().

Referenced by mems::AlignLCBInParallel(), mems::removeLargeGapsPP(), and Split().

void mems::GappedAlignment::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 150 of file GappedAlignment.h.

References mems::AbstractGappedAlignment< SparseAbstractMatch<> >::AlignmentLength(), CropEndCoords(), mems::SparseAbstractMatch<>::SeqCount(), std::swap(), and uint.

Referenced by CropLeft(), and Split().

void mems::GappedAlignment::CropEndCoords gnSeqI  crop_amount  )  [inline, protected]
 

Definition at line 131 of file GappedAlignment.h.

References mems::AbstractGappedAlignment< SparseAbstractMatch<> >::AlignmentLength(), mems::AbstractGappedAlignment< SparseAbstractMatch<> >::Length(), mems::SparseAbstractMatch<>::SeqCount(), mems::AbstractGappedAlignment< SparseAbstractMatch<> >::SetAlignmentLength(), mems::SparseAbstractMatch<>::SetLeftEnd(), mems::AbstractGappedAlignment< SparseAbstractMatch<> >::SetLength(), mems::SparseAbstractMatch<>::SetStart(), mems::SparseAbstractMatch<>::Start(), and uint.

Referenced by CropEnd().

void mems::GappedAlignment::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 165 of file GappedAlignment.h.

References mems::AbstractGappedAlignment< SparseAbstractMatch<> >::AlignmentLength(), CropEnd(), CropStart(), mems::SparseAbstractMatch<>::Orientation(), and uint.

Referenced by CropRight().

void mems::GappedAlignment::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 186 of file GappedAlignment.h.

References CropLeft(), Invert(), and uint.

void mems::GappedAlignment::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 123 of file GappedAlignment.h.

References CropStartCoords(), mems::SparseAbstractMatch<>::SeqCount(), and uint.

Referenced by CropLeft().

void mems::GappedAlignment::CropStartCoords gnSeqI  crop_amount  )  [inline, protected]
 

Definition at line 105 of file GappedAlignment.h.

References mems::AbstractGappedAlignment< SparseAbstractMatch<> >::AlignmentLength(), mems::AbstractGappedAlignment< SparseAbstractMatch<> >::Length(), mems::SparseAbstractMatch<>::SeqCount(), mems::AbstractGappedAlignment< SparseAbstractMatch<> >::SetAlignmentLength(), mems::SparseAbstractMatch<>::SetLeftEnd(), mems::AbstractGappedAlignment< SparseAbstractMatch<> >::SetLength(), mems::SparseAbstractMatch<>::SetStart(), mems::SparseAbstractMatch<>::Start(), and uint.

Referenced by CropStart(), and Split().

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

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

Implements mems::AbstractMatch.

Definition at line 91 of file GappedAlignment.h.

References mems::m_free().

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

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

Implements mems::AbstractMatch.

Definition at line 195 of file GappedAlignment.h.

References mems::bitset_t, and mems::SparseAbstractMatch<>::LeftEnd().

void mems::GappedAlignment::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 240 of file GappedAlignment.h.

References mems::SparseAbstractMatch<>::LeftEnd(), mems::SparseAbstractMatch<>::Orientation(), mems::AbstractMatch::RightEnd(), mems::SparseAbstractMatch<>::SeqCount(), and uint.

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

Inverts the coordinates of this match.

Reimplemented from mems::SparseAbstractMatch<>.

Definition at line 97 of file GappedAlignment.h.

References mems::SparseAbstractMatch<>::SeqCount(), and uint.

Referenced by CropRight().

bool mems::GappedAlignment::IsGap uint  seq,
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 265 of file GappedAlignment.h.

References uint.

void mems::GappedAlignment::SetAlignment const std::vector< std::string > &  seq_align  )  [virtual]
 

Sets the alignment.

Parameters:
seq_align should be in row/column format, e.g. one string per sequence (row)

Implements mems::AbstractGappedAlignment< SparseAbstractMatch<> >.

Definition at line 33 of file GappedAlignment.cpp.

References mems::AbstractGappedAlignment< SparseAbstractMatch<> >::SetAlignmentLength().

Referenced by mems::MuscleInterface::Align(), mems::ClustalInterface::Align(), mems::MuscleInterface::ProfileAlign(), mems::MuscleInterface::ProfileAlignFast(), mems::GenericIntervalList< MatchType >::ReadList(), mems::GenericIntervalList< MatchType >::ReadStandardAlignment(), mems::GenericIntervalList< MatchType >::ReadStandardAlignmentCompact(), mems::MuscleInterface::Refine(), mems::ProgressiveAligner::refineAlignment(), mems::MuscleInterface::RefineFast(), and mems::GenericInterval< GappedBaseImpl >::SetAlignment().

AbstractMatch * mems::GappedAlignment::Split gnSeqI  before_column  )  [inline, virtual]
 

Splits the alignment before the specified column.

The left-side remains in "this" GappedAlignment, and the right side is returned as a new GappedAlignment

Definition at line 209 of file GappedAlignment.h.

References align_matrix, mems::AbstractGappedAlignment< SparseAbstractMatch<> >::AlignmentLength(), Copy(), CropEnd(), CropStartCoords(), mems::AbstractGappedAlignment< SparseAbstractMatch<> >::Length(), mems::SparseAbstractMatch<>::SeqCount(), mems::AbstractGappedAlignment< SparseAbstractMatch<> >::SetAlignmentLength(), mems::AbstractGappedAlignment< SparseAbstractMatch<> >::SetLength(), mems::SparseAbstractMatch<>::SetStart(), mems::SparseAbstractMatch<>::Start(), and std::swap().

Referenced by mems::removeLargeGapsPP().

void mems::GappedAlignment::swap GappedAlignment other  )  [inline, protected]
 

Definition at line 73 of file GappedAlignment.h.

References align_matrix, and std::swap().

void mems::GappedAlignment::swap GappedAlignment other  )  [inline]
 

Definition at line 69 of file GappedAlignment.h.

Referenced by std::swap().


Friends And Related Function Documentation

const std::vector<std::string>& GetAlignment const GappedAlignment ga,
const std::vector< genome::gnSequence * > &  seq_table
[friend]
 

std::ostream& operator<< std::ostream &  os,
const GappedAlignment ga
[friend]
 

Writes this GappedAlignment to the specified output stream (e.g.

cout).

std::istream& operator>> std::istream &  is,
GappedAlignment ga
[friend]
 

Reads a GappedAlignment from the specified input stream (e.g.

cin).


Member Data Documentation

std::vector< std::string > mems::GappedAlignment::align_matrix [protected]
 

Definition at line 78 of file GappedAlignment.h.

Referenced by mems::GetAlignment(), mems::operator<<(), mems::operator>>(), Split(), and swap().


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