mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc > Class Template Reference

The SparseAbstractMatch implements the AbstractMatch interface in a way that allows matches with a large SeqCount and low Multiplicity to be stored efficiently. More...

#include <SparseAbstractMatch.h>

Inheritance diagram for mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >:

Inheritance graph
[legend]
Collaboration diagram for mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

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

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

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

virtual 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.

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

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

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

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 startI)
 Deprecated: use SetLeftEnd() and SetOrientation instead Sets the start in sequence.

 SparseAbstractMatch (const uint seq_count)
 Creates a new SparseAbstractMatch.

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

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


Protected Member Functions

uint SeqToIndex (uint seqI) const
void swap (SparseAbstractMatch *other)

Protected Attributes

std::vector< gnSeqI, gnSeqIAlloc > leftend
uint m_seq_count
bitset_t orient
std::vector< uint, uintAlloc > seq_ids

Detailed Description

template<class gnSeqIAlloc = std::allocator<gnSeqI>, class uintAlloc = std::allocator<uint>>
class mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >

The SparseAbstractMatch implements the AbstractMatch interface in a way that allows matches with a large SeqCount and low Multiplicity to be stored efficiently.

Definition at line 30 of file SparseAbstractMatch.h.


Constructor & Destructor Documentation

template<class gnSeqIAlloc = std::allocator<gnSeqI>, class uintAlloc = std::allocator<uint>>
mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::SparseAbstractMatch  )  [inline]
 

Definition at line 32 of file SparseAbstractMatch.h.

template<class gnSeqIAlloc, class uintAlloc>
mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::SparseAbstractMatch const uint  seq_count  ) 
 

Creates a new SparseAbstractMatch.

Parameters:
seq_count The total number of sequences in the alignment

Definition at line 76 of file SparseAbstractMatch.h.

References uint.


Member Function Documentation

template<class gnSeqIAlloc, class uintAlloc>
uint mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::FirstStart  )  const [virtual]
 

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

Implements mems::AbstractMatch.

Definition at line 90 of file SparseAbstractMatch.h.

References uint.

template<class gnSeqIAlloc, class uintAlloc>
void mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::Invert  )  [virtual]
 

Inverts the coordinates of this match.

Implements mems::AbstractMatch.

Reimplemented in mems::GappedAlignment.

Definition at line 148 of file SparseAbstractMatch.h.

template<class gnSeqIAlloc, class uintAlloc>
gnSeqI mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::LeftEnd uint  seqI  )  const [virtual]
 

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

Implements mems::AbstractMatch.

Definition at line 156 of file SparseAbstractMatch.h.

References mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::SeqToIndex(), and uint.

template<class gnSeqIAlloc, class uintAlloc>
void mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::MoveEnd int64  move_amount  )  [virtual]
 

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

Implements mems::AbstractMatch.

Definition at line 216 of file SparseAbstractMatch.h.

References uint.

template<class gnSeqIAlloc, class uintAlloc>
void mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::MoveStart int64  move_amount  )  [virtual]
 

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

Implements mems::AbstractMatch.

Definition at line 208 of file SparseAbstractMatch.h.

References uint.

template<class gnSeqIAlloc = std::allocator<gnSeqI>, class uintAlloc = std::allocator<uint>>
uint mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::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 45 of file SparseAbstractMatch.h.

template<class gnSeqIAlloc, class uintAlloc>
boolean mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::operator== const SparseAbstractMatch< gnSeqIAlloc, uintAlloc > &  sam  )  const [virtual]
 

Definition at line 224 of file SparseAbstractMatch.h.

References mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::leftend, mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::orient, and uint.

template<class gnSeqIAlloc, class uintAlloc>
AbstractMatch::orientation mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::Orientation uint  seqI  )  const [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 164 of file SparseAbstractMatch.h.

References mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::SeqToIndex(), and uint.

template<class gnSeqIAlloc = std::allocator<gnSeqI>, class uintAlloc = std::allocator<uint>>
uint mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::SeqCount  )  const [inline, virtual]
 

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

Implements mems::AbstractMatch.

Definition at line 46 of file SparseAbstractMatch.h.

template<class gnSeqIAlloc, class uintAlloc>
uint mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::SeqToIndex uint  seqI  )  const [protected]
 

Definition at line 99 of file SparseAbstractMatch.h.

References uint.

Referenced by mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::LeftEnd(), mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::Orientation(), mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::SetLeftEnd(), mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::SetOrientation(), mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::SetStart(), and mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::Start().

template<class gnSeqIAlloc, class uintAlloc>
void mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::SetLeftEnd uint  seqI,
gnSeqI  position
[virtual]
 

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

Implements mems::AbstractMatch.

Definition at line 174 of file SparseAbstractMatch.h.

References mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::SeqToIndex(), and uint.

template<class gnSeqIAlloc, class uintAlloc>
void mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::SetOrientation uint  seqI,
orientation  o
[virtual]
 

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

Implements mems::AbstractMatch.

Definition at line 198 of file SparseAbstractMatch.h.

References mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::SeqToIndex(), and uint.

template<class gnSeqIAlloc, class uintAlloc>
void mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::SetStart uint  seqI,
int64  startI
[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 121 of file SparseAbstractMatch.h.

References mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::SeqToIndex(), and uint.

template<class gnSeqIAlloc, class uintAlloc>
int64 mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::Start uint  seqI  )  const [virtual]
 

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

Returns the start coordinate of this match in sequence

Parameters:
startI 

Implements mems::AbstractMatch.

Definition at line 110 of file SparseAbstractMatch.h.

References mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::SeqToIndex(), and uint.

template<class gnSeqIAlloc, class uintAlloc>
void mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::swap SparseAbstractMatch< gnSeqIAlloc, uintAlloc > *  other  )  [protected]
 

Definition at line 81 of file SparseAbstractMatch.h.

References mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::leftend, mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::m_seq_count, mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::orient, mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::seq_ids, and std::swap().

template<class gnSeqIAlloc, class uintAlloc>
uint mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::UsedSeq uint  seqI  )  const [virtual]
 

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

Implements mems::AbstractMatch.

Definition at line 235 of file SparseAbstractMatch.h.

References uint.


Member Data Documentation

template<class gnSeqIAlloc = std::allocator<gnSeqI>, class uintAlloc = std::allocator<uint>>
std::vector<gnSeqI, gnSeqIAlloc > mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::leftend [protected]
 

Definition at line 66 of file SparseAbstractMatch.h.

Referenced by mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::operator==(), and mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::swap().

template<class gnSeqIAlloc = std::allocator<gnSeqI>, class uintAlloc = std::allocator<uint>>
uint mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::m_seq_count [protected]
 

Definition at line 65 of file SparseAbstractMatch.h.

Referenced by mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::swap().

template<class gnSeqIAlloc = std::allocator<gnSeqI>, class uintAlloc = std::allocator<uint>>
bitset_t mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::orient [protected]
 

Definition at line 67 of file SparseAbstractMatch.h.

Referenced by mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::operator==(), and mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::swap().

template<class gnSeqIAlloc = std::allocator<gnSeqI>, class uintAlloc = std::allocator<uint>>
std::vector<uint, uintAlloc > mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::seq_ids [protected]
 

Definition at line 64 of file SparseAbstractMatch.h.

Referenced by mems::SparseAbstractMatch< gnSeqIAlloc, uintAlloc >::swap().


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