75 const char* rna_type_name =
"";
77 if ( rna_type_it != sc_RnaTypeMap.end() ) {
78 rna_type_name = rna_type_it->second;
153 }
else if (
GetExt().IsGen() &&
GetExt().GetGen().IsSetProduct()) {
155 }
else if (
GetExt().IsTRNA()) {
171 string test = product;
178 trna.
SetAa().SetNcbieaa(42);
179 if (
test.length() > 9) {
180 remainder =
test.substr(9);
185 bool found_three_letter_code =
false;
188 trna.
SetAa().SetNcbieaa(
i + 64);
190 found_three_letter_code =
true;
194 if (!found_three_letter_code &&
test.length() > 5) {
195 int ch =
test.c_str()[5];
196 int after =
test.c_str()[6];
199 int aa = 65 + ch -
'A';
200 trna.
SetAa().SetNcbieaa(aa);
201 remainder =
test.substr(6);
202 }
else if (ch ==
'*') {
203 trna.
SetAa().SetNcbieaa(42);
204 remainder =
test.substr(6);
210 string codon = remainder.substr(1, 3);
244 if (!
GetExt().GetGen().IsSetClass() && !
GetExt().GetGen().IsSetQuals()) {
DEFINE_STATIC_ARRAY_MAP(TRnaTypeMap, sc_RnaTypeMap, sc_rna_type_map)
static const SStaticPair< CRNA_ref::EType, const char * > sc_rna_type_map[]
static const char * sc_TrnaList[]
static CTempString s_GetTrnaProduct(const CTrna_ext &trna)
static void s_SetTrnaProduct(CTrna_ext &trna, const string &product, string &remainder)
static CTempString s_AaName(int aa)
CStaticPairArrayMap< CRNA_ref::EType, const char * > TRnaTypeMap
User-defined methods of the data storage class.
string GetRnaProductName(void) const
static string GetRnaTypeName(const CRNA_ref::EType rna_type)
void SetRnaProductName(const string &product, string &remainder)
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 ...
static bool ParseDegenerateCodon(CTrna_ext &tRNA, const string &codon)
#define test(a, b, c, d, e)
constexpr size_t ArraySize(const Element(&)[Size])
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
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 spaces in a string (in-place)
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
size_type length(void) const
Return the length of the represented array.
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.
static string & ToUpper(string &str)
Convert string to upper case – string& version.
@ eNocase
Case insensitive compare.
TName & SetName(void)
Select the variant.
TType GetType(void) const
Get the Type member data.
const TAa & GetAa(void) const
Get the Aa member data.
void ResetAa(void)
Reset Aa data member.
bool IsSetAa(void) const
Check if a value has been assigned to Aa data member.
bool IsIupacaa(void) const
Check if variant Iupacaa is selected.
bool IsNcbieaa(void) const
Check if variant Ncbieaa is selected.
bool IsSetExt(void) const
generic fields for ncRNA, tmRNA, miscRNA Check if a value has been assigned to Ext data member.
TCodon & SetCodon(void)
Assign a value to Codon data member.
TNcbieaa GetNcbieaa(void) const
Get the variant data.
TIupacaa GetIupacaa(void) const
Get the variant data.
void SetAa(TAa &value)
Assign a value to Aa data member.
void ResetCodon(void)
Reset Codon data member.
const TGen & GetGen(void) const
Get the variant data.
void ResetExt(void)
Reset Ext data member.
const TName & GetName(void) const
Get the variant data.
TGen & SetGen(void)
Select the variant.
const TProduct & GetProduct(void) const
Get the Product member data.
const TExt & GetExt(void) const
Get the Ext member data.
void SetProduct(const TProduct &value)
Assign a value to Product data member.
TExt & SetExt(void)
Assign a value to Ext data member.
void ResetProduct(void)
Reset Product data member.
@ eType_scRNA
will become ncRNA, with RNA-gen.class = scRNA
@ eType_snoRNA
will become ncRNA, with RNA-gen.class = snoRNA
@ eType_ncRNA
non-coding RNA; subsumes snRNA, scRNA, snoRNA
@ eType_snRNA
will become ncRNA, with RNA-gen.class = snRNA
Template structure SStaticPair is simlified replacement of STL pair<> Main reason of introducing this...