mems::GenericInterval< GappedBaseImpl > Class Template Reference

#include <Interval.h>

List of all members.

Public Member Functions

void add (AbstractMatch *am)
virtual void CalculateOffset ()
GenericIntervalClone () const
GenericIntervalCopy () const
void CropEnd (gnSeqI crop_amount)
void CropLeft (gnSeqI amount, uint seqI)
void CropRight (gnSeqI amount, uint seqI)
void CropStart (gnSeqI crop_amount)
virtual void Free ()
 GenericInterval (const GenericInterval &iv)
template<typename BidIt>  GenericInterval (BidIt it_begin, const BidIt &it_end)
 construct from a MatchList or a vector of pointers to AbstractMatches

 GenericInterval ()
virtual void GetAlignedSequences (gnAlignedSequences &gnas, const std::vector< genome::gnSequence * > &seq_table) const
 Get a gnAlignedSequences object TODO: get rid of this.

void GetAlignment (std::vector< bitset_t > &align_matrix) const
void GetColumn (gnSeqI col, std::vector< gnSeqI > &pos, std::vector< bool > &column) const
const std::vector< AbstractMatch * > & GetMatches () const
void Invert ()
bool IsGap (uint seq, gnSeqI col) const
void Marble (gnSeqI size)
 marbles the gaps so that no sequence has more than "size" contiguous gaps

void MoveEnd (int64 move_amount)
void MoveStart (int64 move_amount)
GenericIntervaloperator= (const GenericInterval &iv)
void SetAlignment (const std::vector< std::string > &seq_align)
template<class MatchVector> void SetMatches (MatchVector &matches)
 Set the matches in this interval *without* making a copy.

template<class MatchVector> void SetMatchesTemp (MatchVector &matches)
 Set the matches in this interval *without* cloberring the interval.

void StealMatches (std::vector< AbstractMatch * > &matches)
void swap (GenericInterval &other)
void ValidateMatches () const
 self test code

 ~GenericInterval ()

Protected Member Functions

void swap (GenericInterval *other)

Protected Attributes

std::vector< AbstractMatch * > matches

Private Member Functions

void addUnalignedRegions ()
void CalculateAlignmentLength ()
void FindMatchPos (uint seqI, gnSeqI pos, size_t &matchI, gnSeqI &match_pos)
void GetColumnAndMatch (gnSeqI col, std::vector< gnSeqI > &pos, std::vector< bool > &column, size_t &matchI, gnSeqI &match_col) const

Friends

template<typename BaseImpl> std::ostream & operator<< (std::ostream &os, const GenericInterval< BaseImpl > &iv)
 Writes this GenericInterval to the specified output stream (e.g.

template<typename BaseImpl> std::istream & operator>> (std::istream &is, const GenericInterval< BaseImpl > &iv)
 Reads a GenericInterval from the specified input stream (e.g.

template<class GappedBaseImpl = AbstractGappedAlignment< SparseAbstractMatch<> >>
class mems::GenericInterval< GappedBaseImpl >


Constructor & Destructor Documentation

template<class GappedBaseImpl = AbstractGappedAlignment< SparseAbstractMatch<> >>
mems::GenericInterval< GappedBaseImpl >::GenericInterval  )  [inline]
 

Definition at line 49 of file Interval.h.

Referenced by mems::GenericInterval< GappedBaseImpl >::Clone(), and mems::GenericInterval< GappedBaseImpl >::SetMatches().

template<class GappedBaseImpl = AbstractGappedAlignment< SparseAbstractMatch<> >>
template<typename BidIt>
mems::GenericInterval< GappedBaseImpl >::GenericInterval BidIt  it_begin,
const BidIt &  it_end
[inline]
 

construct from a MatchList or a vector of pointers to AbstractMatches

Definition at line 55 of file Interval.h.

References mems::GenericInterval< GappedBaseImpl >::addUnalignedRegions(), mems::GenericInterval< GappedBaseImpl >::CalculateAlignmentLength(), mems::GenericInterval< GappedBaseImpl >::CalculateOffset(), and mems::GenericInterval< GappedBaseImpl >::ValidateMatches().

template<class GappedBaseImpl>
mems::GenericInterval< GappedBaseImpl >::GenericInterval const GenericInterval< GappedBaseImpl > &  iv  ) 
 

Definition at line 219 of file Interval.h.

template<class GappedBaseImpl>
mems::GenericInterval< GappedBaseImpl >::~GenericInterval  ) 
 

Definition at line 200 of file Interval.h.


Member Function Documentation

