📄 blast_options.hpp
字号:
/// @todo PSI-Blast options could go on their own subclass? const char* GetPHIPattern() const { if (! m_Local) { x_Throwx("Error: GetPHIPattern() not available."); } return m_Local->GetPHIPattern(); } void SetPHIPattern(const char* pattern, bool is_dna) { if (m_Local) { m_Local->SetPHIPattern(pattern, is_dna); } if (m_Remote) { m_Remote->SetValue(eBlastOpt_PHIPattern, pattern); // For now I will assume this is handled when the data is passed to the// code in blast4_options - i.e. that code will discriminate on the basis// of the type of *OptionHandle that is passed in.//// if (is_dna) {// m_Remote->SetProgram("blastn");// } else {// m_Remote->SetProgram("blastp");// }// // m_Remote->SetService("phi"); } } /******************** PSIBlast options *******************/ double GetInclusionThreshold() const { if (! m_Local) { x_Throwx("Error: GetInclusionThreshold() not available."); } return m_Local->GetInclusionThreshold(); } void SetInclusionThreshold(double u) { if (m_Local) { m_Local->SetInclusionThreshold(u); } if (m_Remote) { m_Remote->SetValue(eBlastOpt_InclusionThreshold, u); } } short GetPseudoCount() const { if (! m_Local) { x_Throwx("Error: GetPseudoCount() not available."); } return m_Local->GetPseudoCount(); } void SetPseudoCount(short u) { if (m_Local) { m_Local->SetPseudoCount(u); } if (m_Remote) { m_Remote->SetValue(eBlastOpt_PseudoCount, u); } } /// Allows to dump a snapshot of the object void DebugDump(CDebugDumpContext ddc, unsigned int depth) const { if (m_Local) { m_Local->DebugDump(ddc, depth); } } void DoneDefaults() const { if (m_Remote) { m_Remote->DoneDefaults(); } } // typedef ncbi::objects::CBlast4_queue_search_request TBlast4Req;// CRef<TBlast4Req> GetBlast4Request() const// {// CRef<TBlast4Req> result; // if (m_Remote) {// result = m_Remote->GetBlast4Request();// } // return result;// } // the "new paradigm" typedef ncbi::objects::CBlast4_parameters TBlast4Opts; TBlast4Opts * GetBlast4AlgoOpts() { TBlast4Opts * result = 0; if (m_Remote) { result = m_Remote->GetBlast4AlgoOpts(); } return result; } bool operator==(const CBlastOptions& rhs) const; bool operator!=(const CBlastOptions& rhs) const; friend class CBl2Seq; friend class CDbBlast; friend class ::CBlastDbTest; // unit test class friend class ::CBlastGapAlignTest; // unit test class friend class ::CBlastTraceBackTest; // unit test class friend class ::CScoreBlkTest; // unit test class friend class ::CRPSTest; // unit test class friend class ::CBlastRedoAlignmentTest; // unit test classprotected: QuerySetUpOptions * GetQueryOpts() const { return m_Local ? m_Local->GetQueryOpts() : 0; } LookupTableOptions * GetLutOpts() const { return m_Local ? m_Local->GetLutOpts() : 0; } BlastInitialWordOptions * GetInitWordOpts() const { return m_Local ? m_Local->GetInitWordOpts() : 0; } BlastExtensionOptions * GetExtnOpts() const { return m_Local ? m_Local->GetExtnOpts() : 0; } BlastHitSavingOptions * GetHitSaveOpts() const { return m_Local ? m_Local->GetHitSaveOpts() : 0; } PSIBlastOptions * GetPSIBlastOpts() const { return m_Local ? m_Local->GetPSIBlastOpts() : 0; } BlastDatabaseOptions * GetDbOpts() const { return m_Local ? m_Local->GetDbOpts() : 0; } BlastScoringOptions * GetScoringOpts() const { return m_Local ? m_Local->GetScoringOpts() : 0; } BlastEffectiveLengthsOptions * GetEffLenOpts() const { return m_Local ? m_Local->GetEffLenOpts() : 0; } private: /// Prohibit copy c-tor CBlastOptions(const CBlastOptions& bo); /// Prohibit assignment operator CBlastOptions& operator=(const CBlastOptions& bo); // Pointers to local and remote objects CBlastOptionsLocal * m_Local; CBlastOptionsRemote * m_Remote; void x_Throwx(const string& msg ) const { cout << "thrown: " << msg << endl; NCBI_THROW(CBlastException, eInternal, msg); }};inline EProgramCBlastOptionsLocal::GetProgram() const{ return m_Program;}inline voidCBlastOptionsLocal::SetProgram(EProgram p){ _ASSERT(p >= eBlastn && p < eBlastProgramMax); m_Program = p;}inline const char*CBlastOptionsLocal::GetMatrixName() const{ return m_ScoringOpts->matrix;}inline voidCBlastOptionsLocal::SetMatrixName(const char* matrix){ if (!matrix) return; sfree(m_ScoringOpts->matrix); m_ScoringOpts->matrix = strdup(matrix);}inline const char* CBlastOptionsLocal::GetMatrixPath() const{ return m_ScoringOpts->matrix_path;}inline void CBlastOptionsLocal::SetMatrixPath(const char* path){ if (!path) return; sfree(m_ScoringOpts->matrix_path); m_ScoringOpts->matrix_path = strdup(path);}inline intCBlastOptionsLocal::GetWordThreshold() const{ return m_LutOpts->threshold;}inline voidCBlastOptionsLocal::SetWordThreshold(int w){ m_LutOpts->threshold = w;}inline intCBlastOptionsLocal::GetLookupTableType() const{ return m_LutOpts->lut_type;}inline voidCBlastOptionsLocal::SetLookupTableType(int type){ m_LutOpts->lut_type = type; if (type == MB_LOOKUP_TABLE) { m_LutOpts->max_positions = INT4_MAX; m_LutOpts->word_size = BLAST_WORDSIZE_MEGABLAST; } }inline shortCBlastOptionsLocal::GetWordSize() const{ return m_LutOpts->word_size;}inline voidCBlastOptionsLocal::SetWordSize(short ws){ m_LutOpts->word_size = ws;}inline intCBlastOptionsLocal::GetAlphabetSize() const{ return m_LutOpts->alphabet_size;}inline voidCBlastOptionsLocal::SetAlphabetSize(int s){ m_LutOpts->alphabet_size = s;}inline unsigned charCBlastOptionsLocal::GetScanStep() const{ return m_LutOpts->scan_step;}inline voidCBlastOptionsLocal::SetScanStep(unsigned char s){ m_LutOpts->scan_step = s;}inline unsigned charCBlastOptionsLocal::GetMBTemplateLength() const{ return m_LutOpts->mb_template_length;}inline voidCBlastOptionsLocal::SetMBTemplateLength(unsigned char len){ m_LutOpts->mb_template_length = len;}inline unsigned charCBlastOptionsLocal::GetMBTemplateType() const{ return m_LutOpts->mb_template_type;}inline voidCBlastOptionsLocal::SetMBTemplateType(unsigned char type){ m_LutOpts->mb_template_type = type;}inline intCBlastOptionsLocal::GetMBMaxPositions() const{ return m_LutOpts->max_positions;}inline voidCBlastOptionsLocal::SetMBMaxPositions(int m){ m_LutOpts->max_positions = m;}/******************* Query setup options ************************/inline const char*CBlastOptionsLocal::GetFilterString() const{ return m_QueryOpts->filter_string;}inline voidCBlastOptionsLocal::SetFilterString(const char* f){ if (!f) return; sfree(m_QueryOpts->filter_string);#if 0 if (!StringICmp(f, "T")) { if (m_Program == eBlastn) m_QueryOpts->filter_string = strdup("D"); else m_QueryOpts->filter_string = strdup("S"); } else { m_QueryOpts->filter_string = strdup(f); }#endif m_QueryOpts->filter_string = strdup(f);}inline objects::ENa_strandCBlastOptionsLocal::GetStrandOption() const{ return (objects::ENa_strand) m_QueryOpts->strand_option;}inline voidCBlastOptionsLocal::SetStrandOption(objects::ENa_strand s){ m_QueryOpts->strand_option = (unsigned char) s;}inline intCBlastOptionsLocal::GetQueryGeneticCode() const{ return m_QueryOpts->genetic_code;}inline voidCBlastOptionsLocal::SetQueryGeneticCode(int gc){ m_QueryOpts->genetic_code = gc;}/******************* Initial word options ***********************/inline intCBlastOptionsLocal::GetWindowSize() const{ return m_InitWordOpts->window_size;}inline voidCBlastOptionsLocal::SetWindowSize(int s){ m_InitWordOpts->window_size = s;}inline SeedContainerTypeCBlastOptionsLocal::GetSeedContainerType() const{ return m_InitWordOpts->container_type;}inline void CBlastOptionsLocal::SetSeedContainerType(SeedContainerType type){ ASSERT(type < eMaxContainerType); m_InitWordOpts->container_type = type;}inline SeedExtensionMethodCBlastOptionsLocal::GetSeedExtensionMethod() const{ return m_InitWordOpts->extension_method;}inline void CBlastOptionsLocal::SetSeedExtensionMethod(SeedExtensionMethod method){ ASSERT(method < eMaxSeedExtensionMethod); m_InitWordOpts->extension_method = method;}inline boolCBlastOptionsLocal::GetVariableWordSize() const{ return m_InitWordOpts->variable_wordsize ? true: false;}inline void CBlastOptionsLocal::SetVariableWordSize(bool val){ m_InitWordOpts->variable_wordsize = val;}inline boolCBlastOptionsLocal::GetUngappedExtension() const{ return m_InitWordOpts->ungapped_extension ? true : false;}inline void CBlastOptionsLocal::SetUngappedExtension(bool val){ m_InitWordOpts->ungapped_extension = val;}inline doubleCBlastOptionsLocal::GetXDropoff() const{ return m_InitWordOpts->x_dropoff;}inline voidCBlastOptionsLocal::SetXDropoff(double x){ m_InitWordOpts->x_dropoff = x;}/******************* Gapped extension options *******************/inline doubleCBlastOptionsLocal::GetGapXDropoff() const{ return m_ExtnOpts->gap_x_dropoff;}inline voidCBlastOptionsLocal::SetGapXDropoff(double x){ m_ExtnOpts->gap_x_dropoff = x;}inline doubleCBlastOptionsLocal::GetGapXDropoffFinal() const{ return m_ExtnOpts->gap_x_dropoff_final;}inline voidCBlastOptionsLocal::SetGapXDropoffFinal(double x){ m_ExtnOpts->gap_x_dropoff_final = x;}inline doubleCBlastOptionsLocal::GetGapTrigger() const{ return m_ExtnOpts->gap_trigger;}inline voidCBlastOptionsLocal::SetGapTrigger(double g){ m_ExtnOpts->gap_trigger = g;}inline EBlastPrelimGapExtCBlastOptionsLocal::GetGapExtnAlgorithm() const{ return m_ExtnOpts->ePrelimGapExt;}inline voidCBlastOptionsLocal::SetGapExtnAlgorithm(EBlastPrelimGapExt a){ m_ExtnOpts->ePrelimGapExt = a;}inline EBlastTbackExtCBlastOptionsLocal::GetGapTracebackAlgorithm() const{ return m_ExtnOpts->eTbackExt;}inline voidCBlastOptionsLocal::SetGapTracebackAlgorithm(EBlastTbackExt a){ m_ExtnOpts->eTbackExt = a;}inline voidCBlastOptionsLocal::SetSkipTraceback(bool skip){ m_ExtnOpts->skip_traceback = skip;}/******************* Hit saving options *************************/inline intCBlastOptionsLocal::GetHitlistSize() const{ return m_HitSaveOpts->hitlist_size;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -