,
72 "similar to AA sequence",
73 "similar to DNA sequence",
74 "similar to RNA sequence",
75 "similar to RNA sequence, EST",
76 "similar to RNA sequence, mRNA",
77 "similar to RNA sequence, other RNA",
78 "similar to sequence",
93experiment = experiment.substr(category.length());
96experiment = experiment.substr(1);
103 size_tstart_doi =
NStr::Find(experiment,
"[");
105 if(start_doi !=
NPOS) {
106doi = experiment.substr(start_doi + 1);
107doi = doi.substr(0, doi.length() - 1);
108experiment = experiment.substr(0, start_doi);
118rval += category +
":";
122rval +=
"["+ doi +
"]";
134 if(string::npos !=
val.find_first_not_of(
"ACGTUacgtu")) {
169 if(string::npos !=
val.find_first_not_of(
"0123456789-")) {
180 static const char* repeat_types[] = {
181 "centromeric_repeat",
186 "long_terminal_repeat",
188 "non_LTR_retrotransposon_polymeric_tract",
193 "X_element_combinatorial_repeat",
201 returnsc_LegalRepeatTypes;
204 static string GetRptTypeValue(
const string& val,
bool& open_bracket,
bool& close_bracket)
230vector<string> rpt_types;
234 boolopen_bracket =
false,
235close_bracket =
false;
239 autocorrect_val_it = repeat_types.
find(v.c_str());
240 if(correct_val_it != repeat_types.
end()) {
264vector<string> rpt_types;
266 ITERATE(vector<string>, it, rpt_types) {
268 boolopen_bracket =
false,
269close_bracket =
false;
273 if(repeat_types.
find(v.c_str()) == repeat_types.
end()) {
286 static const char* pseudogenes[] = {
298 returnsc_LegalPseudogenes;
306 if(pseudogenes.
find(
val.c_str()) == pseudogenes.
end()) {
316 autopseudogene_val = pseudogenes.
find(
val.c_str());
318 stringoriginal =
val;;
319 if(pseudogene_val != pseudogenes.
end()) {
320 val= *pseudogene_val;
323 return val!= original;
330 static const char* misc_recombs[] = {
331 "chromosome_breakpoint",
334 "non_allelic_homologous" 341 returnsc_LegalRecombinationClass;
348{
"meiotic_recombination",
"meiotic"},
349{
"mitotic_recombination",
"mitotic"},
350{
"non_allelic_homologous_recombination",
"non_allelic_homologous"}
353 stringoriginal =
val;
360 autosubstitute = SUBSTITUTION_MAP.
find(
val);
361 if(substitute != SUBSTITUTION_MAP.
end()) {
362 val= substitute->second;
365 returnoriginal !=
val;
385 string check= inference;
407remainder =
check.substr (prefix.length());
413 "insertion sequence",
417 "non-LTR retrotransposon",
423 "transposable element",
434element_type.clear();
435element_name.clear();
438 if(pos == string::npos) {
440 if(it != sc_LegalMobileElementStrings.end()) {
445 if(it != sc_LegalMobileElementStrings.end()) {
447element_name =
val.substr(pos + 1);
477new_val = element_type;
479new_val = element_type +
":"+ element_name;
520 for(
unsigned int i= 0;
arr[
i][0] !=
'\0';
i++)
548{
"ab initio prediction",
"ab initio prediction"},
549{
"alignment",
"alignment"},
550{
"nucleotide motif",
"nucleotide motif"},
551{
"profile",
"profile"},
552{
"protein motif",
"protein motif"},
553{
"similar to AA",
"similar to AA sequence"},
554{
"similar to AA sequence",
"similar to AA sequence"},
555{
"similar to DNA",
"similar to DNA sequence"},
556{
"similar to DNA sequence",
"similar to DNA sequence"},
557{
"similar to EST",
"similar to RNA sequence, EST"},
558{
"similar to mRNA",
"similar to RNA sequence, mRNA"},
559{
"similar to RNA",
"similar to RNA sequence"},
560{
"similar to RNA sequence",
"similar to RNA sequence"},
561{
"similar to RNA sequence, EST",
"similar to RNA sequence, EST"},
562{
"similar to RNA sequence, mRNA",
"similar to RNA sequence, mRNA"},
563{
"similar to RNA sequence, other",
"similar to RNA sequence, other"},
564{
"similar to sequence",
"similar to sequence"}
573 string&accession,
string&program,
string&
version,
string&acc_list)
576 static const char*categories[] = {
"COORDINATES",
"DESCRIPTION",
"EXISTENCE",
"\0"};
577 for(
unsigned int i= 0; categories[
i][0] !=
'\0';
i++)
580category = categories[
i];
581 val=
val.substr(strlen(categories[
i]));
593is_same_species =
false;
597type_str = it->first;
601 if(
match!= sc_InferenceTypeSynonymPairMap.end()) {
602type_str =
match->second;
606is_same_species =
true;
632 stringpart1 =
val.substr(0, pos);
633 stringpart2 =
val.substr(pos + 1);
663 stringpart1 =
val.substr(0, pos);
664 stringpart2 =
val.substr(pos + 1);
680 stringpart1 =
val.substr(0, pos);
681 stringpart2 =
val.substr(pos + 1);
698 stringpart1 =
val.substr(0, pos);
699 stringpart2 =
val.substr(pos + 1);
707 stringver_str = part2.substr(0, pos);
708acc_list_str = part2.substr(pos + 1);
712acc_list = acc_list_str;
722 while(start !=
NPOS)
724 size_tpos1 =
NStr::Find(inference, find, start);
725 size_tpos2 =
NStr::Find(inference, replace, start);
730start = pos1 + find.length();
736 stringinference(orig_inference);
737 if( inference.empty() ) {
742 while(old_inf != inference)
765 stringfind = it->first;
767 stringreplace = it->second;
static const char * valid_inf_categories[]
DEFINE_STATIC_ARRAY_MAP(TLegalMobileElementStrings, sc_LegalMobileElementStrings, s_LegalMobileElementStrings)
SStaticPair< const char *, const char * > TInferenceTypeSynonymPairElem
static const char * valid_inf_prefixes[]
static string GetRptTypeValue(const string &val, bool &open_bracket, bool &close_bracket)
static const char * s_IllegalQualNameStrings[]
CStaticArrayMap< const char *, const char *, PNocase_CStr > TInferenceTypeSynonymPairMap
static const TInferenceTypeSynonymPairElem k_inference_type_synonym_pair_map[]
static void ReplaceIfNotFound(string &inference, const string &find, const string &replace)
static const char * s_LegalMobileElementStrings[]
static string s_FindInArray(const string &val, const char **arr)
CStaticArraySet< const char *, PNocase_CStr > TLegalMobileElementStrings
static const char * kInferenceDBChoices[]
size_t kNumInferenceDBChoices
static bool CleanupRptUnitRange(string &val)
static bool IsLegalMobileElementValue(const string &val)
static bool x_CleanupRptAndReplaceSeq(string &val)
static bool IsValidPseudogeneValue(const string &val)
static bool IsIllegalQualName(const string &val)
static bool IsValidRptTypeValue(const string &val)
static bool CleanupRptUnitSeq(string &val)
static void ParseInferenceString(string val, string &category, string &type_str, bool &is_same_species, string &database, string &accession, string &program, string &version, string &acc_list)
static void ParseExperiment(const string &orig, string &category, string &experiment, string &doi)
static bool CleanupReplace(string &val)
static bool FixRecombinationClassValue(string &val)
static bool FixRptTypeValue(string &val)
static string BuildExperiment(const string &category, const string &experiment, const string &doi)
static string CleanupAndRepairInference(const string &orig_inference)
static bool IsLegalInferenceDatabase(const string &db)
static const TLegalRepeatTypeSet & GetSetOfLegalRepeatTypes(void)
static bool FixMobileElementValue(string &val)
static const TLegalPseudogeneSet & GetSetOfLegalPseudogenes(void)
static bool FixPseudogeneValue(string &val)
static void GetMobileElementValueElements(const string &val, string &element_type, string &element_name)
static const TLegalRecombinationClassSet & GetSetOfLegalRecombinationClassValues(void)
CInferencePrefixList(void)
~CInferencePrefixList(void)
static void GetPrefixAndRemainder(const string &inference, string &prefix, string &remainder)
class CStaticArrayMap<> provides access to a static array in much the same way as CStaticArraySet<>,...
TBase::const_iterator const_iterator
const_iterator find(const key_type &key) const
Return a const_iterator pointing to the specified element, or to the end if the element is not found.
const_iterator end() const
Return the end of the controlled sequence.
TBase::const_iterator const_iterator
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
const_iterator end() const
const_iterator find(const key_type &key) const
static vector< string > arr
constexpr size_t ArraySize(const Element(&)[Size])
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)
Check if a string ends with a specified suffix value.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string (in-place)
static SIZE_TYPE Find(const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0)
Find the pattern in the string.
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
static bool Equal(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2, ECase use_case=eCase)
Test for equality of a substring with another string.
static string & ReplaceInPlace(string &src, const string &search, const string &replace, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)
Replace occurrences of a substring within a string.
size_type size(void) const
Return the length of the represented array.
static string & ToLower(string &str)
Convert string to lower case â string& version.
@ eNocase
Case insensitive compare.
where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is orig
use only n Cassandra database for the lookups</td > n</tr > n< tr > n< td > yes</td > n< td > do not use tables BIOSEQ_INFO and BLOB_PROP in the Cassandra database
const string version
version string
static const GLdouble origin[]
static int match(PCRE2_SPTR start_eptr, PCRE2_SPTR start_ecode, uint16_t top_bracket, PCRE2_SIZE frame_size, pcre2_match_data *match_data, match_block *mb)
#define DEFINE_STATIC_ARRAY_MAP_WITH_COPY(Type, Var, Array)
Template structure SStaticPair is simlified replacement of STL pair<> Main reason of introducing this...
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