mems::MatchHashEntry Class Reference

The Match class stores the location of an equal size (inexact or exactly) matching region between several sequences. More...

#include <MatchHashEntry.h>

Inheritance diagram for mems::MatchHashEntry:

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

Collaboration graph
[legend]
List of all members.

Public Types

enum  MemType { seed, extended }

Public Member Functions

virtual void CalculateOffset ()
 Calculates the generalized offset and other bookkeeping information for this mem.

MatchHashEntryClone () const
boolean Contains (const MatchHashEntry &mhe) const
 Will return true if this match contains mhe Containment implies that a match has a length >= the contained match, it has coordinates in every genome the contained match has, the difference in start positions in each genome is the same.

MatchHashEntryCopy () const
boolean Extended () const
virtual void Free ()
 MatchHashEntry (const MatchHashEntry &mhe)
 MatchHashEntry (const uint seq_count, const gnSeqI mersize, const MemType m_type=seed)
 Creates a new Match.

 MatchHashEntry ()
uint MerSize () const
int64 Offset () const
 Returns the generalized offset of this match.

MatchHashEntryoperator= (const MatchHashEntry &mhe)
boolean operator== (const MatchHashEntry &mhe) const
 comparison operator, compares two matches to see if they are the same

void SetExtended (boolean extended)
 Sets this match to be extended if the value passed in "extended" is true.

void SetOffset (int64 offset)
 Sets the generalized offset of this match to "offset".


Static Public Member Functions

int64 end_to_start_compare (const MatchHashEntry &a, const MatchHashEntry &b)
 compare the end of a to the start of b

boolean offset_lessthan (const MatchHashEntry &a, const MatchHashEntry &b)
int64 start_compare (const MatchHashEntry &a, const MatchHashEntry &b)
bool start_lessthan (const MatchHashEntry &a, const MatchHashEntry &b)
boolean start_lessthan_ptr (const MatchHashEntry *a, const MatchHashEntry *b)
boolean strict_start_lessthan_ptr (const MatchHashEntry *a, const MatchHashEntry *b)

Private Attributes

boolean m_extended
gnSeqI m_mersize
int64 m_offset

Detailed Description

The Match class stores the location of an equal size (inexact or exactly) matching region between several sequences.

There are numerous functions in this class which can be used to compare and manipulate this match.

Definition at line 30 of file MatchHashEntry.h.


Member Enumeration Documentation

enum mems::MatchHashEntry::MemType
 

Enumeration values:
seed 
extended 

Definition at line 33 of file MatchHashEntry.h.


Constructor & Destructor Documentation

mems::MatchHashEntry::MatchHashEntry  ) 
 

Definition at line 98 of file MatchHashEntry.cpp.

References mems::Match.

Referenced by Clone().

mems::MatchHashEntry::MatchHashEntry const uint  seq_count,
const gnSeqI  mersize,
const MemType  m_type = seed
 

Creates a new Match.

Parameters:
seq_count The total number of sequences in the alignment
mersize The size of the mers used in the sorted mer lists.
m_type The type of mem to create, can either be a seed or already extended.
See also:
MemType

mems::MatchHashEntry::MatchHashEntry const MatchHashEntry mhe  )  [inline]
 

Definition at line 52 of file MatchHashEntry.h.


Member Function Documentation

void mems::MatchHashEntry::CalculateOffset  )  [virtual]
 

Calculates the generalized offset and other bookkeeping information for this mem.

This should always be called after changing the start positions of the mem.

Definition at line 141 of file MatchHashEntry.cpp.

References mems::UngappedLocalAlignment< AbstractMatchImpl >::Length(), m_offset, and uint.

Referenced by mems::RepeatHash::HashMatch(), mems::MemHash::HashMatch(), mems::MaskedMemHash::HashMatch(), mems::MemHash::LoadFile(), and mems::RepeatMatchList::ReadList().

MatchHashEntry * mems::MatchHashEntry::Clone  )  const
 

Reimplemented from mems::UngappedLocalAlignment< AbstractMatchImpl >.

Definition at line 114 of file MatchHashEntry.cpp.

References MatchHashEntry().

boolean mems::MatchHashEntry::Contains const MatchHashEntry mhe  )  const
 

Will return true if this match contains mhe Containment implies that a match has a length >= the contained match, it has coordinates in every genome the contained match has, the difference in start positions in each genome is the same.

Parameters:
mhe The match to check for containment.
Returns:
True if this match contains mhe.

Definition at line 164 of file MatchHashEntry.cpp.

References mems::UngappedLocalAlignment< AbstractMatchImpl >::Length(), m_offset, and uint.

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

