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

Go to the SVN repository for this file.

1 #ifndef ALGO_BLAST_API___DISC_NUCL_OPTIONS__HPP
2 #define ALGO_BLAST_API___DISC_NUCL_OPTIONS__HPP
3 
4 /* $Id: disc_nucl_options.hpp 33815 2007-05-04 17:18:18Z kazimird $
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 disc_nucl_options.hpp
34 /// Declares the CDiscNucleotideOptionsHandle class.
35 
37 
38 /** @addtogroup AlgoBlast
39  *
40  * @{
41  */
42 
43 
45 BEGIN_SCOPE(blast)
46 
47 /// Handle to the nucleotide-nucleotide options to the discontiguous
48 /// BLAST algorithm.
49 ///
50 /// Adapter class for nucleotide-nucleotide discontiguous 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  /******************* Lookup table options ***********************/
63  /// Returns TemplateLength
64  unsigned char GetTemplateLength() const {
65  return m_Opts->GetMBTemplateLength();
66  }
67  /// Sets TemplateLength
68  /// @param length TemplateLength [in]
69  void SetTemplateLength(unsigned char length)
70  {
71  m_Opts->SetMBTemplateLength(length);
72  }
73 
74  /// Returns TemplateType
75  unsigned char GetTemplateType() const {
76  return m_Opts->GetMBTemplateType();
77  }
78  /// Sets TemplateType
79  /// @param type TemplateType [in]
80  void SetTemplateType(unsigned char type) {
81  m_Opts->SetMBTemplateType(type);
82  }
83 
84  /// Sets WordSize
85  /// @param ws WordSize [in]
86  void SetWordSize(int ws) {
87  if (ws == 11 || ws == 12) {
88  m_Opts->SetWordSize(ws);
89  } else {
90  NCBI_THROW(CBlastException, eInvalidOptions,
91  "Word size must be 11 or 12 only");
92  }
93  }
94 
95  /// NOTE: Unavailable for discontiguous megablast
96  /// @throws CBlastException if this is called on an object configured for
97  /// discontiguous megablast
98  void SetTraditionalBlastnDefaults();
99 
100 protected:
101  /// Set the program and service name for remote blast.
103  {
104  m_Opts->SetRemoteProgramAndService_Blast3("blastn", "megablast");
105  }
106 
107  /// Sets MBLookupTableDefaults
108  void SetMBLookupTableDefaults();
109  /// Sets MBInitialWordOptionsDefaults
110  void SetMBInitialWordOptionsDefaults();
111  /// Sets MBGappedExtensionDefaults
112  void SetMBGappedExtensionDefaults();
113  /// Sets MBScoringOptionsDefaults
114  void SetMBScoringOptionsDefaults();
115 
116 private:
117  /// Disallow copy constructor
119  /// Disallow assignment operator
121 };
122 
123 END_SCOPE(blast)
125 
126 
127 /* @} */
128 
129 
130 #endif /* ALGO_BLAST_API___DISC_NUCL_OPTIONS__HPP */
#define NCBI_XBLAST_EXPORT
NULL operations for other cases.
Definition: blast_export.h:65
Declares the CBlastNucleotideOptionsHandle class.
Defines BLAST error codes (user errors included)
Handle to the nucleotide-nucleotide 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 nucleotide-nucleotide options to the discontiguous BLAST algorithm.
virtual void SetRemoteProgramAndService_Blast3()
Set the program and service name for remote blast.
unsigned char GetTemplateType() const
Returns TemplateType.
CDiscNucleotideOptionsHandle & operator=(const CDiscNucleotideOptionsHandle &rhs)
Disallow assignment operator.
void SetWordSize(int ws)
Sets WordSize.
void SetTemplateType(unsigned char type)
Sets TemplateType.
unsigned char GetTemplateLength() const
Returns TemplateLength.
void SetTemplateLength(unsigned char length)
Sets TemplateLength.
CDiscNucleotideOptionsHandle(const CDiscNucleotideOptionsHandle &rhs)
Disallow copy constructor.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
Definition: ncbiexpt.hpp:704
#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
Definition: type.c:6
Modified on Fri Sep 20 14:58:15 2024 by modify_doxy.py rev. 669887