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

Search Toolkit Book for CBlastOptions

#include <blast_options.hpp>

Inheritance diagram for CBlastOptions:

Inheritance graph
[legend]
Collaboration diagram for CBlastOptions:

Collaboration graph
[legend]
List of all members.

Detailed Description

Encapsulates ALL the BLAST algorithm's options.

To ensure that the default options are set properly, it is recommended that this object is not created directly by the calling code, instead, it should be obtained from calling CBlastOptionsHandle::[GS]etOptions().

Note:
This class provides accessors and mutators for all BLAST options without preventing the caller from setting inconsistent options.
See also:
C++ BLAST Options Cookbook

Definition at line 86 of file blast_options.hpp.

Public Types

typedef ncbi::objects::CBlast4_parameters TBlast4Opts
 This returns a list of parameters for remote searches.
enum  EAPILocality { eLocal, eRemote, eBoth }
 Enumerates the possible contexts in which objects of this type can be used. More...

Public Member Functions

 CBlastOptions (EAPILocality locality=eLocal)
 Constructor which allows specification of local or remote version of the options (might change in the future).
 ~CBlastOptions ()
 Destructor.
CRef< CBlastOptionsClone () const
 Explicit deep copy of the Blast options object.
EAPILocality GetLocality () const
 Return the locality used when the object was created.
bool Validate () const
 Validate the options.
EProgram GetProgram () const
 Returns the task this object is best suited for.
void SetProgram (EProgram p)
 Sets the task this object is best suited for.
EBlastProgramType GetProgramType () const
 Returns the CORE BLAST notion of program type.
double GetWordThreshold () const
 Returns WordThreshold.
void SetWordThreshold (double w)
 Sets WordThreshold.
ELookupTableType GetLookupTableType () const
void SetLookupTableType (ELookupTableType type)
int GetWordSize () const
void SetWordSize (int ws)
unsigned char GetMBTemplateLength () const
 Megablast only lookup table options.
void SetMBTemplateLength (unsigned char len)
unsigned char GetMBTemplateType () const
void SetMBTemplateType (unsigned char type)
void ClearFilterOptions ()
NCBI_DEPRECATED char * GetFilterString () const
 Return the filtering string used.
NCBI_DEPRECATED void SetFilterString (const char *f, bool clear=true)
bool GetMaskAtHash () const
void SetMaskAtHash (bool val=true)
bool GetDustFiltering () const
void SetDustFiltering (bool val=true)
int GetDustFilteringLevel () const
void SetDustFilteringLevel (int m)
int GetDustFilteringWindow () const
void SetDustFilteringWindow (int m)
int GetDustFilteringLinker () const
void SetDustFilteringLinker (int m)
bool GetSegFiltering () const
void SetSegFiltering (bool val=true)
int GetSegFilteringWindow () const
void SetSegFilteringWindow (int m)
double GetSegFilteringLocut () const
void SetSegFilteringLocut (double m)
double GetSegFilteringHicut () const
void SetSegFilteringHicut (double m)
bool GetRepeatFiltering () const
 Returns true if repeat filtering is on.
void SetRepeatFiltering (bool val=true)
 Turns on repeat filtering using the default repeat database, namely kDefaultRepeatFilterDb.
const char * GetRepeatFilteringDB () const
 Returns the name of the repeat filtering database to use.
void SetRepeatFilteringDB (const char *db)
 Sets the repeat filtering database to use.
int GetWindowMaskerTaxId () const
 Returns the tax id used for the windowmasker database to use, if set via SetWindowMaskerTaxId (otherwise, returns 0).
void SetWindowMaskerTaxId (int taxid)
 Sets the tax id to select an appropriate windowmasker database Conversion algorithm from tax id to database name is specific to NCBI, will not work outside NCBI.
const char * GetWindowMaskerDatabase () const
 Return the name of the windowmasker database to use.
void SetWindowMaskerDatabase (const char *db)
 Sets the windowmasker database to use.
