NCBI C++ ToolKit
blast_prot_options.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef ALGO_BLAST_API___BLAST_PROT_OPTIONS__HPP
2 #define ALGO_BLAST_API___BLAST_PROT_OPTIONS__HPP
3 
4 /* $Id: blast_prot_options.hpp 99040 2023-02-07 13:36:00Z fongah2 $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Christiam Camacho
30  *
31  */
32 
33 /// @file blast_prot_options.hpp
34 /// Declares the CBlastProteinOptionsHandle class.
35 
36 
38 
39 /** @addtogroup AlgoBlast
40  *
41  * @{
42  */
43 
45 BEGIN_SCOPE(blast)
46 
47 /// Handle to the protein-protein options to the BLAST algorithm.
48 ///
49 /// Adapter class for protein-protein BLAST comparisons.
50 /// Exposes an interface to allow manipulation the options that are relevant to
51 /// this type of search.
52 
54  public CBlastOptionsHandle
55 {
56 public:
57 
58  /// Creates object with default options set
60 
61  /// Create Options Handle from Existing CBlastOptions Object
63 
64  /******************* Lookup table options ***********************/
65  /// Returns WordThreshold
66  double GetWordThreshold() const { return m_Opts->GetWordThreshold(); }
67  /// Sets WordThreshold
68  /// @param wt WordThreshold [in]
69  void SetWordThreshold(double wt) { m_Opts->SetWordThreshold(wt); }
70 
71  /// Returns WordSize
72  int GetWordSize() const { return m_Opts->GetWordSize(); }
73  /// Sets WordSize
74  /// @param ws WordSize [in]
75  void SetWordSize(int ws);
76  /******************* Initial word options ***********************/
77 
78  /// Returns XDropoff
79  double GetXDropoff() const { return m_Opts->GetXDropoff(); }
80  /// Sets XDropoff
81  /// @param x XDropoff [in]
82  void SetXDropoff(double x) { m_Opts->SetXDropoff(x); }
83 
84  /******************* Query setup options ************************/
85  /// Is SEG filtering enabled?
86  bool GetSegFiltering() const { return m_Opts->GetSegFiltering(); }
87  /// Enable SEG filtering.
88  /// @param val enable SEG filtering [in]
89  void SetSegFiltering(bool val) { m_Opts->SetSegFiltering(val); }
90 
91  /// Get window parameter for seg
92  int GetSegFilteringWindow() const { return m_Opts->GetSegFilteringWindow(); }
93  /// Set window parameter for seg. Acceptable value are > 0.
94  /// @param window seg filtering parameter window [in]
95  void SetSegFilteringWindow(int window) { m_Opts->SetSegFilteringWindow(window); }
96 
97  /// Get locut parameter for seg
98  double GetSegFilteringLocut() const { return m_Opts->GetSegFilteringLocut(); }
99  /// Set locut parameter for seg. Acceptable values are greater than 0.
100  /// @param locut seg filtering parameter locut [in]
101  void SetSegFilteringLocut(double locut) { m_Opts->SetSegFilteringLocut(locut); }
102 
103  /// Get hicut parameter for seg
104  double GetSegFilteringHicut() const { return m_Opts->GetSegFilteringHicut(); }
105  /// Set hicut parameter for seg. Acceptable values are greater than Locut
106  /// (see SetSegFilteringLocut).
107  /// @param hicut seg filtering parameter hicut [in]
108  void SetSegFilteringHicut(double hicut) { m_Opts->SetSegFilteringHicut(hicut); }
109 
110  /************************ Scoring options ************************/
111  /// Returns MatrixName
112  const char* GetMatrixName() const { return m_Opts->GetMatrixName(); }
113  /// Sets MatrixName
114  /// @param matrix MatrixName [in]
115  void SetMatrixName(const char* matrix) { m_Opts->SetMatrixName(matrix); }
116 
117  /// Returns GapOpeningCost
118  int GetGapOpeningCost() const { return m_Opts->GetGapOpeningCost(); }
119  /// Sets GapOpeningCost
120  /// @param g GapOpeningCost [in]
121  void SetGapOpeningCost(int g) { m_Opts->SetGapOpeningCost(g); }
122 
123  /// Returns GapExtensionCost
124  int GetGapExtensionCost() const { return m_Opts->GetGapExtensionCost(); }
125  /// Sets GapExtensionCost
126  /// @param e GapExtensionCost [in]
127  void SetGapExtensionCost(int e) { m_Opts->SetGapExtensionCost(e); }
128 
129 protected:
130  /// Set the program and service name for remote blast.
132  {
133  m_Opts->SetRemoteProgramAndService_Blast3("blastp", "plain");
134  }
135 
136  /// Overrides LookupTableDefaults for protein options
137  virtual void SetLookupTableDefaults();
138  /// Overrides QueryOptionDefaults for protein options
139  virtual void SetQueryOptionDefaults();
140  /// Overrides InitialWordOptionsDefaults for protein options
141  virtual void SetInitialWordOptionsDefaults();
142  /// Overrides GappedExtensionDefaults for protein options
143  virtual void SetGappedExtensionDefaults();
144  /// Overrides ScoringOptionsDefaults for protein options
145  virtual void SetScoringOptionsDefaults();
146  /// Overrides HitSavingOptionsDefaults for protein options
147  virtual void SetHitSavingOptionsDefaults();
148  /// Overrides EffectiveLengthsOptionsDefaults for protein options
149  virtual void SetEffectiveLengthsOptionsDefaults();
150  /// Overrides SubjectSequenceOptionsDefaults for protein options
151  virtual void SetSubjectSequenceOptionsDefaults();
152 
153 private:
154  /// Disallow copy constructor
156  /// Disallow assignment operator
158 };
159 
160 END_SCOPE(blast)
162 
163 
164 /* @} */
165 
166 #endif /* ALGO_BLAST_API___BLAST_PROT_OPTIONS__HPP */
#define NCBI_XBLAST_EXPORT
NULL operations for other cases.
Definition: blast_export.h:65
Declares the CBlastOptionsHandle and CBlastOptionsFactory classes.
Handle to the options to the BLAST algorithm.
EAPILocality
Enumerates the possible contexts in which objects of this type can be used.
@ eLocal
To be used for running BLAST locally.
Handle to the protein-protein options to the BLAST algorithm.
virtual void SetRemoteProgramAndService_Blast3()
Set the program and service name for remote blast.
void SetGapExtensionCost(int e)
Sets GapExtensionCost.
double GetXDropoff() const
Returns XDropoff.
void SetWordThreshold(double wt)
Sets WordThreshold.
CBlastProteinOptionsHandle(CRef< CBlastOptions > opt)
Create Options Handle from Existing CBlastOptions Object.
bool GetSegFiltering() const
Is SEG filtering enabled?
int GetSegFilteringWindow() const
Get window parameter for seg.
CBlastProteinOptionsHandle & operator=(const CBlastProteinOptionsHandle &rhs)
Disallow assignment operator.
void SetGapOpeningCost(int g)
Sets GapOpeningCost.
double GetWordThreshold() const
Returns WordThreshold.
double GetSegFilteringHicut() const
Get hicut parameter for seg.
const char * GetMatrixName() const
Returns MatrixName.
int GetGapExtensionCost() const
Returns GapExtensionCost.
int GetWordSize() const
Returns WordSize.
void SetMatrixName(const char *matrix)
Sets MatrixName.
void SetXDropoff(double x)
Sets XDropoff.
int GetGapOpeningCost() const
Returns GapOpeningCost.
void SetSegFilteringWindow(int window)
Set window parameter for seg.
CBlastProteinOptionsHandle(const CBlastProteinOptionsHandle &rhs)
Disallow copy constructor.
void SetSegFiltering(bool val)
Enable SEG filtering.
double GetSegFilteringLocut() const
Get locut parameter for seg.
void SetSegFilteringLocut(double locut)
Set locut parameter for seg.
void SetSegFilteringHicut(double hicut)
Set hicut parameter for seg.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
int g(Seg_Gsm *spe, Seq_Mtf *psm, Thd_Gsm *tdg)
Definition: thrddgri.c:44
Modified on Tue May 28 05:48:56 2024 by modify_doxy.py rev. 669887