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

Go to the SVN repository for this file.

1 /* $Id: names.hpp 102848 2024-07-30 14:29:16Z ivanov $
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: Kevin Bealer
27  *
28  * File Description:
29  * Define names and value types for options known to blast4.
30  *
31  */
32 
33 /// @file names.hpp
34 /// Names used in blast4 network communications.
35 ///
36 /// This file declares string objects corresponding to names used when
37 /// specifying options for blast4 network communications protocol.
38 
39 #ifndef OBJECTS_BLAST_NAMES_HPP
40 #define OBJECTS_BLAST_NAMES_HPP
41 
42 #include <utility>
43 #include <string>
44 #include <corelib/ncbistl.hpp>
46 
50 
52 
53 BEGIN_objects_SCOPE // namespace ncbi::objects::
54 
55 /// Index of remote BLAST options.
56 /// The blast4 server only supports a subset of these
121  eBlastOpt_ForceMbIndex, // corresponds to -use_index flag
122  eBlastOpt_MbIndexName, // corresponds to -index_name flag
126  eBlastOpt_DomainInclusionThreshold, // options for DELTA-BLAST
127 
146 
161  eBlastOpt_MaxValue // For testing/looping, not an actual parameter
162 };
163 
164 
165 /// Field properties for options in a Blast4 parameter list.
167 public:
168  /// Default constructor (for STL)
169  CBlast4Field() : m_Name("-"), m_Type(CBlast4_value::e_not_set) {}
170 
171  /// Construct field with name and type.
173  : m_Name(nm), m_Type(ch) {}
174 
175  static CBlast4Field& Get(EBlastOptIdx opt);
176  static const string& GetName(EBlastOptIdx opt);
177 
178  /// Get field name (key).
179  const string& GetName() const;
180 
181  /// Match field name and type to parameter.
182  bool Match(const CBlast4_parameter& p) const;
183 
184  /// Get field type.
185  CBlast4_value::E_Choice GetType() const;
186 
187 
188  /// Verify parameter name and type, and get boolean value.
189  bool GetBoolean(const CBlast4_parameter& p) const;
190 
191  /// Verify parameter name and type, and get big integer value.
192  Int8 GetBig_integer(const CBlast4_parameter& p) const;
193 
194  /// Verify parameter name and type, and get cutoff value.
195  CConstRef<CBlast4_cutoff> GetCutoff(const CBlast4_parameter& p) const;
196 
197  /// Verify parameter name and type, and get integer value.
198  int GetInteger(const CBlast4_parameter& p) const;
199 
200  /// Verify parameter name and type, and get integer list value.
201  list<int> GetIntegerList(const CBlast4_parameter& p) const;
202 
203  /// Verify parameter name and type, and get matrix (pssm) value.
204  CConstRef<CPssmWithParameters> GetMatrix(const CBlast4_parameter& p) const;
205 
206  /// Verify parameter name and type, and get query mask value.
207  CConstRef<CBlast4_mask> GetQueryMask(const CBlast4_parameter& p) const;
208 
209  /// Verify parameter name and type, and get real value.
210  double GetReal(const CBlast4_parameter & p) const;
211 
212  /// Verify parameter name and type, and get strand_type value.
213  EBlast4_strand_type GetStrandType(const CBlast4_parameter& p) const;
214 
215  /// Verify parameter name and type, and get string value.
216  string GetString(const CBlast4_parameter& p) const;
217 
218 private:
219  /// Field name string as used in Blast4_parameter objects.
220  string m_Name;
221 
222  /// Field value type as used in Blast4_parameter objects.
224 
225  /// Type for map of all blast4 field objects.
227 
228  /// Map of all blast4 field objects.
230 };
231 
232 /*****************************************************************************/
233 // String pairs used to support for get-search-info request
234 
235 /// Used to retrieve information about the BLAST search
237 /// Used to retrieve information about the BLAST alignments
239 
240 /// Used to retrieve the BLAST search status
242 /// Used to retrieve the BLAST search title
244 /// Used to retrieve the BLAST search subjects
246 
247 /// Used to retrieve the PSI-BLAST iteration number
249 
250 /// This function builds the reply name token in the get-search-info reply
251 /// objects, provided a pair of strings such as those defined above
252 /// (i.e.: kBlast4SearchInfoReq{Name,Value})
254 string Blast4SearchInfo_BuildReplyName(const string& name, const string& value);
255 
256 
257 END_objects_SCOPE // namespace ncbi::objects::
258 
260 
261 #endif // OBJECTS_BLAST_NAMES_HPP
User-defined methods of the data storage class.
User-defined methods of the data storage class.
Field properties for options in a Blast4 parameter list.
Definition: names.hpp:166
string m_Name
Field name string as used in Blast4_parameter objects.
Definition: names.hpp:220
static CSafeStatic< TFieldMap > m_Fields
Map of all blast4 field objects.
Definition: names.hpp:229
CBlast4Field(const std::string &nm, CBlast4_value::E_Choice ch)
Construct field with name and type.
Definition: names.hpp:172
CBlast4Field()
Default constructor (for STL)
Definition: names.hpp:169
map< EBlastOptIdx, CBlast4Field > TFieldMap
Type for map of all blast4 field objects.
Definition: names.hpp:226
CBlast4_value::E_Choice m_Type
Field value type as used in Blast4_parameter objects.
Definition: names.hpp:223
CBlast4_parameter –.
CBlast4_value –.
CConstRef –.
Definition: ncbiobj.hpp:1266
CSafeStatic<>::
Definition: map.hpp:338
string
Definition: cgiapp.hpp:690
int64_t Int8
8-byte (64-bit) signed integer
Definition: ncbitype.h:104
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define NCBI_BLAST_EXPORT
Definition: ncbi_export.h:360
E_Choice
Choice variants.
EBlast4_strand_type
Access to EBlast4_strand_type's attributes (values, names) as defined in spec.
@ e_not_set
const TYPE & Get(const CNamedParameterList *param)
EBlastOptIdx
Index of remote BLAST options.
Definition: names.hpp:57
@ eBlastOpt_Web_DBInput
Definition: names.hpp:155
@ eBlastOpt_WordThreshold
Definition: names.hpp:59
@ eBlastOpt_EntrezQuery
Definition: names.hpp:130
@ eBlastOpt_ComplexityAdjMode
Definition: names.hpp:98
@ eBlastOpt_SeedExtensionMethod
Definition: names.hpp:81
@ eBlastOpt_MismatchPenalty
Definition: names.hpp:103
@ eBlastOpt_MaskLevel
Definition: names.hpp:99
@ eBlastOpt_Web_StepNumber
Definition: names.hpp:154
@ eBlastOpt_CompositionBasedStats
Definition: names.hpp:116
@ eBlastOpt_SubjectBestHit
Definition: names.hpp:129
@ eBlastOpt_LookupTableType
Definition: names.hpp:60
@ eBlastOpt_Web_NewWindow
Definition: names.hpp:150
@ eBlastOpt_NegativeTaxidList
Definition: names.hpp:145
@ eBlastOpt_QueryGeneticCode
Definition: names.hpp:78
@ eBlastOpt_DbLength
Definition: names.hpp:108
@ eBlastOpt_Program
Definition: names.hpp:58
@ eBlastOpt_WordSize
Definition: names.hpp:61
@ eBlastOpt_SegFilteringHicut
Definition: names.hpp:74
@ eBlastOpt_HitlistSize
Definition: names.hpp:87
@ eBlastOpt_FilterString
Definition: names.hpp:65
@ eBlastOpt_StrandOption
Definition: names.hpp:77
@ eBlastOpt_RequiredEnd
Definition: names.hpp:141
@ eBlastOpt_QueryCovHspPerc
Definition: names.hpp:94
@ eBlastOpt_GapXDropoffFinal
Definition: names.hpp:84
@ eBlastOpt_DustFilteringLevel
Definition: names.hpp:68
@ eBlastOpt_OutOfFrameMode
Definition: names.hpp:107
@ eBlastOpt_MBTemplateLength
Definition: names.hpp:63
@ eBlastOpt_BestHitOverhang
Definition: names.hpp:124
@ eBlastOpt_CullingLimit
Definition: names.hpp:90
@ eBlastOpt_TaxidList
Definition: names.hpp:144
@ eBlastOpt_XDropoff
Definition: names.hpp:82
@ eBlastOpt_PercentIdentity
Definition: names.hpp:93
@ eBlastOpt_SegFilteringWindow
Definition: names.hpp:72
@ eBlastOpt_UseRealDbSize
Definition: names.hpp:143
@ eBlastOpt_IgnoreMsaMaster
Definition: names.hpp:125
@ eBlastOpt_Culling
Definition: names.hpp:128
@ eBlastOpt_WindowMaskerTaxId
Definition: names.hpp:120
@ eBlastOpt_GapExtensionCost
Definition: names.hpp:105
@ eBlastOpt_Web_EntrezQuery
Definition: names.hpp:148
@ eBlastOpt_GapOpeningCost
Definition: names.hpp:104
@ eBlastOpt_DbFilteringAlgorithmKey
Definition: names.hpp:135
@ eBlastOpt_Web_DBGroup
Definition: names.hpp:156
@ eBlastOpt_WindowSize
Definition: names.hpp:79
@ eBlastOpt_MatrixPath
Definition: names.hpp:101
@ eBlastOpt_MatchReward
Definition: names.hpp:102
@ eBlastOpt_MaskAtHash
Definition: names.hpp:66
@ eBlastOpt_MaxHspsPerSubject
Definition: names.hpp:89
@ eBlastOpt_SmithWatermanMode
Definition: names.hpp:117
@ eBlastOpt_SegFiltering
Definition: names.hpp:71
@ eBlastOpt_GapExtnAlgorithm
Definition: names.hpp:86
@ eBlastOpt_EvalueThreshold
Definition: names.hpp:91
@ eBlastOpt_MatrixTable
Definition: names.hpp:139
@ eBlastOpt_Web_OrganismName
Definition: names.hpp:151
@ eBlastOpt_Web_BlastSpecialPage
Definition: names.hpp:147
@ eBlastOpt_RepeatFilteringDB
Definition: names.hpp:76
@ eBlastOpt_LCaseMask
Definition: names.hpp:138
@ eBlastOpt_MatrixName
Definition: names.hpp:100
@ eBlastOpt_Web_RunPsiBlast
Definition: names.hpp:152
@ eBlastOpt_NegativeGiList
Definition: names.hpp:140
@ eBlastOpt_Web_ExclSeqUncult
Definition: names.hpp:160
@ eBlastOpt_DomainInclusionThreshold
Definition: names.hpp:126
@ eBlastOpt_BestHitScoreEdge
Definition: names.hpp:123
@ eBlastOpt_LongestIntronLength
Definition: names.hpp:96
@ eBlastOpt_HspRangeMax
Definition: names.hpp:137
@ eBlastOpt_DustFilteringLinker
Definition: names.hpp:70
@ eBlastOpt_SeedContainerType
Definition: names.hpp:80
@ eBlastOpt_ForceMbIndex
Definition: names.hpp:121
@ eBlastOpt_Web_ExclModels
Definition: names.hpp:159
@ eBlastOpt_GapTrigger
Definition: names.hpp:85
@ eBlastOpt_DbFilteringAlgorithmId
Definition: names.hpp:134
@ eBlastOpt_FinalDbSeq
Definition: names.hpp:131
@ eBlastOpt_AlphabetSize
Definition: names.hpp:62
@ eBlastOpt_DbSeqNum
Definition: names.hpp:109
@ eBlastOpt_DustFiltering
Definition: names.hpp:67
@ eBlastOpt_DbGeneticCode
Definition: names.hpp:111
@ eBlastOpt_FirstDbSeq
Definition: names.hpp:132
@ eBlastOpt_MaxValue
Definition: names.hpp:161
@ eBlastOpt_RepeatFiltering
Definition: names.hpp:75
@ eBlastOpt_SegFilteringLocut
Definition: names.hpp:73
@ eBlastOpt_MBTemplateType
Definition: names.hpp:64
@ eBlastOpt_Web_ShortQueryAdjust
Definition: names.hpp:153
@ eBlastOpt_GapXDropoff
Definition: names.hpp:83
@ eBlastOpt_GiList
Definition: names.hpp:133
@ eBlastOpt_GappedMode
Definition: names.hpp:97
@ eBlastOpt_PseudoCount
Definition: names.hpp:114
@ eBlastOpt_WindowMaskerDatabase
Definition: names.hpp:119
@ eBlastOpt_EffectiveSearchSpace
Definition: names.hpp:110
@ eBlastOpt_SumStatisticsMode
Definition: names.hpp:95
@ eBlastOpt_RequiredStart
Definition: names.hpp:142
@ eBlastOpt_PHIPattern
Definition: names.hpp:112
@ eBlastOpt_FrameShiftPenalty
Definition: names.hpp:106
@ eBlastOpt_Web_DBSubgroup
Definition: names.hpp:158
@ eBlastOpt_MbIndexName
Definition: names.hpp:122
@ eBlastOpt_MaxNumHspPerSequence
Definition: names.hpp:88
@ eBlastOpt_Web_JobTitle
Definition: names.hpp:149
@ eBlastOpt_GapTracebackAlgorithm
Definition: names.hpp:115
@ eBlastOpt_SubjectMaskingType
Definition: names.hpp:136
@ eBlastOpt_Web_DBSubgroupName
Definition: names.hpp:157
@ eBlastOpt_DustFilteringWindow
Definition: names.hpp:69
@ eBlastOpt_CutoffScore
Definition: names.hpp:92
@ eBlastOpt_InclusionThreshold
Definition: names.hpp:113
@ eBlastOpt_UnifiedP
Definition: names.hpp:118
string Blast4SearchInfo_BuildReplyName(const string &name, const string &value)
This function builds the reply name token in the get-search-info reply objects, provided a pair of st...
Definition: names.cpp:448
const char * kBlast4SearchInfoReqValue_Title
Used to retrieve the BLAST search title.
const char * kBlast4SearchInfoReqValue_Subjects
Used to retrieve the BLAST search subjects.
const char * kBlast4SearchInfoReqValue_PsiIterationNum
Used to retrieve the PSI-BLAST iteration number.
const char * kBlast4SearchInfoReqName_Alignment
Used to retrieve information about the BLAST alignments.
const char * kBlast4SearchInfoReqValue_Status
Used to retrieve the BLAST search status.
const char * kBlast4SearchInfoReqName_Search
Used to retrieve information about the BLAST search.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Static variables safety - create on demand, destroy on application termination.
The NCBI C++/STL use hints.
static bool GetInteger(wxSpinCtrl *spinctrl, int *value)
Modified on Fri Sep 20 14:58:08 2024 by modify_doxy.py rev. 669887