objects::ENa_strand GetStrandOption () const
void SetStrandOption (objects::ENa_strand s)
int GetQueryGeneticCode () const
void SetQueryGeneticCode (int gc)
int GetWindowSize () const
void SetWindowSize (int w)
int GetOffDiagonalRange () const
void SetOffDiagonalRange (int r)
double GetXDropoff () const
void SetXDropoff (double x)
double GetGapXDropoff () const
void SetGapXDropoff (double x)
double GetGapXDropoffFinal () const
void SetGapXDropoffFinal (double x)
double GetGapTrigger () const
void SetGapTrigger (double g)
EBlastPrelimGapExt GetGapExtnAlgorithm () const
void SetGapExtnAlgorithm (EBlastPrelimGapExt a)
EBlastTbackExt GetGapTracebackAlgorithm () const
void SetGapTracebackAlgorithm (EBlastTbackExt a)
ECompoAdjustModes GetCompositionBasedStats () const
void SetCompositionBasedStats (ECompoAdjustModes mode)
bool GetSmithWatermanMode () const
void SetSmithWatermanMode (bool m=true)
int GetUnifiedP () const
void SetUnifiedP (int u=0)
int GetHitlistSize () const
void SetHitlistSize (int s)
int GetMaxNumHspPerSequence () const
void SetMaxNumHspPerSequence (int m)
int GetCullingLimit () const
void SetCullingLimit (int s)
double GetBestHitOverhang () const
void SetBestHitOverhang (double overhang)
double GetBestHitScoreEdge () const
void SetBestHitScoreEdge (double score_edge)
double GetEvalueThreshold () const
void SetEvalueThreshold (double eval)
int GetCutoffScore () const
void SetCutoffScore (int s)
double GetPercentIdentity () const
void SetPercentIdentity (double p)
int GetMinDiagSeparation () const
void SetMinDiagSeparation (int d)
bool GetSumStatisticsMode () const
 Sum statistics options.
void SetSumStatisticsMode (bool m=true)
int GetLongestIntronLength () const
 for linking HSPs with uneven gaps
void SetLongestIntronLength (int l)
 for linking HSPs with uneven gaps
bool GetGappedMode () const
 Returns true if gapped BLAST is set, false otherwise.
void SetGappedMode (bool m=true)
const char * GetMatrixName () const
void SetMatrixName (const char *matrix)
int GetMatchReward () const
void SetMatchReward (int r)
int GetMismatchPenalty () const
void SetMismatchPenalty (int p)
int GetGapOpeningCost () const
void SetGapOpeningCost (int g)
int GetGapExtensionCost () const
void SetGapExtensionCost (int e)
int GetFrameShiftPenalty () const
void SetFrameShiftPenalty (int p)
bool GetOutOfFrameMode () const
void SetOutOfFrameMode (bool m=true)
Int8 GetDbLength () const
void SetDbLength (Int8 l)
unsigned int GetDbSeqNum () const
void SetDbSeqNum (unsigned int n)
Int8 GetEffectiveSearchSpace () const
void SetEffectiveSearchSpace (Int8 eff)
void SetEffectiveSearchSpace (const vector< Int8 > &eff)
int GetDbGeneticCode () const
void SetDbGeneticCode (int gc)
const char * GetPHIPattern () const
void SetPHIPattern (const char *pattern, bool is_dna)
double GetInclusionThreshold () const
void SetInclusionThreshold (double u)
int GetPseudoCount () const
void SetPseudoCount (int u)
bool GetUseIndex () const
bool GetForceIndex () const
bool GetMBIndexLoaded () const
const string GetIndexName () const
void SetMBIndexLoaded (bool index_loaded=true)
void SetUseIndex (bool use_index=true, const string &index_name="", bool force_index=false)
void DebugDump (CDebugDumpContext ddc, unsigned int depth) const
 Allows to dump a snapshot of the object.
void DoneDefaults () const
TBlast4OptsGetBlast4AlgoOpts ()
bool operator== (const CBlastOptions &rhs) const
bool operator!= (const CBlastOptions &rhs) const
void SetRemoteProgramAndService_Blast3 (const string &p, const string &s)
 Set the program and service name for remote blast.
virtual void GetRemoteProgramAndService_Blast3 (string &p, string &s) const
 Get the program and service name for remote blast.
