CPssmEngine Class Reference
[BLAST (Basic Local Alignment Search Tool)]

Search Toolkit Book for CPssmEngine

#include <pssm_engine.hpp>

Inheritance diagram for CPssmEngine:

Inheritance graph
[legend]
Collaboration diagram for CPssmEngine:

Collaboration graph
[legend]
List of all members.

Detailed Description

Computes a PSSM as specified in PSI-BLAST.

This class must be configured with a concrete strategy for it to obtain its input data. The following example uses the CPsiBlastInputData concrete strategy:

/// ...
/// CPsiBlastInputData pssm_strategy(query, query_length, alignment, 
///                                  object_manager_scope, psi_blast_options);
/// CPssmEngine pssm_engine(&pssm_strategy);
/// CRef<CPssmWithParameters> scoremat = pssm_engine.Run();
/// ...
/// 

Definition at line 98 of file pssm_engine.hpp.

Public Member Functions

 CPssmEngine (IPssmInputData *input)
 Constructor to configure the PSSM engine with a PSSM input data strategy object Checks that no data returned by the IPssmInputData interface is NULL
Exceptions:
CPssmEngineException if validation fails.

 CPssmEngine (IPssmInputFreqRatios *input)
 Constructor to perform the last 2 stages of the PSSM creation algorithm Checks that no data returned by the IPssmInputFreqRatios interface is NULL
Exceptions:
CPssmEngineException if validation fails.

 ~CPssmEngine ()
 Destructor.
void SetUngappedStatisticalParams (CConstRef< CBlastAncillaryData > ancillary_data)
 Sets the Karlin & Altschul parameters in the BlastScoreBlk to be used in PSSM generation.
CRef< objects::CPssmWithParameters > Run ()
 Runs the PSSM engine to compute the PSSM.

Private Member Functions

BlastQueryInfox_InitializeQueryInfo (unsigned int query_length)
 Initialiazes the core BlastQueryInfo structure for a single protein sequence.
void x_InitializeScoreBlock (const unsigned char *query, unsigned int query_length, const char *matrix_name)
 Initializes the BlastScoreBlk data member required to run the PSSM engine.
unsigned char * x_GetQuery () const
 Private interface to retrieve query sequence from its data source interface.
unsigned int x_GetQueryLength () const
 Private interface to retrieve query length from its data source interface.
const char * x_GetMatrixName () const
 Private interface to retrieve matrix name from its data source interface.
CRef< objects::CPssmWithParameters > x_CreatePssmFromMsa ()
 Using IPssmInputData as a delegate to provide input data in the form of a multiple sequence alignment, creates a PSSM using the CORE C PSSM engine API.
CRef< objects::CPssmWithParameters > x_CreatePssmFromFreqRatios ()
 Using IPssmInputFreqRatios as a delegate to provide the input PSSM's frequency ratios, creates a PSSM using the CORE C PSSM engine API.
 CPssmEngine ()
 Default constructor available for derived test classes.
 CPssmEngine (const CPssmEngine &rhs)
 Prohibit copy constructor.
CPssmEngineoperator= (const CPssmEngine &rhs)
 Prohibit assignment operator.

Static Private Member Functions

static unsigned char * x_GuardProteinQuery (const unsigned char *query, unsigned int query_length)
 Copies query sequence and adds protein sentinel bytes at the beginning and at the end of the sequence.
static CRef< objects::CPssmWithParameters > x_PSIMatrix2Asn1 (const PSIMatrix *pssm, const char *matrix_name, const PSIBlastOptions *opts=NULL, const PSIDiagnosticsResponse *diagnostics=NULL)
 Converts the PSIMatrix structure into a ASN.1 CPssmWithParameters object.
static std::string x_ErrorCodeToString (int error_code)
 Convert a PSSM return status into a string.

Private Attributes

IPssmInputDatam_PssmInput
 Handle to strategy to process raw PSSM input data.
IPssmInputFreqRatiosm_PssmInputFreqRatios
 Pointer to input data to create PSSM from frequency ratios.
CBlastScoreBlk m_ScoreBlk
 Blast score block structure.

Friends

class ::CPssmCreateTestFixture
 unit test class


Constructor & Destructor Documentation

CPssmEngine::CPssmEngine  )  [inline, private]
 

Default constructor available for derived test classes.

Definition at line 215 of file pssm_engine.hpp.

CPssmEngine::CPssmEngine const CPssmEngine rhs  )  [private]
 

Prohibit copy constructor.


Member Function Documentation

CPssmEngine& CPssmEngine::operator= const CPssmEngine rhs  )  [private]
 

Prohibit assignment operator.


Friends And Related Function Documentation

friend class ::CPssmCreateTestFixture [friend]
 

unit test class

Definition at line 222 of file pssm_engine.hpp.


Member Data Documentation

IPssmInputData* CPssmEngine::m_PssmInput [private]
 

Handle to strategy to process raw PSSM input data.

Definition at line 132 of file pssm_engine.hpp.

Referenced by Run(), x_CreatePssmFromMsa(), x_GetMatrixName(), x_GetQuery(), and x_GetQueryLength().

IPssmInputFreqRatios* CPssmEngine::m_PssmInputFreqRatios [private]
 

Pointer to input data to create PSSM from frequency ratios.

Definition at line 134 of file pssm_engine.hpp.

Referenced by x_CreatePssmFromFreqRatios(), x_GetMatrixName(), x_GetQuery(), and x_GetQueryLength().

CBlastScoreBlk CPssmEngine::m_ScoreBlk [private]
 

Blast score block structure.

Definition at line 136 of file pssm_engine.hpp.

Referenced by SetUngappedStatisticalParams(), x_CreatePssmFromFreqRatios(), x_CreatePssmFromMsa(), and x_InitializeScoreBlock().


The documentation for this class was generated from the following files:
Generated on Mon Dec 7 13:39:22 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Mon Dec 07 16:23:47 2009 by modify_doxy.py rev. 173732