template<class GappedBaseImpl = AbstractGappedAlignment< SparseAbstractMatch<> >>
void mems::GenericInterval< GappedBaseImpl >::add AbstractMatch am  )  [inline]
 

Definition at line 140 of file Interval.h.

References mems::AbstractMatch::Copy().

template<class GappedBaseImpl>
void mems::GenericInterval< GappedBaseImpl >::addUnalignedRegions  )  [private]
 

Definition at line 783 of file Interval.h.

References mems::AddGapMatches(), and uint.

Referenced by mems::GenericInterval< GappedBaseImpl >::GenericInterval(), mems::GenericInterval< GappedBaseImpl >::SetMatches(), and mems::GenericInterval< GappedBaseImpl >::SetMatchesTemp().

template<class GappedBaseImpl>
void mems::GenericInterval< GappedBaseImpl >::CalculateAlignmentLength  )  [private]
 

Definition at line 913 of file Interval.h.

Referenced by mems::GenericInterval< GappedBaseImpl >::CalculateOffset(), mems::GenericInterval< GappedBaseImpl >::GenericInterval(), mems::GenericInterval< GappedBaseImpl >::SetMatches(), and mems::GenericInterval< GappedBaseImpl >::SetMatchesTemp().

template<class GappedBaseImpl>
void mems::GenericInterval< GappedBaseImpl >::CalculateOffset  )  [virtual]
 

Definition at line 848 of file Interval.h.

References mems::GenericInterval< GappedBaseImpl >::CalculateAlignmentLength(), mems::FindBoundaries(), and uint.

Referenced by mems::GenericInterval< GappedBaseImpl >::CropEnd(), mems::GenericInterval< GappedBaseImpl >::CropLeft(), mems::GenericInterval< GappedBaseImpl >::CropRight(), mems::GenericInterval< GappedBaseImpl >::CropStart(), mems::GenericInterval< GappedBaseImpl >::GenericInterval(), mems::GenericInterval< GappedBaseImpl >::SetMatches(), and mems::GenericInterval< GappedBaseImpl >::SetMatchesTemp().

template<class GappedBaseImpl>
GenericInterval< GappedBaseImpl > * mems::GenericInterval< GappedBaseImpl >::Clone  )  const
 

Definition at line 237 of file Interval.h.

References mems::GenericInterval< GappedBaseImpl >::GenericInterval().

template<class GappedBaseImpl>
GenericInterval< GappedBaseImpl > * mems::GenericInterval< GappedBaseImpl >::Copy  )  const
 

Definition at line 189 of file Interval.h.

References mems::m_allocateAndCopy().

Referenced by mems::addGuy(), mems::addUnalignedIntervals_v2(), and mems::ProgressiveAligner::alignProfileToProfile().

template<class GappedBaseImpl>
void mems::GenericInterval< GappedBaseImpl >::CropEnd gnSeqI  crop_amount  ) 
 

Definition at line 512 of file Interval.h.

References mems::GenericInterval< GappedBaseImpl >::CalculateOffset(), mems::GenericInterval< GappedBaseImpl >::GetColumnAndMatch(), and mems::GenericInterval< GappedBaseImpl >::ValidateMatches().

Referenced by mems::SuperInterval::CropRight(), and mems::mergeUnalignedIntervals().

template<class GappedBaseImpl>
void mems::GenericInterval< GappedBaseImpl >::CropLeft gnSeqI  amount,
uint  seqI
 

Definition at line 564 of file Interval.h.

References mems::GenericInterval< GappedBaseImpl >::CalculateOffset(), mems::GenericInterval< GappedBaseImpl >::FindMatchPos(), uint, and mems::GenericInterval< GappedBaseImpl >::ValidateMatches().

template<class GappedBaseImpl>
void mems::GenericInterval< GappedBaseImpl >::CropRight gnSeqI  amount,
uint  seqI
 

Definition at line 615 of file Interval.h.

References mems::GenericInterval< GappedBaseImpl >::CalculateOffset(), mems::GenericInterval< GappedBaseImpl >::FindMatchPos(), uint, and mems::GenericInterval< GappedBaseImpl >::ValidateMatches().

template<class GappedBaseImpl>
void mems::GenericInterval< GappedBaseImpl >::CropStart gnSeqI  crop_amount  ) 
 

Definition at line 486 of file Interval.h.

References mems::GenericInterval< GappedBaseImpl >::CalculateOffset(), mems::GenericInterval< GappedBaseImpl >::GetColumnAndMatch(), and mems::GenericInterval< GappedBaseImpl >::ValidateMatches().

Referenced by mems::SuperInterval::CropLeft(), and mems::mergeUnalignedIntervals().

