Linkmatch Class Reference

#include <Match.h>

List of all members.

Public Types

typedef multiset< M8MatchEX
*, ltMatchQueryBeginPtr >
::iterator 
bestiterator
typedef multiset< M8MatchEX
*, ltMatchQueryBeginPtr >
::reverse_iterator 
bestreverse_iterator

Public Member Functions

 ~Linkmatch ()
 Linkmatch (Tblastn &tb)
template<class ForwardIterator>
M8MatchEXbestModel (ForwardIterator first, ForwardIterator last, const Match &box)
M8MatchEXbestModel (const Match &sec)
void bestModel (vector< Boxchain * > &topmodels)
void showBest (ostream &ous) const
void show_best (ostream &ous) const
void show_end2match (ostream &ous) const
void show_start2match (ostream &ous) const
void show_sections (ostream &ous) const
void removeChain (M8MatchEX *p, Match &box)

Private Member Functions

void cleanUpBest (bestiterator bi)

Private Attributes

set< int > xpoints
multimap< int, M8MatchEX * > start2match
multimap< int, M8MatchEX * > end2match
multiset< M8MatchEX
*, ltMatchQueryBeginPtr
best
vector< Matchsections


Detailed Description

use M8MatchEX as building block instead of M8Match This is meant to be the generic class to chain boxes I will write a more generic class based on this one.

This is the key class implementing the chaining algorithm.


Member Typedef Documentation

typedef multiset<M8MatchEX*, ltMatchQueryBeginPtr>::reverse_iterator Linkmatch::bestreverse_iterator


Constructor & Destructor Documentation

Linkmatch::~Linkmatch (  ) 

References start2match.

Linkmatch::Linkmatch ( Tblastn tb  ) 

making a real copy of the matches member from the Tblastn object. The only change to Tblastn is sorting the matches vector based on targetRange.

References end2match, Tblastn::findSections(), Tblastn::getMatches(), sections, start2match, and xpoints.


Member Function Documentation

template<class ForwardIterator>
M8MatchEX * Linkmatch::bestModel ( ForwardIterator  first,
ForwardIterator  last,
const Match box 
) [inline]

more generat version, allows the same code to be applied to both the + and - strand of DNA ForwardIterator is for iterating the xpoints in forward and reverse direction.

box is the section that contain all the matches in a particular section.

Return the pointer to the last element of the best chain. The Last pointer which can be used to construct the best alighment.

References best, cleanUpBest(), Match::contain(), end2match, I, show_end2match(), show_start2match(), and start2match.

Referenced by bestModel(), and storeBestModels().

M8MatchEX * Linkmatch::bestModel ( const Match sec  ) 

produce the best chain from the matches contained inside sec Return the pointer to the end of the chain.

References bestModel(), Match::targetBegin(), Match::targetEnd(), Match::targetOnPlus(), and xpoints.

void Linkmatch::bestModel ( vector< Boxchain * > &  topmodels  ) 

put all the top 80% models into the topmodels vector If topmodels is not empty, it clears the vector. For the pointer version, we need to deallocate memory.

References bestModel(), M8MatchEX::getMaxScore(), removeChain(), and sections.

void Linkmatch::showBest ( ostream &  ous  )  const

display the final best set content this contains the final result

References best, and M8MatchEX::previous().

void Linkmatch::show_best ( ostream &  ous  )  const

show the best set content directly

References best.

Referenced by removeChain().

void Linkmatch::show_end2match ( ostream &  ous  )  const

References end2match.

Referenced by bestModel().

void Linkmatch::show_start2match ( ostream &  ous  )  const

References start2match.

Referenced by bestModel(), and removeChain().

void Linkmatch::show_sections ( ostream &  ous  )  const

References sections.

Referenced by removeChain().

void Linkmatch::removeChain ( M8MatchEX p,
Match box 
)

find sections on the target (genomic) where all matches are in the same direction as regards to targets Thse section may overlap. Requirement: The tblastn must have been sorted by target. This class does not have enough information to do this job well. The data structure is also not easy for deletion. remove M8MatchEX* from start2match and end2match, then update the set<int> xpoint and reduced the target range of the box to reflect the new boundary of the section

References Match::contain(), end2match, I, max, min, M8MatchEX::previous(), Match::queryBegin(), Match::queryEnd(), Match::set(), Match::setNull(), show_best(), show_sections(), show_start2match(), start2match, Match::targetBegin(), Match::targetEnd(), Match::targetOnPlus(), and xpoints.

Referenced by bestModel().

void Linkmatch::cleanUpBest ( bestiterator  bi  )  [private]

bi is the iterator pointing to the element just inserted. This element will be used for comparision, any element after this one that has a smaller score will be removed

References best.

Referenced by bestModel().


Member Data Documentation

set<int> Linkmatch::xpoints [private]

this should contain the matches sorted by target We don't need this one if we store pointers.

Referenced by bestModel(), Linkmatch(), and removeChain().

multimap<int, M8MatchEX*> Linkmatch::start2match [private]

multimap<int, M8MatchEX*> Linkmatch::end2match [private]

although this set may contain elements starting at the same b.y, their scores must be different Order by queryBegin, then by maxScore

Referenced by bestModel(), cleanUpBest(), show_best(), and showBest().

vector<Match> Linkmatch::sections [private]

Referenced by bestModel(), Linkmatch(), and show_sections().


The documentation for this class was generated from the following files:

Generated on Wed Aug 10 11:57:12 2011 for Softwares from Orpara by  doxygen 1.5.6