const CBlastOptionsMementoCreateSnapshot () const
 Create a snapshot of the state of this object for internal use of its data structures (BLAST C++ APIs only).
void SetDefaultsMode (bool dmode)
 If this is true, remote options will ignore "Set" calls.
bool GetDefaultsMode () const

Private Member Functions

 CBlastOptions (const CBlastOptions &bo)
 Prohibit copy c-tor.
CBlastOptionsoperator= (const CBlastOptions &bo)
 Prohibit assignment operator.
void x_Throwx (const string &msg) const
 Auxiliary to throw CBlastExceptions.
QuerySetUpOptionsGetQueryOpts () const
 Returns QuerySetUpOptions for eLocal objects, NULL for eRemote.
LookupTableOptionsGetLutOpts () const
 Returns LookupTableOptions for eLocal objects, NULL for eRemote.
BlastInitialWordOptionsGetInitWordOpts () const
 Returns BlastInitialWordOptions for eLocal objects, NULL for eRemote.
BlastExtensionOptionsGetExtnOpts () const
 Returns BlastExtensionOptions for eLocal objects, NULL for eRemote.
BlastHitSavingOptionsGetHitSaveOpts () const
 Returns BlastHitSavingOptions for eLocal objects, NULL for eRemote.
PSIBlastOptionsGetPSIBlastOpts () const
 Returns PSIBlastOptions for eLocal objects, NULL for eRemote.
BlastDatabaseOptionsGetDbOpts () const
 Returns BlastDatabaseOptions for eLocal objects, NULL for eRemote.
BlastScoringOptionsGetScoringOpts () const
 Returns BlastScoringOptions for eLocal objects, NULL for eRemote.
BlastEffectiveLengthsOptionsGetEffLenOpts () const
 Returns BlastEffectiveLengthsOptions for eLocal objects, NULL for eRemote.
void x_DoDeepCopy (const CBlastOptions &opts)
 Perform a "deep copy" of Blast options.

Private Attributes

CBlastOptionsLocalm_Local
CBlastOptionsRemotem_Remote
string m_ProgramName
 Program Name for Blast3.
string m_ServiceName
 Service Name for Blast3.
bool m_DefaultsMode
 Defaults mode (remote options will ignore Set ops).
CAutomaticGenCodeSingleton m_GenCodeSingletonVar
 This field is add.

Friends

class CBl2Seq
class CDbBlast
class CDbBlastTraceback
class CDbBlastPrelim
class CEffectiveSearchSpacesMemento
class ::CBlastTabularFormatThread
class ::CTracebackTestFixture
class ::CBlastSetupTestFixture
class ::CUniformSearchTest
class ::CTracebackSearchTestFixture


Member Typedef Documentation

typedef ncbi::objects::CBlast4_parameters CBlastOptions::TBlast4Opts
 

This returns a list of parameters for remote searches.

Definition at line 387 of file blast_options.hpp.


Member Enumeration Documentation

enum CBlastOptions::EAPILocality
 

Enumerates the possible contexts in which objects of this type can be used.

Enumerator:
eLocal  To be used for running BLAST locally.

See also:
CBl2Seq, CLocalBlast
eRemote  To be used when running BLAST remotely.

See also:
CRemoteBlast
eBoth 

Definition at line 91 of file blast_options.hpp.


Constructor & Destructor Documentation

CBlastOptions::CBlastOptions const CBlastOptions bo  )  [private]
 

Prohibit copy c-tor.


Member Function Documentation

virtual void CBlastOptions::GetRemoteProgramAndService_Blast3 string &  p,
string &  s
const [inline, virtual]
 

Get the program and service name for remote blast.

Definition at line 403 of file blast_options.hpp.

References _ASSERT.

Referenced by CRemoteBlast::x_Init().

CBlastOptions& CBlastOptions::operator= const CBlastOptions bo  )  [private]
 

Prohibit assignment operator.

void CBlastOptions::SetRemoteProgramAndService_Blast3 const string &  p,
const string &  s
[inline]
 

Set the program and service name for remote blast.

Definition at line 396 of file blast_options.hpp.


