(seqdesc && seqdesc->
IsUser()) {
70 if(user && IsStructuredCommentForThisField(*user)) {
73CUser_object::TData::iterator it = user->
SetData().begin();
74 while(it != user->
SetData().end()) {
75 if((*it)->IsSetLabel() && (*it)->GetLabel().IsStr()
76&&
NStr::Equal((*it)->GetLabel().GetStr(), m_FieldName)) {
77rval |= SetVal(**it, newValue, existing_text);
80 if(!(*it)->IsSetData()) {
81it = user->
SetData().erase(it);
87 if(!found && (!
NStr::Equal(m_ConstraintFieldName, m_FieldName) || !m_StringConstraint)) {
89new_field->
SetLabel().SetStr(m_FieldName);
91x_InsertFieldAtCorrectPosition(*user, new_field);
97 if(user->
GetData().empty()) {
113user.
SetData().push_back(field);
119 if(field_names.size() == 0) {
121user.
SetData().push_back(field);
125vector<string>::iterator sit = field_names.begin();
126CUser_object::TData::iterator fit = user.
SetData().begin();
127 while(sit != field_names.end() && fit != user.
SetData().end()) {
128 stringfield_label = (*fit)->GetLabel().GetStr();
138user.
SetData().insert(fit, field);
145user.
SetData().push_back(field);
159field.
SetData().SetStr(curr_val);
165field.
SetData().SetStr(newValue);
170field.
SetData().SetStr(newValue);
180vector<string> vals =
GetVals(
object);
181 if(vals.size() > 0) {
196 if(seqdesc && seqdesc->
IsUser()) {
197user = &(seqdesc->
GetUser());
200CUser_object::TData::const_iterator it = user->
GetData().begin();
201 while(it != user->
GetData().end()) {
202 if((*it)->IsSetLabel() && (*it)->GetLabel().IsStr() && (*it)->IsSetData()
204 switch((*it)->GetData().Which()) {
206vals.push_back((*it)->GetData().GetStr());
229string_constraint.
Reset();
239vector<CConstRef<CObject> >
objects;
245 object.
Reset(&(*desc_ci));
257vector<CRef<CApplyObject> >
objects;
282vector<CConstRef<CObject> > objs;
289vector<CConstRef<CObject> > these_objs =
GetObjects(*bi);
290objs.insert(objs.end(), these_objs.begin(), these_objs.end());
293vector<CConstRef<CObject> > these_objs =
GetObjects(*bi);
296objs.push_back (*it);
312 if(seqdesc && seqdesc->
IsUser()) {
313user = &(seqdesc->
GetUser());
323 if(!(*it)->IsSetLabel()
324|| !(*it)->GetLabel().IsStr()) {
330 string label= (*it)->GetLabel().GetStr();
350 if(seqdesc && seqdesc->
IsUser()) {
351user = &(seqdesc->
SetUser());
354CUser_object::TData::iterator it = user->
SetData().begin();
355 while(it != user->
SetData().end()) {
356 booldo_erase =
false;
357 if((*it)->IsSetLabel() && (*it)->GetLabel().IsStr() &&
NStr::Equal((*it)->GetLabel().GetStr(),
m_FieldName)) {
361it = user->
SetData().erase(it);
366 if(user->
GetData().empty()) {
375vector<CConstRef<CObject> > related;
384}
else if(obj_desc) {
387related.push_back(obj);
400vector<CConstRef<CObject> > related;
407}
else if(obj_desc) {
410related.push_back(obj);
437 stringroot = prefix;
470 if(!comment_rules) {
480 if(errors.size() == 0) {
491 if(errors.size() == 0) {
507 if(!comment_rules) {
551field.
SetVal(obj,
val, existing_text);
560 if(pos != string::npos) {
561program =
val.substr(0, pos);
571 stringnew_val = program;
586 stringprevious = field.
GetVal(obj);
600 stringprevious = field.
GetVal(obj);
614field.
SetVal(obj,
val, existing_text);
621field.
SetVal(obj,
val, existing_text);
628field.
SetVal(obj,
val, existing_text);
635field.
SetVal(obj,
val, existing_text);
642field.
SetVal(obj,
val, existing_text);
649 returnfield.
GetVal(obj);
656 stringmethod = field.
GetVal(obj);
667 stringmethod = field.
GetVal(obj);
678 returnfield.
GetVal(obj);
685 returnfield.
GetVal(obj);
692 returnfield.
GetVal(obj);
699 returnfield.
GetVal(obj);
706 returnfield.
GetVal(obj);
780 const string kANI=
"Taxonomic-Update-Statistics";
818 #define ANI_STRING_FIELD_IMPLEMENTATION(Fieldname) \ 819 void CANIComment::Set##Fieldname(CUser_object& obj, string val, EExistingText existing_text) \ 821 CStructuredCommentField field(kANI, kANI##Fieldname); \ 822 field.SetVal(obj, val, existing_text); \ 824 string CANIComment::Get##Fieldname(const CUser_object& obj) \ 826 CStructuredCommentField field(kANI, kANI##Fieldname); \ 827 return field.GetVal(obj); \ 829 CANIComment& CANIComment::Set##Fieldname(string val, EExistingText existing_text) \ 831 Set##Fieldname(*m_User, val, existing_text); \User-defined methods of the data storage class.
User-defined methods of the data storage class.
CSeq_entry_Handle GetSeqEntryForSeqdesc(CRef< CScope > scope, const CSeqdesc &seq_desc)
int Compare(const CObject_id &oid2) const
static bool DoesSeqMatchConstraint(CBioseq_Handle bsh, CRef< CStringConstraint > string_constraint)
namespace ncbi::objects::
bool DoesTextMatch(const string &text)
void Assign(const CStringConstraint &other)
Include a standard set of the NCBI C++ Toolkit most basic headers.
The NCBI C++ standard methods for dealing with std::string.
const char * kFieldTypeSeqId
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
CScope & GetScope(void) const
Get scope this handle belongs to.
void Reset(void)
Reset reference object.
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 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 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 const char label[]
const TStr & GetStr(void) const
Get the variant data.
bool IsSetData(void) const
the object itself Check if a value has been assigned to Data data member.
const TData & GetData(void) const
Get the Data member data.
bool IsStr(void) const
Check if variant Str is selected.
bool IsSetLabel(void) const
field label Check if a value has been assigned to Label data member.
TData & SetData(void)
Assign a value to Data data member.
const TStr & GetStr(void) const
Get the variant data.
void SetLabel(TLabel &value)
Assign a value to Label data member.
const TData & GetData(void) const
Get the Data member data.
void SetType(TType &value)
Assign a value to Type data member.
void ResetData(void)
Reset Data data member.
void SetData(TData &value)
Assign a value to Data data member.
const TLabel & GetLabel(void) const
Get the Label member data.
bool IsSetData(void) const
Check if a value has been assigned to Data data member.
vector< CStringUTF8 > TStrs
vector< CRef< CUser_field > > TData
E_Choice Which(void) const
Which variant is currently selected.
@ e_not_set
No variant selected.
const TLocation & GetLocation(void) const
Get the Location member data.
const TUser & GetUser(void) const
Get the variant data.
TUser & SetUser(void)
Select the variant.
bool IsUser(void) const
Check if variant User is selected.
@ e_User
user defined object
@ eMol_na
just a nucleic acid
bool DoesObjectMatchFieldConstraint(const CObject &object, const string &field_name, CRef< objects::edit::CStringConstraint > string_constraint, CRef< objects::CScope > scope)
const string version
version string
@ eExistingText_replace_old
bool AddValueToString(string &str, const string &value, EExistingText existing_text)
Add text to an existing string, using the "existing_text" directive to combine new text with existing...
const string kANIPreviousName
const string kANIAnalysis1
const string kANIA1SubjectCoverage
const string kANIA1QueryCoverage
const string kANIA2SubjectCoverage
const string kANIA2QueryCoverage
USING_SCOPE(ncbi::objects)
const string kExpectedFinalVersion
const string kANICurrentName
const string kAssemblyMethod
const string kGenomeAssemblyData
const string kANIThisGenome
const string kANIA1Genome
const string kSingleCellAmplification
const string kANIAnalysisType
const string kANIDateUpdated
const string kGenomeCoverage
const string kStructuredCommentSuffix
const string kStructuredComment
#define ANI_STRING_FIELD_IMPLEMENTATION(Fieldname)
const string kStructuredCommentPrefix
const string kReferenceGuidedAssembly
const string kANIA2Genome
const string kANIAnalysis2
bool s_UserFieldCompare(const CRef< CUser_field > &f1, const CRef< CUser_field > &f2)
const string kSequencingTechnology
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