normalized = unnormalized;
45 static const stringirrelevant_prefix_suffix_chars =
" \t\"\'-_";
47 size_tpos = normalized.find_first_not_of(irrelevant_prefix_suffix_chars);
49normalized.erase(0,pos);
52pos = normalized.find_last_not_of(irrelevant_prefix_suffix_chars);
54normalized.erase(pos+1);
57normalized.erase(
remove_if(normalized.begin(),
72{
returnmod_string; };
75 template<
typenameTEnum>
86skip_mod_strings.end(),
87inserter(normalized_skip_set, normalized_skip_set.end()),
91 for(
const auto& name_val : etv.
GetValues()) {
92 const auto& mod_string = fNormalizeString(name_val.first);
93 if(normalized_skip_set.find(mod_string) == normalized_skip_set.end())
95 constTEnum& enum_val =
static_cast<TEnum
>(name_val.second);
96smod_enum_map.emplace(mod_string, enum_val);
100 for(
autoextra_smod_to_enum : extra_mod_strings_to_enums) {
101smod_enum_map.emplace(
102fNormalizeString(extra_smod_to_enum.first),
103extra_smod_to_enum.second);
105 returnsmod_enum_map;
113 "dosage",
"old-lineage",
"old-name"};
115extra_smod_to_enum_names
121kDeprecatedOrgSubtypes,
122extra_smod_to_enum_names
134 "fwd-primer-seq",
"rev-primer-seq",
135 "fwd-primer-name",
"rev-primer-name",
139 "insertion-seq-name",
142extra_smod_to_enum_names
151extra_smod_to_enum_names);
160extra_smod_to_enum_names
169extra_smod_to_enum_names,
179extra_smod_to_enum_names
186extra_smod_to_enum_names,
215unordered_map<CMolInfo::TBiomol, CSeq_inst::EMol>
void remove_if(Container &c, Predicate *__pred)
void transform(Container &c, UnaryFunction *op)
const TValues & GetValues(void) const
Get the list of name-value pairs.
#define ENUM_METHOD_NAME(EnumName)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
static string & ToLower(string &str)
Convert string to lower case â string& version.
@ eSubtype_lat_lon
+/- decimal degrees
@ eOrigin_mut
artificially mutagenized
@ eOrigin_natmut
naturally occurring mutant
@ eSubtype_nat_host
natural host of this specimen
@ eBiomol_pre_RNA
precursor RNA of any sort really
@ eBiomol_cRNA
viral RNA genome copy intermediate
@ eBiomol_snoRNA
small nucleolar RNA
@ eBiomol_genomic_mRNA
reported a mix of genomic and cdna sequence
@ eBiomol_transcribed_RNA
transcribed RNA other than existing classes
@ eBiomol_other_genetic
other genetic material
const unordered_map< CMolInfo::TBiomol, CSeq_inst::EMol > g_BiomolEnumToMolEnum
unordered_set< string > TModNameSet
const TStringToEnumMap< CMolInfo::TBiomol > g_BiomolStringToEnum
static string s_NoNormalization(const string &mod_string)
static TStringToEnumMap< TEnum > s_InitModStringToEnumMap(const CEnumeratedTypeValues &etv, const TModNameSet &skip_mod_strings, const TStringToEnumMap< TEnum > &extra_mod_strings_to_enums, function< string(const string &)> fNormalizeString=s_NoNormalization)
TStringToEnumMap< CSubSource::ESubtype > g_InitModNameSubSrcSubtypeMap(void)
TStringToEnumMap< COrgMod::ESubtype > g_InitModNameOrgSubtypeMap(void)
string g_GetNormalizedModVal(const string &unnormalized)
TStringToEnumMap< CBioSource::EGenome > g_InitModNameGenomeMap(void)
TStringToEnumMap< CBioSource::EOrigin > g_InitModNameOriginMap(void)
unordered_map< string, TEnum > TStringToEnumMap
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4