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

Go to the SVN repository for this file.

1 /* $Id: blastkmeroptions.hpp 78080 2017-05-24 01:23:19Z ucko $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Author: Tom Madden
27  *
28  * File Description:
29  * Options for BLAST-kmer searches
30  *
31  */
32 
33 #ifndef BLAST_KMER_OPTIONS_HPP
34 #define BLAST_KMER_OPTIONS_HPP
35 
36 #include <corelib/ncbistd.hpp>
40 
42 USING_SCOPE(blast);
43 
44 
45 /// Class of optiosn for the KMEr search.
47 {
48 public:
49  /// Constructor
51 
52  /// Destructor
54 
55  /// Checks that options are valid
56  bool Validate() const;
57 
58  /// Get the threshold
59  /// @return double between 0 and 1.
60  double GetThresh() const {return m_Thresh;}
61 
62  /// Set the threshold. 1 means (nearly) identical matches.
63  /// the closer to zero, the lower the identity of the matches
64  /// is likely to be.
65  // @thresh double 0 < thresh <= 1 [in]
66  void SetThresh(double thresh) {m_Thresh = thresh;}
67 
68  /// Get the number of LSH hits to initiate the
69  /// calculation of the Jaccard distance.
70  /// Returning zero means CBlastKmer chooses a value based upon the alphabet.
71  /// @return integer
72  int GetMinHits() const {return m_MinHits;}
73 
74  /// Set the minimum number of LSH hits to initiate
75  /// a calculation of the Jaccard distance.
76  /// Setting to zero permits CBlastKmer to choose a value based upon the alphabet.
77  // @param minhits integer
78  void SetMinHits(int minhits) {m_MinHits = minhits;}
79 
80  /// Gets the number of matches (subject sequences)
81  /// to return
82  /// @return integer
83  int GetNumTargetSeqs() const {return m_NumTargetSeqs;}
84 
85  /// Sets the number of matches (subject sequences)
86  /// to return. Zero indicates all.
87  /// @param num integer
88  void SetNumTargetSeqs(int matches) {m_NumTargetSeqs = matches;}
89 
90 private:
91 
92  /// value of the threshold
93  double m_Thresh;
94 
95  /// Value of number of LSH hits to initiate the
96  /// calculation of the Jaccard distance.
97  int m_MinHits;
98 
99  /// Number of matches to return
101 };
102 
103 
105 
106 #endif /* BLAST_KMER_OPTIONS_HPP */
Declares the BLAST exception class.
Defines to provide correct exporting from BLAST DLL in Windows.
#define NCBI_XBLAST_EXPORT
NULL operations for other cases.
Definition: blast_export.h:65
USING_SCOPE(blast)
Class of optiosn for the KMEr search.
void SetNumTargetSeqs(int matches)
Sets the number of matches (subject sequences) to return.
int m_NumTargetSeqs
Number of matches to return.
~CBlastKmerOptions()
Destructor.
void SetThresh(double thresh)
Set the threshold.
void SetMinHits(int minhits)
Set the minimum number of LSH hits to initiate a calculation of the Jaccard distance.
int GetNumTargetSeqs() const
Gets the number of matches (subject sequences) to return.
double GetThresh() const
Get the threshold.
int GetMinHits() const
Get the number of LSH hits to initiate the calculation of the Jaccard distance.
int m_MinHits
Value of number of LSH hits to initiate the calculation of the Jaccard distance.
double m_Thresh
value of the threshold
CObject –.
Definition: ncbiobj.hpp:180
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
Modified on Sun Feb 25 03:08:36 2024 by modify_doxy.py rev. 669887