MatchPolicyProteinTranslated Class Reference

#include <QueryManager.h>

Inheritance diagram for MatchPolicyProteinTranslated:

Inheritance graph
[legend]
Collaboration diagram for MatchPolicyProteinTranslated:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MatchPolicyProteinTranslated (HashTableTranslated &subjectTable)
virtual void operator() (WordSequence &querySeqFwd, MatchStore &store, MatchAlgorithm &findMatch)

Protected Attributes

HashTableTranslatedsubjectTable_

Detailed Description

Definition at line 312 of file QueryManager.h.


Constructor & Destructor Documentation

MatchPolicyProteinTranslated::MatchPolicyProteinTranslated ( HashTableTranslated subjectTable  ) 

Definition at line 278 of file QueryManager.cpp.

References MatchPolicy::addMatch_, and MatchPolicy::subjectTable_.

00278                                       :
00279 MatchPolicy( subjectTable ),
00280 subjectTable_( subjectTable )
00281 {
00282   subjectTable_.setQueryProtein();
00283   addMatch_ = new MatchAdderProteinCodon(subjectTable_);
00284 } // ~MatchPolicyProteinTranslated::MatchPolicyProteinTranslated


Member Function Documentation

void MatchPolicyProteinTranslated::operator() ( WordSequence querySeqFwd,
MatchStore store,
MatchAlgorithm findMatch 
) [virtual]

Implements MatchPolicy.

Definition at line 288 of file QueryManager.cpp.

References MatchPolicy::addMatch_, WordSequence::getNumBasesInLast(), HashTableGeneric::getWordLength(), gMaxBasesPerWord, gNumReadingFrames, MatchAdder::link(), MatchAdder::setQueryForward(), MatchAdder::setQuerySize(), and MatchPolicy::subjectTable_.

00290 {
00291 
00292   addMatch_->link(store);
00293   addMatch_->setQueryForward();
00294   addMatch_->setQuerySize( ((querySeqFwd.size()-1) * gMaxBasesPerWord )
00295       + querySeqFwd.getNumBasesInLast() );
00296 
00297   // Necessary to copy querySeqFwd - otherwise it is shifted by the
00298   // first findMatch, which thus screws up the second findMatch
00299   WordSequence querySeqCopy(querySeqFwd);
00300 
00301   //  addMatch_->setSubjectForward();
00302   //  cout << "MPPT: fwd" << endl;
00303   subjectTable_.setForward();
00304 
00305   findMatch( querySeqCopy, *addMatch_, subjectTable_, 
00306              gNumReadingFrames * subjectTable_.getWordLength() );
00307 
00308   //  addMatch_->setSubjectReverse();
00309   // cout << "MPPT: rev" << endl;
00310   subjectTable_.setReverse();
00311 
00312   findMatch( querySeqFwd, *addMatch_, subjectTable_,
00313              gNumReadingFrames * subjectTable_.getWordLength() );
00314 
00315 
00316 } // ~MatchPolicyProteinTranslated::operator()

Here is the call graph for this function:


Member Data Documentation

HashTableTranslated& MatchPolicyProteinTranslated::subjectTable_ [protected]

Reimplemented from MatchPolicy.

Definition at line 323 of file QueryManager.h.


The documentation for this class was generated from the following files:
Generated on Fri Dec 21 13:18:47 2007 for ssaha by  doxygen 1.5.2