template<class GappedBaseImpl>
void mems::GenericInterval< GappedBaseImpl >::FindMatchPos uint  seqI,
gnSeqI  pos,
size_t &  matchI,
gnSeqI &  match_pos
[private]
 

Definition at line 818 of file Interval.h.

References uint.

Referenced by mems::GenericInterval< GappedBaseImpl >::CropLeft(), and mems::GenericInterval< GappedBaseImpl >::CropRight().

template<class GappedBaseImpl>
void mems::GenericInterval< GappedBaseImpl >::Free  )  [virtual]
 

Definition at line 194 of file Interval.h.

References mems::m_free().

Referenced by mems::addUnalignedRegions().

template<class GappedBaseImpl>
void mems::GenericInterval< GappedBaseImpl >::GetAlignedSequences gnAlignedSequences gnas,
const std::vector< genome::gnSequence * > &  seq_table
const [virtual]
 

Get a gnAlignedSequences object TODO: get rid of this.

Definition at line 923 of file Interval.h.

References mems::GetAlignment(), mems::gnAlignedSequences::names, mems::gnAlignedSequences::positions, mems::gnAlignedSequences::sequences, and uint.

Referenced by mems::simpleFindBackbone(), and mems::simpleFindIslands().

template<class GappedBaseImpl>
void mems::GenericInterval< GappedBaseImpl >::GetAlignment std::vector< bitset_t > &  align_matrix  )  const
 

Definition at line 539 of file Interval.h.

References mems::bitset_t, and uint.

Referenced by mems::SuperInterval::ValidateSelf().

template<class GappedBaseImpl>
void mems::GenericInterval< GappedBaseImpl >::GetColumn gnSeqI  col,
std::vector< gnSeqI > &  pos,
std::vector< bool > &  column
const
 

Definition at line 810 of file Interval.h.

References mems::GenericInterval< GappedBaseImpl >::GetColumnAndMatch().

Referenced by mems::GenericInterval< GappedBaseImpl >::IsGap().

template<class GappedBaseImpl>
void mems::GenericInterval< GappedBaseImpl >::GetColumnAndMatch gnSeqI  col,
std::vector< gnSeqI > &  pos,
std::vector< bool > &  column,
size_t &  matchI,
gnSeqI &  match_col
const [private]
 

Definition at line 300 of file Interval.h.

References uint.

Referenced by mems::GenericInterval< GappedBaseImpl >::CropEnd(), mems::GenericInterval< GappedBaseImpl >::CropStart(), and mems::GenericInterval< GappedBaseImpl >::GetColumn().

template<class GappedBaseImpl = AbstractGappedAlignment< SparseAbstractMatch<> >>
const std::vector<AbstractMatch*>& mems::GenericInterval< GappedBaseImpl >::GetMatches  )  const [inline]
 

Definition at line 156 of file Interval.h.

Referenced by mems::ProgressiveAligner::alignProfileToProfile(), and mems::SuperInterval::ValidateSelf().

template<class GappedBaseImpl>
void mems::GenericInterval< GappedBaseImpl >::Invert  ) 
 

Definition at line 801 of file Interval.h.

References uint.

template<class GappedBaseImpl>
bool mems::GenericInterval< GappedBaseImpl >::IsGap uint  seq,
gnSeqI  col
const
 

Definition at line 937 of file Interval.h.

References mems::GenericInterval< GappedBaseImpl >::GetColumn(), and uint.

template<class GappedBaseImpl>
void mems::GenericInterval< GappedBaseImpl >::Marble gnSeqI  size  ) 
 

marbles the gaps so that no sequence has more than "size" contiguous gaps

Definition at line 393 of file Interval.h.

References mems::AbstractMatch::AlignmentLength(), mems::AbstractMatch::CropEnd(), RandTwisterDouble(), uint, and mems::GenericInterval< GappedBaseImpl >::ValidateMatches().

template<class GappedBaseImpl>
void mems::GenericInterval< GappedBaseImpl >::MoveEnd int64  move_amount  ) 
 

Definition at line 676 of file Interval.h.

template<class GappedBaseImpl>
void mems::GenericInterval< GappedBaseImpl >::MoveStart int64  move_amount  ) 
 

Definition at line 668 of file Interval.h.

template<class GappedBaseImpl>
GenericInterval< GappedBaseImpl > & mems::GenericInterval< GappedBaseImpl >::operator= const GenericInterval< GappedBaseImpl > &  iv  ) 
 

Definition at line 225 of file Interval.h.

References mems::GenericInterval< GappedBaseImpl >::matches.

template<class GappedBaseImpl>
void mems::GenericInterval< GappedBaseImpl >::SetAlignment const std::vector< std::string > &  seq_align  ) 
 

