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

Go to the SVN repository for this file.

1 #ifndef ALGO_BLAST_API___BLASTP_KMER_OPTIONS_HPP
2 #define ALGO_BLAST_API___BLASTP_KMER_OPTIONS_HPP
3 
4 /* $Id: blastp_kmer_options.hpp 77825 2017-05-09 16:22:23Z 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: Tom Madden
30  *
31  */
32 
33 /// @file blastp_kmer_options.hpp
34 /// Declares the CBlastpKmerOptionsHandle class.
35 
37 
38 /** @addtogroup AlgoBlast
39  *
40  * @{
41  */
42 
44 BEGIN_SCOPE(blast)
45 
46 /// Handle to the KMER BLASTP options
47 ///
48 /// Adapter class for KMER BLASTP comparisons.
49 /// Exposes an interface to allow manipulation the options that are relevant to
50 /// this type of search.
51 
54 {
55 public:
56 
57  /// Creates object with default options set
61 
62  /******************* KMER specific options *******************/
63  /// Returns threshold for Jaccard distance (range: 0-1)
64  double GetThresh() const {
65  return m_Thresh;
66  }
67  /// Sets Threshold for Jaccard distance
68  /// @param thresh Jaccard threshold [in]
69  void SetThresh(double thresh = 0.1) {
70  m_Thresh = thresh;
71  }
72  /// Returns the number of hits to initiate calculation of Jaccard distance
73  int GetMinHits() const {
74  return m_MinHits;
75  }
76  /// Sets the number of hits ot initiate calculation of Jaccard distance
77  /// @param hits Minimum number of LSH hits to proceed with subject [in]
78  void SetMinHits(int minhits = 1) {
79  m_MinHits = minhits;
80  }
81  /// Gets the max number of candidate matches to process with BLAST
82  int GetCandidateSeqs() const {
83  return m_Candidates;
84  }
85  /// Sets the max number of candidate matches to process with BLAST
86  /// @candidates max number of target sequences to process with BLAST [in]
87  void SetCandidateSeqs(int candidates = 1000) {
88  m_Candidates = candidates;
89  }
90 
91 protected:
92  /// Set the program and service name for remote blast.
94  {
95  m_Opts->SetRemoteProgramAndService_Blast3("kblastp", "plain");
96  }
97 
98 private:
99  /// Disallow copy constructor
101  /// Disallow assignment operator
103 
104  /// Jaccard distance cutoff
105  double m_Thresh;
106 
107  /// number of hits to initiate calculation of Jaccard distance in LSH
109 
110  /// Number of target seqs to process with BLAST
112 
113 
114 };
115 
116 END_SCOPE(blast)
118 
119 
120 /* @} */
121 
122 
123 #endif /* ALGO_BLAST_API___BLASTP_KMER_OPTIONS_HPP */
Declares the CBlastAdvancedProteinOptionsHandle class.
#define NCBI_XBLAST_EXPORT
NULL operations for other cases.
Definition: blast_export.h:65
Handle to the Advanced BLASTP options.
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 KMER BLASTP options.
int GetCandidateSeqs() const
Gets the max number of candidate matches to process with BLAST.
int GetMinHits() const
Returns the number of hits to initiate calculation of Jaccard distance.
CBlastpKmerOptionsHandle(CRef< CBlastOptions > opt)
double m_Thresh
Jaccard distance cutoff.
virtual void SetRemoteProgramAndService_Blast3()
Set the program and service name for remote blast.
int m_Candidates
Number of target seqs to process with BLAST.
CBlastpKmerOptionsHandle & operator=(const CBlastpKmerOptionsHandle &rhs)
Disallow assignment operator.
void SetMinHits(int minhits=1)
Sets the number of hits ot initiate calculation of Jaccard distance.
CBlastpKmerOptionsHandle(const CBlastpKmerOptionsHandle &rhs)
Disallow copy constructor.
void SetCandidateSeqs(int candidates=1000)
Sets the max number of candidate matches to process with BLAST @candidates max number of target seque...
void SetThresh(double thresh=0.1)
Sets Threshold for Jaccard distance.
double GetThresh() const
Returns threshold for Jaccard distance (range: 0-1)
int m_MinHits
number of hits to initiate calculation of Jaccard distance in LSH
#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
Modified on Mon Mar 04 05:10:16 2024 by modify_doxy.py rev. 669887