Friends And Related Function Documentation

friend class ::CBlastSetupTestFixture [friend]
 

Definition at line 481 of file blast_options.hpp.

friend class ::CBlastTabularFormatThread [friend]
 

Definition at line 477 of file blast_options.hpp.

friend class ::CTracebackSearchTestFixture [friend]
 

Definition at line 483 of file blast_options.hpp.

friend class ::CTracebackTestFixture [friend]
 

Definition at line 480 of file blast_options.hpp.

friend class ::CUniformSearchTest [friend]
 

Definition at line 482 of file blast_options.hpp.

friend class CBl2Seq [friend]
 

Definition at line 469 of file blast_options.hpp.

friend class CDbBlast [friend]
 

Definition at line 470 of file blast_options.hpp.

friend class CDbBlastPrelim [friend]
 

Definition at line 472 of file blast_options.hpp.

friend class CDbBlastTraceback [friend]
 

Definition at line 471 of file blast_options.hpp.

friend class CEffectiveSearchSpacesMemento [friend]
 

Definition at line 473 of file blast_options.hpp.


Member Data Documentation

bool CBlastOptions::m_DefaultsMode [private]
 

Defaults mode (remote options will ignore Set ops).

Definition at line 436 of file blast_options.hpp.

Referenced by x_DoDeepCopy().

CAutomaticGenCodeSingleton CBlastOptions::m_GenCodeSingletonVar [private]
 

This field is add.

Definition at line 467 of file blast_options.hpp.

CBlastOptionsLocal* CBlastOptions::m_Local [private]
 

Definition at line 426 of file blast_options.hpp.

Referenced by CBlastOptions(), CEffectiveSearchSpacesMemento::CEffectiveSearchSpacesMemento(), CreateSnapshot(), DebugDump(), GetBestHitOverhang(), GetBestHitScoreEdge(), GetCompositionBasedStats(), GetCullingLimit(), GetCutoffScore(), GetDbGeneticCode(), GetDbLength(), GetDbOpts(), GetDbSeqNum(), GetDustFiltering(), GetDustFilteringLevel(), GetDustFilteringLinker(), GetDustFilteringWindow(), GetEffectiveSearchSpace(), GetEffLenOpts(), GetEvalueThreshold(), GetExtnOpts(), GetFilterString(), GetForceIndex(), GetFrameShiftPenalty(), GetGapExtensionCost(), GetGapExtnAlgorithm(), GetGapOpeningCost(), GetGappedMode(), GetGapTracebackAlgorithm(), GetGapTrigger(), GetGapXDropoff(), GetGapXDropoffFinal(), GetHitlistSize(), GetHitSaveOpts(), GetInclusionThreshold(), GetIndexName(), GetInitWordOpts(), GetLocality(), GetLongestIntronLength(), GetLookupTableType(), GetLutOpts(), GetMaskAtHash(), GetMatchReward(), GetMatrixName(), GetMaxNumHspPerSequence(), GetMBIndexLoaded(), GetMBTemplateLength(), GetMBTemplateType(), GetMinDiagSeparation(), GetMismatchPenalty(), GetOffDiagonalRange(), GetOutOfFrameMode(), GetPercentIdentity(), GetPHIPattern(), GetProgram(), GetProgramType(), GetPseudoCount(), GetPSIBlastOpts(), GetQueryGeneticCode(), GetQueryOpts(), GetRepeatFiltering(), GetRepeatFilteringDB(), GetScoringOpts(), GetSegFiltering(), GetSegFilteringHicut(), GetSegFilteringLocut(), GetSegFilteringWindow(), GetSmithWatermanMode(), GetStrandOption(), GetSumStatisticsMode(), GetUnifiedP(), GetUseIndex(), GetWindowMaskerDatabase(), GetWindowMaskerTaxId(), GetWindowSize(), GetWordSize(), GetWordThreshold(), GetXDropoff(), operator==(), SetBestHitOverhang(), SetBestHitScoreEdge(), SetCompositionBasedStats(), SetCullingLimit(), SetCutoffScore(), SetDbGeneticCode(), SetDbLength(), SetDbSeqNum(), SetDustFiltering(), SetDustFilteringLevel(), SetDustFilteringLinker(), SetDustFilteringWindow(), SetEffectiveSearchSpace(), SetEvalueThreshold(), SetFilterString(), SetFrameShiftPenalty(), SetGapExtensionCost(), SetGapExtnAlgorithm(), SetGapOpeningCost(), SetGappedMode(), SetGapTracebackAlgorithm(), SetGapTrigger(), SetGapXDropoff(), SetGapXDropoffFinal(), SetHitlistSize(), SetInclusionThreshold(), SetLongestIntronLength(), SetLookupTableType(), SetMaskAtHash(), SetMatchReward(), SetMatrixName(), SetMaxNumHspPerSequence(), SetMBIndexLoaded(), SetMBTemplateLength(), SetMBTemplateType(), SetMinDiagSeparation(), SetMismatchPenalty(), SetOffDiagonalRange(), SetOutOfFrameMode(), SetPercentIdentity(), SetPHIPattern(), SetProgram(), SetPseudoCount(), SetQueryGeneticCode(), SetRepeatFiltering(), SetRepeatFilteringDB(), SetSegFiltering(), SetSegFilteringHicut(), SetSegFilteringLocut(), SetSegFilteringWindow(), SetSmithWatermanMode(), SetStrandOption(), SetSumStatisticsMode(), SetUnifiedP(), SetUseIndex(), SetWindowMaskerDatabase(), SetWindowMaskerTaxId(), SetWindowSize(), SetWordSize(), SetWordThreshold(), SetXDropoff(), Validate(), x_DoDeepCopy(), ~CBlastOptions(), and CEffectiveSearchSpacesMemento::~CEffectiveSearchSpacesMemento().