Definition at line 876 of file Interval.h.

References mems::GappedAlignment::SetAlignment(), mems::AbstractGappedAlignment< SparseAbstractMatch<> >::SetLength(), mems::SparseAbstractMatch<>::SetStart(), and uint.

template<class GappedBaseImpl = AbstractGappedAlignment< SparseAbstractMatch<> >>
template<class MatchVector>
void mems::GenericInterval< GappedBaseImpl >::SetMatches MatchVector &  matches  )  [inline]
 

Set the matches in this interval *without* making a copy.

The GenericInterval takes ownership of matches

Definition at line 76 of file Interval.h.

References mems::GenericInterval< GappedBaseImpl >::addUnalignedRegions(), mems::GenericInterval< GappedBaseImpl >::CalculateAlignmentLength(), mems::GenericInterval< GappedBaseImpl >::CalculateOffset(), mems::GenericInterval< GappedBaseImpl >::GenericInterval(), mems::Match, and mems::GenericInterval< GappedBaseImpl >::ValidateMatches().

Referenced by mems::addGuy(), mems::addUnalignedIntervals_v2(), mems::Aligner::align(), mems::Aligner::AlignLCB(), mems::AlignLCBInParallel(), and mems::propagateInvert().

template<class GappedBaseImpl = AbstractGappedAlignment< SparseAbstractMatch<> >>
template<class MatchVector>
void mems::GenericInterval< GappedBaseImpl >::SetMatchesTemp MatchVector &  matches  )  [inline]
 

Set the matches in this interval *without* cloberring the interval.

Definition at line 102 of file Interval.h.

References mems::GenericInterval< GappedBaseImpl >::addUnalignedRegions(), mems::GenericInterval< GappedBaseImpl >::CalculateAlignmentLength(), mems::GenericInterval< GappedBaseImpl >::CalculateOffset(), and mems::GenericInterval< GappedBaseImpl >::ValidateMatches().

template<class GappedBaseImpl>
void mems::GenericInterval< GappedBaseImpl >::StealMatches std::vector< AbstractMatch * > &  matches  ) 
 

Definition at line 207 of file Interval.h.

References uint.

Referenced by mems::mergeUnalignedIntervals(), and mems::propagateInvert().

template<class GappedBaseImpl = AbstractGappedAlignment< SparseAbstractMatch<> >>
void mems::GenericInterval< GappedBaseImpl >::swap GenericInterval< GappedBaseImpl > *  other  )  [inline, protected]
 

Definition at line 173 of file Interval.h.

References mems::GenericInterval< GappedBaseImpl >::matches, and std::swap().

template<class GappedBaseImpl = AbstractGappedAlignment< SparseAbstractMatch<> >>
void mems::GenericInterval< GappedBaseImpl >::swap GenericInterval< GappedBaseImpl > &  other  )  [inline]
 

Definition at line 169 of file Interval.h.

Referenced by mems::SuperInterval::swap(), and std::swap().

template<class GappedBaseImpl>
void mems::GenericInterval< GappedBaseImpl >::ValidateMatches  )  const
 

self test code

Definition at line 246 of file Interval.h.

References mems::debug_interval, and uint.

Referenced by mems::GenericInterval< GappedBaseImpl >::CropEnd(), mems::GenericInterval< GappedBaseImpl >::CropLeft(), mems::GenericInterval< GappedBaseImpl >::CropRight(), mems::GenericInterval< GappedBaseImpl >::CropStart(), mems::GenericInterval< GappedBaseImpl >::GenericInterval(), mems::GenericInterval< GappedBaseImpl >::Marble(), mems::GenericInterval< GappedBaseImpl >::SetMatches(), and mems::GenericInterval< GappedBaseImpl >::SetMatchesTemp().


Friends And Related Function Documentation

template<class GappedBaseImpl = AbstractGappedAlignment< SparseAbstractMatch<> >>
template<typename BaseImpl>
std::ostream& operator<< std::ostream &  os,
const GenericInterval< BaseImpl > &  iv
[friend]
 

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

cout).

template<class GappedBaseImpl = AbstractGappedAlignment< SparseAbstractMatch<> >>
template<typename BaseImpl>
std::istream& operator>> std::istream &  is,
const GenericInterval< BaseImpl > &  iv
[friend]
 

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

cin).


Member Data Documentation

template<class GappedBaseImpl = AbstractGappedAlignment< SparseAbstractMatch<> >>
std::vector< AbstractMatch* > mems::GenericInterval< GappedBaseImpl >::matches [protected]
 

Definition at line 177 of file Interval.h.

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


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