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

Go to the SVN repository for this file.

1 #ifndef ALGO_BLAST_API___BLAST_NUCL_OPTIONS__HPP
2 #define ALGO_BLAST_API___BLAST_NUCL_OPTIONS__HPP
3 
4 /* $Id: blast_nucl_options.hpp 58668 2013-06-26 13:46:36Z 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_nucl_options.hpp
34 /// Declares the CBlastNucleotideOptionsHandle class.
35 
37 
38 /** @addtogroup AlgoBlast
39  *
40  * @{
41  */
42 
44 BEGIN_SCOPE(blast)
45 
46 /// Handle to the nucleotide-nucleotide options to the BLAST algorithm.
47 ///
48 /// Adapter class for nucleotide-nucleotide BLAST comparisons.
49 /// Exposes an interface to allow manipulation the options that are relevant to
50 /// this type of search.
51 ///
52 /// NB: By default, traditional megablast defaults are used. If blastn defaults
53 /// are desired, please call the appropriate member function:
54 ///
55 /// void SetTraditionalBlastnDefaults();
56 /// void SetTraditionalMegablastDefaults();
57 
59  public CBlastOptionsHandle
60 {
61 public:
62 
63  /// Creates object with default options set
65 
66  /// Create Options Handle from Existing CBlastOptions Object
68 
69  /// Sets Defaults
70  virtual void SetDefaults();
71 
72  /******************* Lookup table options ***********************/
73  /// Returns LookupTableType
74  ELookupTableType GetLookupTableType() const { return m_Opts->GetLookupTableType(); }
75  /// Sets LookupTableType
76  /// @param type LookupTableType [in]
78  {
79  m_Opts->SetLookupTableType(type);
80  }
81 
82  /// Returns WordSize
83  int GetWordSize() const { return m_Opts->GetWordSize(); }
84  /// Sets WordSize
85  /// @param ws WordSize [in]
86  void SetWordSize(int ws)
87  {
88  m_Opts->SetWordSize(ws);
89  }
90 
91  /******************* Query setup options ************************/
92  /// Returns StrandOption
94  return m_Opts->GetStrandOption();
95  }
96  /// Sets StrandOption
97  /// @param strand StrandOption [in]
99  m_Opts->SetStrandOption(strand);
100  }
101 
102  /// Is dust filtering enabled?
103  bool GetDustFiltering() const { return m_Opts->GetDustFiltering(); }
104  /// Enable dust filtering.
105  /// @param val enable dust filtering [in]
106  void SetDustFiltering(bool val) { m_Opts->SetDustFiltering(val); }
107 
108  /// Get level parameter for dust
109  int GetDustFilteringLevel() const { return m_Opts->GetDustFilteringLevel(); }
110  /// Set level parameter for dust. Acceptable values: 2 < level < 64
111  /// @param level dust filtering parameter level [in]
112  void SetDustFilteringLevel(int level) { m_Opts->SetDustFilteringLevel(level); }
113 
114  /// Get window parameter for dust
115  int GetDustFilteringWindow() const { return m_Opts->GetDustFilteringWindow(); }
116  /// Set window parameter for dust. Acceptable values: 8 < windowsize < 64
117  /// @param window dust filtering parameter window [in]
118  void SetDustFilteringWindow(int window) { m_Opts->SetDustFilteringWindow(window); }
119 
120  /// Get linker parameter for dust
121  int GetDustFilteringLinker() const { return m_Opts->GetDustFilteringLinker(); }
122  /// Set linker parameter for dust. Acceptable values: 1 < linker < 32
123  /// @param linker dust filtering parameter linker [in]
124  void SetDustFilteringLinker(int linker) { m_Opts->SetDustFilteringLinker(linker); }
125 
126  /// Is repeat filtering enabled?
127  bool GetRepeatFiltering() const { return m_Opts->GetRepeatFiltering(); }
128  /// Enable repeat filtering.
129  /// @param val enable repeat filtering [in]
130  void SetRepeatFiltering(bool val) { m_Opts->SetRepeatFiltering(val); }
131 
132  /// Get the repeat filtering database
133  const char* GetRepeatFilteringDB() const { return m_Opts->GetRepeatFilteringDB(); }
134  /// Enable repeat filtering.
135  /// @param db repeat filtering database [in]
136  void SetRepeatFilteringDB(const char* db) { m_Opts->SetRepeatFilteringDB(db); }
137 
138  /// Get the window masker taxid (or 0 if not set).
139  int GetWindowMaskerTaxId() const { return m_Opts->GetWindowMaskerTaxId(); }
140 
141  /// Enable window masker and select a taxid (or 0 to disable).
142  /// @param taxid Select Window Masker filtering database for this taxid [in]
143  void SetWindowMaskerTaxId(int taxid) { m_Opts->SetWindowMaskerTaxId(taxid); }
144 
145  /// Get the window masker database name (or NULL if not set).
146  const char* GetWindowMaskerDatabase() const
147  {
148  return m_Opts->GetWindowMaskerDatabase();
149  }
150 
151  /// Enable window masker and select a database (or NULL to disable).
152  /// @param taxid Select Window Masker filtering database by filename [in]
153  void SetWindowMaskerDatabase(const char* db)
154  {
155  m_Opts->SetWindowMaskerDatabase(db);
156  }
157 
158  /******************* Initial word options ***********************/
159 
160  /// Returns XDropoff
161  double GetXDropoff() const { return m_Opts->GetXDropoff(); }
162  /// Sets XDropoff
163  /// @param x XDropoff [in]
164  void SetXDropoff(double x) { m_Opts->SetXDropoff(x); }
165 
166  /******************* Gapped extension options *******************/
167  /// Returns GapExtnAlgorithm
168  EBlastPrelimGapExt GetGapExtnAlgorithm() const { return m_Opts->GetGapExtnAlgorithm(); }
169 
170  /// Sets GapExtnAlgorithm
171  /// @param algo GapExtnAlgorithm [in]
172  void SetGapExtnAlgorithm(EBlastPrelimGapExt algo) {m_Opts->SetGapExtnAlgorithm(algo);}
173 
174  /// Returns GapTracebackAlgorithm
175  EBlastTbackExt GetGapTracebackAlgorithm() const { return m_Opts->GetGapTracebackAlgorithm(); }
176 
177  /// Sets GapTracebackAlgorithm
178  /// @param algo GapTracebackAlgorithm [in]
179  void SetGapTracebackAlgorithm(EBlastTbackExt algo) {m_Opts->SetGapTracebackAlgorithm(algo); }
180 
181  /************************ Scoring options ************************/
182  /// Returns MatchReward
183  int GetMatchReward() const { return m_Opts->GetMatchReward(); }
184  /// Sets MatchReward
185  /// @param r MatchReward [in]
186  void SetMatchReward(int r) { m_Opts->SetMatchReward(r); }
187 
188  /// Returns MismatchPenalty
189  int GetMismatchPenalty() const { return m_Opts->GetMismatchPenalty(); }
190  /// Sets MismatchPenalty
191  /// @param p MismatchPenalty [in]
192  void SetMismatchPenalty(int p) { m_Opts->SetMismatchPenalty(p); }
193 
194  /// Returns MatrixName
195  const char* GetMatrixName() const { return m_Opts->GetMatrixName(); }
196  /// Sets MatrixName
197  /// @param matrix MatrixName [in]
198  void SetMatrixName(const char* matrix) { m_Opts->SetMatrixName(matrix); }
199 
200  /// Returns GapOpeningCost
201  int GetGapOpeningCost() const { return m_Opts->GetGapOpeningCost(); }
202  /// Sets GapOpeningCost
203  /// @param g GapOpeningCost [in]
204  void SetGapOpeningCost(int g) { m_Opts->SetGapOpeningCost(g); }
205 
206  /// Returns GapExtensionCost
207  int GetGapExtensionCost() const { return m_Opts->GetGapExtensionCost(); }
208  /// Sets GapExtensionCost
209  /// @param e GapExtensionCost [in]
210  void SetGapExtensionCost(int e) { m_Opts->SetGapExtensionCost(e); }
211 
212  /// Sets TraditionalBlastnDefaults
213  void SetTraditionalBlastnDefaults();
214  /// Sets TraditionalMegablastDefaults
215  void SetTraditionalMegablastDefaults();
216  /// Sets default options for VecScreen
217  void SetVecScreenDefaults();
218 
219 protected:
220  /// Set the program and service name for remote blast.
222  {
223  m_Opts->SetRemoteProgramAndService_Blast3("blastn", "megablast");
224  }
225 
226  /// Overrides LookupTableDefaults for nucleotide options
227  virtual void SetLookupTableDefaults();
228  /// Overrides MBLookupTableDefaults for nucleotide options
229  virtual void SetMBLookupTableDefaults();
230  /// Overrides QueryOptionDefaults for nucleotide options
231  virtual void SetQueryOptionDefaults();
232  /// Overrides InitialWordOptionsDefaults for nucleotide options
233  virtual void SetInitialWordOptionsDefaults();
234  /// Overrides MBInitialWordOptionsDefaults for nucleotide options
235  virtual void SetMBInitialWordOptionsDefaults();
236  /// Overrides GappedExtensionDefaults for nucleotide options
237  virtual void SetGappedExtensionDefaults();
238  /// Overrides MBGappedExtensionDefaults for nucleotide options
239  virtual void SetMBGappedExtensionDefaults();
240  /// Overrides ScoringOptionsDefaults for nucleotide options
241  virtual void SetScoringOptionsDefaults();
242  /// Overrides MBScoringOptionsDefaults for nucleotide options
243  virtual void SetMBScoringOptionsDefaults();
244  /// Overrides HitSavingOptionsDefaults for nucleotide options
245  virtual void SetHitSavingOptionsDefaults();
246  /// Overrides MBHitSavingOptionsDefaults for nucleotide options
247  virtual void SetMBHitSavingOptionsDefaults();
248  /// Overrides EffectiveLengthsOptionsDefaults for nucleotide options
249  virtual void SetEffectiveLengthsOptionsDefaults();
250  /// Overrides SubjectSequenceOptionsDefaults for nucleotide options
251  virtual void SetSubjectSequenceOptionsDefaults();
252 
253 private:
254  /// Disallow copy constructor
256  /// Disallow assignment operator
258 };
259 
260 END_SCOPE(blast)
262 
263 
264 /* @} */
265 
266 
267 #endif /* ALGO_BLAST_API___BLAST_NUCL_OPTIONS__HPP */
#define NCBI_XBLAST_EXPORT
NULL operations for other cases.
Definition: blast_export.h:65
EBlastPrelimGapExt
The algorithm to be used for preliminary gapped extensions.
EBlastTbackExt
The algorithm to be used for final gapped extensions with traceback.
ELookupTableType
Types of the lookup table.
Declares the CBlastOptionsHandle and CBlastOptionsFactory classes.
Handle to the nucleotide-nucleotide options to the BLAST algorithm.
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.
int GetDustFilteringLinker() const
Get linker parameter for dust.
void SetLookupTableType(ELookupTableType type)
Sets LookupTableType.
int GetGapExtensionCost() const
Returns GapExtensionCost.
EBlastPrelimGapExt GetGapExtnAlgorithm() const
Returns GapExtnAlgorithm.
void SetDustFilteringWindow(int window)
Set window parameter for dust.
EBlastTbackExt GetGapTracebackAlgorithm() const
Returns GapTracebackAlgorithm.
bool GetDustFiltering() const
Is dust filtering enabled?
int GetWordSize() const
Returns WordSize.
void SetMatchReward(int r)
Sets MatchReward.
int GetMatchReward() const
Returns MatchReward.
void SetGapExtnAlgorithm(EBlastPrelimGapExt algo)
Sets GapExtnAlgorithm.
void SetWindowMaskerTaxId(int taxid)
Enable window masker and select a taxid (or 0 to disable).
void SetDustFilteringLinker(int linker)
Set linker parameter for dust.
const char * GetMatrixName() const
Returns MatrixName.
double GetXDropoff() const
Returns XDropoff.
int GetDustFilteringLevel() const
Get level parameter for dust.
void SetGapTracebackAlgorithm(EBlastTbackExt algo)
Sets GapTracebackAlgorithm.
const char * GetWindowMaskerDatabase() const
Get the window masker database name (or NULL if not set).
CBlastNucleotideOptionsHandle(const CBlastNucleotideOptionsHandle &rhs)
Disallow copy constructor.
virtual void SetRemoteProgramAndService_Blast3()
Set the program and service name for remote blast.
void SetMismatchPenalty(int p)
Sets MismatchPenalty.
void SetMatrixName(const char *matrix)
Sets MatrixName.
void SetRepeatFilteringDB(const char *db)
Enable repeat filtering.
void SetXDropoff(double x)
Sets XDropoff.
void SetRepeatFiltering(bool val)
Enable repeat filtering.
bool GetRepeatFiltering() const
Is repeat filtering enabled?
int GetDustFilteringWindow() const
Get window parameter for dust.
void SetGapExtensionCost(int e)
Sets GapExtensionCost.
int GetGapOpeningCost() const
Returns GapOpeningCost.
objects::ENa_strand GetStrandOption() const
Returns StrandOption.
int GetWindowMaskerTaxId() const
Get the window masker taxid (or 0 if not set).
const char * GetRepeatFilteringDB() const
Get the repeat filtering database.
ELookupTableType GetLookupTableType() const
Returns LookupTableType.
void SetWordSize(int ws)
Sets WordSize.
CBlastNucleotideOptionsHandle & operator=(const CBlastNucleotideOptionsHandle &rhs)
Disallow assignment operator.
void SetDustFiltering(bool val)
Enable dust filtering.
int GetMismatchPenalty() const
Returns MismatchPenalty.
void SetWindowMaskerDatabase(const char *db)
Enable window masker and select a database (or NULL to disable).
void SetDustFilteringLevel(int level)
Set level parameter for dust.
void SetGapOpeningCost(int g)
Sets GapOpeningCost.
void SetStrandOption(objects::ENa_strand strand)
Sets StrandOption.
#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
ENa_strand
strand of nucleic acid
Definition: Na_strand_.hpp:64
ESERV_Algo algo
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
Definition: type.c:6
int g(Seg_Gsm *spe, Seq_Mtf *psm, Thd_Gsm *tdg)
Definition: thrddgri.c:44
Modified on Thu May 30 12:24:27 2024 by modify_doxy.py rev. 669887