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

Go to the SVN repository for this file.

1 #ifndef ALGO_BLAST_API___BLASTX_OPTIONS__HPP
2 #define ALGO_BLAST_API___BLASTX_OPTIONS__HPP
3 
4 /* $Id: blastx_options.hpp 55051 2012-07-10 12:20:47Z madden $
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 blastx_options.hpp
34 /// Declares the CBlastxOptionsHandle class.
35 
36 
38 
39 /** @addtogroup AlgoBlast
40  *
41  * @{
42  */
43 
44 
46 BEGIN_SCOPE(blast)
47 
48 /// Handle to the translated nucleotide-protein options to the BLAST algorithm.
49 ///
50 /// Adapter class for translated nucleotide-protein BLAST comparisons.
51 /// Exposes an interface to allow manipulation the options that are relevant to
52 /// this type of search.
53 
56 {
57 public:
58 
59  /// Creates object with default options set
61 
62  /******************* Query setup options ************************/
63  /// Returns StrandOption
65  return m_Opts->GetStrandOption();
66  }
67  /// Sets StrandOption
68  /// @param strand StrandOption [in]
70  m_Opts->SetStrandOption(strand);
71  }
72 
73  /// Returns QueryGeneticCode
74  int GetQueryGeneticCode() const { return m_Opts->GetQueryGeneticCode(); }
75  /// Sets QueryGeneticCode
76  /// @param gc QueryGeneticCode [in]
77  void SetQueryGeneticCode(int gc) { m_Opts->SetQueryGeneticCode(gc); }
78 
79  /************************ Scoring options ************************/
80  /// Returns OutOfFrameMode
81  /// @todo is this needed or can we use a sentinel for the frame shift penalty?
82  bool GetOutOfFrameMode() const { return m_Opts->GetOutOfFrameMode(); }
83  /// Sets OutOfFrameMode
84  /// @param m OutOfFrameMode [in]
85  void SetOutOfFrameMode(bool m = true) { m_Opts->SetOutOfFrameMode(m); }
86 
87  /// Returns FrameShiftPenalty
88  int GetFrameShiftPenalty() const { return m_Opts->GetFrameShiftPenalty(); }
89  /// Sets FrameShiftPenalty
90  /// @param p FrameShiftPenalty [in]
91  void SetFrameShiftPenalty(int p) { m_Opts->SetFrameShiftPenalty(p); }
92 
93  /// Returns LongestIntronLength
94  int GetLongestIntronLength() const { return m_Opts->GetLongestIntronLength(); }
95  /// Sets LongestIntronLength
96  /// @param l LongestIntronLength [in]
97  void SetLongestIntronLength(int l) { m_Opts->SetLongestIntronLength(l); }
98 
99 
100 /******************* Gapped extension options *******************/
101 
102  /// Returns this mode, which mostly specifies whether composition of db
103  /// sequence is taken into account when calculating expect values.
105  return m_Opts->GetCompositionBasedStats();
106  }
107 
108  /// Sets this mode, which mostly specifies whether composition of db
109  /// sequence is taken into account when calculating expect values.
110  /// @param mode composition-based statistics mode [in]
112  m_Opts->SetCompositionBasedStats(mode);
113  }
114 
115  /// Returns this mode, specifying that smith waterman rather than the normal blast heuristic
116  /// should be used for final extensions.
117  /// into account when calculating expect values.
118  bool GetSmithWatermanMode() const { return m_Opts->GetSmithWatermanMode(); }
119 
120  /// Sets this mode, specifying that smith waterman rather than the normal blast heuristic
121  /// should be used for final extensions.
122  /// @param m use smith-waterman if true [in]
123  void SetSmithWatermanMode(bool m = false) { m_Opts->SetSmithWatermanMode(m); }
124 
125 protected:
126  /// Set the program and service name for remote blast.
128  {
129  m_Opts->SetRemoteProgramAndService_Blast3("blastx", "plain");
130  }
131 
132  /// Overrides LookupTableDefaults for blastx options
133  void SetLookupTableDefaults();
134  /// Overrides QueryOptionDefaults for blastx options
135  void SetQueryOptionDefaults();
136  /// Overrides ScoringOptionsDefaults for blastx options
137  void SetScoringOptionsDefaults();
138  /// Overrides HitSavingOptionsDefaults for blastx options
139  void SetHitSavingOptionsDefaults();
140  /// Overrides SetGappedExtensionDefaults for blastx option
141  void SetGappedExtensionDefaults();
142 
143 private:
144  /// Disallow copy constructor
146  /// Disallow assignment operator
148 };
149 
150 END_SCOPE(blast)
152 
153 
154 /* @} */
155 
156 #endif /* ALGO_BLAST_API___BLASTX_OPTIONS__HPP */
#define NCBI_XBLAST_EXPORT
NULL operations for other cases.
Definition: blast_export.h:65
Declares the CBlastProteinOptionsHandle class.
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.
Handle to the translated nucleotide-protein options to the BLAST algorithm.
ECompoAdjustModes
An collection of constants that specify all permissible modes of composition adjustment.
void SetLongestIntronLength(int l)
Sets LongestIntronLength.
int GetFrameShiftPenalty() const
Returns FrameShiftPenalty.
bool GetOutOfFrameMode() const
Returns OutOfFrameMode.
virtual void SetRemoteProgramAndService_Blast3()
Set the program and service name for remote blast.
void SetQueryGeneticCode(int gc)
Sets QueryGeneticCode.
void SetOutOfFrameMode(bool m=true)
Sets OutOfFrameMode.
void SetFrameShiftPenalty(int p)
Sets FrameShiftPenalty.
bool GetSmithWatermanMode() const
Returns this mode, specifying that smith waterman rather than the normal blast heuristic should be us...
ECompoAdjustModes GetCompositionBasedStats() const
Returns this mode, which mostly specifies whether composition of db sequence is taken into account wh...
CBlastxOptionsHandle(const CBlastxOptionsHandle &rhs)
Disallow copy constructor.
objects::ENa_strand GetStrandOption() const
Returns StrandOption.
void SetSmithWatermanMode(bool m=false)
Sets this mode, specifying that smith waterman rather than the normal blast heuristic should be used ...
int GetQueryGeneticCode() const
Returns QueryGeneticCode.
void SetStrandOption(objects::ENa_strand strand)
Sets StrandOption.
int GetLongestIntronLength() const
Returns LongestIntronLength.
void SetCompositionBasedStats(ECompoAdjustModes mode)
Sets this mode, which mostly specifies whether composition of db sequence is taken into account when ...
CBlastxOptionsHandle & operator=(const CBlastxOptionsHandle &rhs)
Disallow assignment operator.
#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
mdb_mode_t mode
Definition: lmdb++.h:38
static SLJIT_INLINE sljit_ins l(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
Modified on Fri Sep 20 14:58:33 2024 by modify_doxy.py rev. 669887