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 103061 2024-09-03 13:55:47Z boratyng $
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  /************************ Algorithm options ************************/
130  /// Returns true if chaining is enabled, false otherwise
131  bool GetChaning() const { return m_Opts->GetChaining(); }
132  /// Enables/disables chaining
133  /// @param ch Chaining enabled, if ch is true [in]
134  void SetChaining(bool ch) { m_Opts->SetChaining(ch); }
135 
136 protected:
137  /// Set the program and service name for remote blast.
139  {
140  m_Opts->SetRemoteProgramAndService_Blast3("blastp", "plain");
141  }
142 
143  /// Overrides LookupTableDefaults for protein options
144  virtual void SetLookupTableDefaults();
145  /// Overrides QueryOptionDefaults for protein options
146  virtual void SetQueryOptionDefaults();
147  /// Overrides InitialWordOptionsDefaults for protein options
148  virtual void SetInitialWordOptionsDefaults();
149  /// Overrides GappedExtensionDefaults for protein options
150  virtual void SetGappedExtensionDefaults();
151  /// Overrides ScoringOptionsDefaults for protein options
152  virtual void SetScoringOptionsDefaults();
153  /// Overrides HitSavingOptionsDefaults for protein options
154  virtual void SetHitSavingOptionsDefaults();
155  /// Overrides EffectiveLengthsOptionsDefaults for protein options
156  virtual void SetEffectiveLengthsOptionsDefaults();
157  /// Overrides SubjectSequenceOptionsDefaults for protein options
158  virtual void SetSubjectSequenceOptionsDefaults();
159 
160 private:
161  /// Disallow copy constructor
163  /// Disallow assignment operator
165 };
166 
167 END_SCOPE(blast)
169 
170 
171 /* @} */
172 
173 #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?
bool GetChaning() const
Returns true if chaining is enabled, false otherwise.
void SetChaining(bool ch)
Enables/disables chaining.
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 Fri Sep 20 14:57:04 2024 by modify_doxy.py rev. 669887