MatchHashEntry * mems::MatchHashEntry::Copy  )  const [inline]
 

Reimplemented from mems::UngappedLocalAlignment< AbstractMatchImpl >.

Definition at line 106 of file MatchHashEntry.h.

References mems::m_allocateAndCopy().

Referenced by mems::RepeatMatchList::ReadList().

int64 mems::MatchHashEntry::end_to_start_compare const MatchHashEntry a,
const MatchHashEntry b
[static]
 

compare the end of a to the start of b

Definition at line 91 of file MatchHashEntry.cpp.

References mems::UngappedLocalAlignment< AbstractMatchImpl >::CropStart(), and mems::UngappedLocalAlignment< AbstractMatchImpl >::Length().

boolean mems::MatchHashEntry::Extended  )  const [inline]
 

Returns:
true if this match has already been extended

Definition at line 60 of file MatchHashEntry.h.

References m_extended.

Referenced by mems::MemHash::AddHashEntry().

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

Reimplemented from mems::UngappedLocalAlignment< AbstractMatchImpl >.

Definition at line 111 of file MatchHashEntry.h.

References mems::m_free().

uint mems::MatchHashEntry::MerSize  )  const [inline]
 

Returns:
the mer size of the sorted mer lists used to find this match

Definition at line 64 of file MatchHashEntry.h.

References m_mersize, and uint.

int64 mems::MatchHashEntry::Offset  )  const [inline]
 

Returns the generalized offset of this match.

Definition at line 74 of file MatchHashEntry.h.

References m_offset.

Referenced by mems::MemHash::AddHashEntry().

boolean mems::MatchHashEntry::offset_lessthan const MatchHashEntry a,
const MatchHashEntry b
[static]
 

Definition at line 21 of file MatchHashEntry.cpp.

References m_offset.

MatchHashEntry & mems::MatchHashEntry::operator= const MatchHashEntry mhe  ) 
 

Definition at line 118 of file MatchHashEntry.cpp.

References m_extended, m_mersize, and m_offset.

boolean mems::MatchHashEntry::operator== const MatchHashEntry mhe  )  const
 

comparison operator, compares two matches to see if they are the same

Definition at line 128 of file MatchHashEntry.cpp.

References m_extended, m_mersize, and m_offset.

void mems::MatchHashEntry::SetExtended boolean  extended  )  [inline]
 

Sets this match to be extended if the value passed in "extended" is true.

Definition at line 62 of file MatchHashEntry.h.

References m_extended.

void mems::MatchHashEntry::SetOffset int64  offset  )  [inline]
 

Sets the generalized offset of this match to "offset".

Definition at line 77 of file MatchHashEntry.h.

References m_offset.

int64 mems::MatchHashEntry::start_compare const MatchHashEntry a,
const MatchHashEntry b
[static]
 

Definition at line 71 of file MatchHashEntry.cpp.

References mems::UngappedLocalAlignment< AbstractMatchImpl >::Length(), m_mersize, and uint.

bool mems::MatchHashEntry::start_lessthan const MatchHashEntry a,
const MatchHashEntry b
[inline, static]
 

Definition at line 117 of file MatchHashEntry.h.

References start_lessthan_ptr().

boolean mems::MatchHashEntry::start_lessthan_ptr const MatchHashEntry a,
const MatchHashEntry b
[static]
 

Definition at line 25 of file MatchHashEntry.cpp.

References mems::UngappedLocalAlignment< AbstractMatchImpl >::Length(), m_mersize, and mems::uint32.

Referenced by start_lessthan().

boolean mems::MatchHashEntry::strict_start_lessthan_ptr const MatchHashEntry a,
const MatchHashEntry b
[static]
 

Definition at line 48 of file MatchHashEntry.cpp.

References mems::UngappedLocalAlignment< AbstractMatchImpl >::Length(), m_mersize, and uint.


Member Data Documentation

boolean mems::MatchHashEntry::m_extended [private]
 

Definition at line 100 of file MatchHashEntry.h.

Referenced by Extended(), operator=(), operator==(), and SetExtended().

gnSeqI mems::MatchHashEntry::m_mersize [private]
 

Definition at line 101 of file MatchHashEntry.h.

Referenced by MerSize(), operator=(), operator==(), start_compare(), start_lessthan_ptr(), and strict_start_lessthan_ptr().

int64 mems::MatchHashEntry::m_offset [private]
 

Definition at line 102 of file MatchHashEntry.h.

Referenced by CalculateOffset(), Contains(), Offset(), offset_lessthan(), operator=(), operator==(), and SetOffset().


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