77 const string& codeBreakStr)
82 const string cdstr_start =
"(pos:";
83 const string cdstr_div =
",aa:";
84 const string cdstr_end =
")";
90 size_t pos_start = cdstr_start.length();
91 size_t pos_stop = codeBreakStr.find(cdstr_div);
92 string posstr = codeBreakStr.substr(pos_start, pos_stop-pos_start);
93 string aaa = codeBreakStr.substr(pos_stop+cdstr_div.length());
94 aaa = aaa.substr(0, aaa.length()-cdstr_end.length());
96 const string posstr_compl =
"complement(";
99 posstr = posstr.substr(posstr_compl.length());
100 posstr = posstr.substr(0, posstr.length()-1);
103 const string posstr_div =
"..";
104 size_t pos_div = posstr.find(posstr_div);
105 if (pos_div == string::npos) {
120 pCodeBreak->
SetAa().SetNcbieaa(aaCode);
121 auto& cbLoc = pCodeBreak->
SetLoc().SetInt();
122 cbLoc.SetId().Assign(
id);
125 cbLoc.SetStrand(strand);
bool IsFtable(void) const
static CRef< CCode_break > MakeCodeBreak(const CSeq_id &, const std::string &)
static bool ContainsData(const CSeq_annot &annot)
static CRef< CSeq_loc > AddLocations(const CSeq_loc &, const CSeq_loc &)
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Override Assign() to incorporate cache invalidation.
void Add(const CSeq_loc &other)
Simple adding of seq-locs.
void Reset(void)
Reset reference object.
#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 int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
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 StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
void SetAa(TAa &value)
Assign a value to Aa data member.
void SetLoc(TLoc &value)
Assign a value to Loc data member.
ENa_strand
strand of nucleic acid
bool IsNull(void) const
Check if variant Null is selected.
const TFtable & GetFtable(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...