string CBlastOptions::m_ProgramName [private]
 

Program Name for Blast3.

Definition at line 430 of file blast_options.hpp.

Referenced by x_DoDeepCopy().

CBlastOptionsRemote* CBlastOptions::m_Remote [private]
 

Definition at line 427 of file blast_options.hpp.

Referenced by CBlastOptions(), DoneDefaults(), GetBlast4AlgoOpts(), GetDefaultsMode(), GetLocality(), SetBestHitOverhang(), SetBestHitScoreEdge(), SetCompositionBasedStats(), SetCullingLimit(), SetCutoffScore(), SetDbGeneticCode(), SetDbLength(), SetDbSeqNum(), SetDefaultsMode(), SetDustFiltering(), SetDustFilteringLevel(), SetDustFilteringLinker(), SetDustFilteringWindow(), SetEffectiveSearchSpace(), SetEvalueThreshold(), SetFilterString(), SetFrameShiftPenalty(), SetGapExtensionCost(), SetGapExtnAlgorithm(), SetGapOpeningCost(), SetGappedMode(), SetGapTracebackAlgorithm(), SetGapTrigger(), SetGapXDropoff(), SetGapXDropoffFinal(), SetHitlistSize(), SetInclusionThreshold(), SetLongestIntronLength(), SetLookupTableType(), SetMaskAtHash(), SetMatchReward(), SetMatrixName(), SetMaxNumHspPerSequence(), SetMBTemplateLength(), SetMBTemplateType(), SetMismatchPenalty(), SetOutOfFrameMode(), SetPercentIdentity(), SetPHIPattern(), SetProgram(), SetPseudoCount(), SetQueryGeneticCode(), SetRepeatFiltering(), SetRepeatFilteringDB(), SetSegFiltering(), SetSegFilteringHicut(), SetSegFilteringLocut(), SetSegFilteringWindow(), SetSmithWatermanMode(), SetStrandOption(), SetSumStatisticsMode(), SetUnifiedP(), SetUseIndex(), SetWindowMaskerDatabase(), SetWindowMaskerTaxId(), SetWindowSize(), SetWordSize(), SetWordThreshold(), SetXDropoff(), x_DoDeepCopy(), and ~CBlastOptions().

string CBlastOptions::m_ServiceName [private]
 

Service Name for Blast3.

Definition at line 433 of file blast_options.hpp.

Referenced by x_DoDeepCopy().


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