88 #ifndef OBJECTS_SEQFEAT_SEQFEATDATA_HPP
89 #define OBJECTS_SEQFEAT_SEQFEATDATA_HPP
126 string GetKey(EVocabulary vocab = eVocabulary_full)
const;
134 eSubtype_cdregion = 3,
136 eSubtype_preprotein = 5,
137 eSubtype_mat_peptide_aa = 6,
138 eSubtype_sig_peptide_aa = 7,
139 eSubtype_transit_peptide_aa = 8,
146 eSubtype_snoRNA = 15,
147 eSubtype_otherRNA = 16,
151 eSubtype_allele = 20,
152 eSubtype_attenuator = 21,
153 eSubtype_C_region = 22,
154 eSubtype_CAAT_signal = 23,
155 eSubtype_Imp_CDS = 24,
156 eSubtype_conflict = 25,
157 eSubtype_D_loop = 26,
158 eSubtype_D_segment = 27,
159 eSubtype_enhancer = 28,
161 eSubtype_EC_number = 30,
162 eSubtype_GC_signal = 31,
164 eSubtype_intron = 33,
165 eSubtype_J_segment = 34,
167 eSubtype_mat_peptide = 36,
168 eSubtype_misc_binding = 37,
169 eSubtype_misc_difference = 38,
170 eSubtype_misc_feature = 39,
171 eSubtype_misc_recomb = 40,
172 eSubtype_misc_RNA = 41,
173 eSubtype_misc_signal = 42,
174 eSubtype_misc_structure = 43,
175 eSubtype_modified_base = 44,
176 eSubtype_mutation = 45,
177 eSubtype_N_region = 46,
178 eSubtype_old_sequence = 47,
179 eSubtype_polyA_signal = 48,
180 eSubtype_polyA_site = 49,
181 eSubtype_precursor_RNA = 50,
182 eSubtype_prim_transcript = 51,
183 eSubtype_primer_bind = 52,
184 eSubtype_promoter = 53,
185 eSubtype_protein_bind = 54,
187 eSubtype_repeat_region = 56,
188 eSubtype_repeat_unit = 57,
189 eSubtype_rep_origin = 58,
190 eSubtype_S_region = 59,
191 eSubtype_satellite = 60,
192 eSubtype_sig_peptide = 61,
193 eSubtype_source = 62,
194 eSubtype_stem_loop = 63,
196 eSubtype_TATA_signal = 65,
197 eSubtype_terminator = 66,
198 eSubtype_transit_peptide = 67,
199 eSubtype_unsure = 68,
200 eSubtype_V_region = 69,
201 eSubtype_V_segment = 70,
202 eSubtype_variation = 71,
203 eSubtype_virion = 72,
208 eSubtype_10_signal = 77,
209 eSubtype_35_signal = 78,
211 eSubtype_operon = 80,
213 eSubtype_site_ref = 82,
214 eSubtype_region = 83,
215 eSubtype_comment = 84,
220 eSubtype_txinit = 89,
222 eSubtype_psec_str = 91,
223 eSubtype_non_std_residue = 92,
225 eSubtype_biosrc = 94,
229 eSubtype_variation_ref = 98,
230 eSubtype_mobile_element = 99,
231 eSubtype_centromere = 100,
232 eSubtype_telomere = 101,
233 eSubtype_assembly_gap = 102,
234 eSubtype_regulatory = 103,
235 eSubtype_propeptide = 104,
236 eSubtype_propeptide_aa = 105,
243 void InvalidateSubtype(
void)
const;
246 void InvalidateCache(
void)
const;
249 #define DEFINE_NCBI_SEQFEATDATA_VAL_SETTERS(x) \
250 void Set##x(const T##x& v) { \
252 Tparent::Set##x(v); \
254 T##x& Set##x(void) { \
256 return Tparent::Set##x(); \
258 #define DEFINE_NCBI_SEQFEATDATA_SETTERS(x) \
259 void Set##x(T##x& v) { \
261 Tparent::Set##x(v); \
263 T##x& Set##x(void) { \
265 return Tparent::Set##x(); \
277 void SetComment(
void) {
279 Tparent::SetComment();
294 #undef DEFINE_NCBI_SEQFEATDATA_SETTERS
295 #undef DEFINE_NCBI_SEQFEATDATA_VAL_SETTERS
302 void PostRead(
void)
const;
319 static bool CanHaveGene(
ESubtype subtype);
482 const TQualifiers& GetMandatoryQualifiers(
void)
const;
491 static std::pair<EQualifier, CTempString> GetQualifierTypeAndValue(
CTempString qual);
497 static bool IsRegulatory(
ESubtype subtype);
498 static const string & GetRegulatoryClass(
ESubtype subtype);
499 static ESubtype GetRegulatoryClass(
const string & class_name );
500 static const vector<string>& GetRegulatoryClassList();
501 static bool FixRegulatoryClassValue(
string&
val);
503 static const vector<string>& GetRecombinationClassList();
505 static bool IsDiscouragedSubtype(
ESubtype subtype);
506 static bool IsDiscouragedQual(
EQualifier qual);
509 eFeatureLocationAllowed_Any = 0,
515 static EFeatureLocationAllowed AllowedFeatureLocation(ESubtype subtype);
517 static bool AllowStrandBoth(ESubtype subtype);
518 static bool RequireLocationIntervalsInBiologicalOrder(ESubtype subtype);
519 static bool AllowAdjacentIntervals(ESubtype subtype);
529 static bool FixImportKey(
string&
key);
530 static bool IsLegalProductNameForRibosomalSlippage(
const string& product_name);
540 void x_InitFeatDataInfo(
void)
const;
544 static void s_InitSubtypesTable(
void);
606 , m_Description(desc)
607 , m_StorageKey(
key) {}
613 string GetDescription()
const;
614 string GetStoragekey()
const;
633 {
return m_Subtype; }
637 {
return m_Description; }
641 {
return m_StorageKey; }
659 bool TypeValid(
int type,
int subtype)
const;
663 bool GetItemBySubtype(
int subtype,
CFeatListItem& config_item)
const;
665 bool GetItemByDescription(
const string& desc,
CFeatListItem& config_item)
const;
669 string GetDescription(
int type,
int subtype)
const;
673 bool GetTypeSubType(
const string& desc,
int&
type,
int& subtype)
const;
676 string GetStoragekey(
int type,
int subtype)
const;
678 string GetStoragekey(
int subtype)
const;
683 vector<string> GetStoragekeys(
int subtype)
const;
687 void GetDescriptions(
688 vector<string> &descs,
689 bool hierarchical =
false
715 return m_FeatTypes.size();
722 return m_FeatTypes.begin();
729 return m_FeatTypes.end();
746 bool IsBondName (
string str)
const;
770 return sm_BondKeys.size();
777 return sm_BondKeys.begin();
784 return sm_BondKeys.end();
801 bool IsSiteName (
string str)
const;
825 return sm_SiteKeys.size();
832 return sm_SiteKeys.begin();
839 return sm_SiteKeys.end();
#define DEFINE_NCBI_SEQFEATDATA_VAL_SETTERS(x)
Override all setters to incorporate cache invalidation.
#define DEFINE_NCBI_SEQFEATDATA_SETTERS(x)
TBondMap::const_iterator const_iterator
void x_Init(void)
initialize our container of feature types and descriptions.
DECLARE_CLASS_STATIC_ARRAY_MAP(TBondMap, sm_BondKeys)
CStaticPairArrayMap< const char *, CSeqFeatData::EBond, PNocase_CStr > TBondMap
const_iterator end() const
const_iterator begin() const
SStaticPair< const char *, CSeqFeatData::EBond > TBondKey
CFeatListItem - basic configuration data for one "feature" type.
string GetStoragekey() const
string m_StorageKey
a short string to use as a key or part of a key when storing a value by key/value string pairs.
string GetDescription() const
CFeatListItem(int type, int subtype, const char *desc, const char *key)
string m_Description
a string for display purposes.
CConfigurableItems - a static list of items that can be configured.
const_iterator end() const
TFeatTypeContainer m_FeatTypes
map< int, CFeatListItem > TSubtypeMap
> all valid types and subtypes.
TSubtypeMap m_FeatTypeMap
TFeatTypeContainer::const_iterator const_iterator
const_iterator begin() const
set< CFeatListItem > TFeatTypeContainer
@Gb_qual.hpp User-defined methods of the data storage class.
static void s_InitXrefProhibitedSubtypesTable(void)
bool IsLegalQualifier(EQualifier qual) const
Test wheather a certain qualifier is legal for the feature.
EQualifier
List of available qualifiers for feature keys.
@ eQual_environmental_sample
@ eQual_recombination_class
@ eQual_UniProtKB_evidence
@ eQual_culture_collection
@ eQual_ribosomal_slippage
@ eQual_calculated_mol_wt
@ eQual_metagenome_source
@ eQual_mobile_element_type
@ eQual_artificial_location
SFeatDataInfo m_FeatDataInfo
@ eFeatureLocationAllowed_NucOnly
@ eFeatureLocationAllowed_Error
@ eFeatureLocationAllowed_ProtOnly
EVocabulary
ASCII representation of subtype (GenBank feature key, e.g.)
static void s_InitXrefAllowedSubtypesTable(void)
const TLegalQualifiers & GetLegalQualifiers(void) const
Get a list of all the legal qualifiers for the feature.
const TQualifiers & GetMandatoryQualifiers(void) const
Get the list of all mandatory qualifiers for the feature.
void InvalidateCache(void) const
Combine invalidation of all cached values.
static CTempString GetQualifierAsString(EQualifier qual)
Convert a qualifier from an enumerated value to a string representation or empty if not found.
static ESubtype SubtypeNameToValue(CTempString sName)
Turn a string into its ESubtype which is NOT necessarily related to the identifier of the enum.
CSeqFeatData_Base Tparent
Base class for all serializable objects.
void x_Init(void)
initialize our container of feature types and descriptions.
const_iterator begin() const
TSiteMap::const_iterator const_iterator
const_iterator end() const
CStaticPairArrayMap< const char *, CSeqFeatData::ESite, PNocase_CStr > TSiteMap
DECLARE_CLASS_STATIC_ARRAY_MAP(TSiteMap, sm_SiteKeys)
SStaticPair< const char *, CSeqFeatData::ESite > TSiteKey
class CStaticArrayMap<> is an array adaptor that provides an STLish interface to statically-defined a...
TBase::const_iterator const_iterator
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
parent_type::const_iterator const_iterator
The NCBI C++ standard methods for dealing with std::string.
int GetSubtype(CFieldNamePanel *field_name_panel, string &ncRNA_class)
bool operator<(const CEquivRange &A, const CEquivRange &B)
static const char * str(char *buf, int n)
ESerialRecursionMode
How to assign and compare child sub-objects of serial objects.
#define NCBISER_HAVE_POST_READ(Class)
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define NCBI_SEQFEAT_EXPORT
const struct ncbi::grid::netcache::search::fields::SIZE size
const struct ncbi::grid::netcache::search::fields::KEY key
const GenericPointer< typename T::ValueType > T2 value
const CharType(& source)[N]
CSeqFeatData::ESubtype m_Subtype
Template structure SStaticPair is simlified replacement of STL pair<> Main reason of introducing this...