(
booluse_dev_server,
const string&args)
86 stringhost = use_dev_server ?
"dev-api-int.ncbi.nlm.nih.gov":
"api-int.ncbi.nlm.nih.gov";
87 stringpath =
"/biosample/fetch/";
88 stringurl =
"https://"+ host + path +
"?"+ args;
98 if(it != cache->
end())
104 stringargs =
"accession="+ accession +
"&format=asn1raw";
106unique_ptr<CObjectIStream> in_stream;
111*in_stream >> *response;
117(*cache)[accession] = response;
122 static unsigned intsuffix(1);
125ofstream ostr(filename);
174 while(it != item.
end()) {
189 if(it != cache->
end())
196 stringargs =
"accession="+ accession;
199 documentresponse(http_stream, &errors);
203 returnstatus.second;
208 while(it != root.
end())
220(*cache)[accession] = status;
227 stringargs =
"id="+ list +
"&bulk=true";
230 documentresponse(http_stream, &errors);
235 while(it != root.
end())
239status[response.first] = response.second;
250list +=
","+ it->first;
280 return "Suppressed";
283 return "ToBeCurated";
331edit::CDBLinkField dblink_field(edit::CDBLinkField::eDBLinkFieldType_BioSample);
332vector<CConstRef<CObject> > objs = dblink_field.GetObjects(bh);
334vector<string> new_ids = dblink_field.GetVals(**it);
335 ITERATE(vector<string>, s, new_ids) {
349vector<string> new_ids =
GetDBLinkIDs(*desc_ci,
"BioProject");
350 ITERATE(vector<string>, s, new_ids) {
361stream <<
"#sample\tattribute";
363stream <<
"\tSequenceID";
365stream <<
"\told_value\tnew_value"<< endl;
373 if(blank_sample && blank_src) {
377stream << m_BiosampleID <<
"\t";
378 if(use_geo_loc_name && m_FieldName ==
"country") {
379stream <<
"geo_loc_name"<<
"\t";
381stream << m_FieldName <<
"\t";
384stream << m_SequenceID <<
"\t";
386stream << (blank_sample ?
"[[add]]": m_SampleVal) <<
"\t";
387stream << (blank_src ?
"[[delete]]": m_SrcVal) << endl;
393 autoformattedValue = (
value+
string(width,
' ')).substr(0, width);
394ostr << formattedValue;
399 if(m_FieldName ==
"country"|| m_FieldName ==
"geo-loc-name"|| m_FieldName ==
"collection-date") {
408 if(m_FieldName ==
"country"|| m_FieldName ==
"geo-loc-name"|| m_FieldName ==
"collection-date") {
418 size_tvalueWidth)
const 421 autonewValue = GetSampleVal();
422 autooldValue = GetSrcVal();
424 if(oldValue.empty() && !newValue.empty()) {
425newValue =
string(
"[[add]] ") + newValue;
427 if(!oldValue.empty() && newValue.empty()) {
428oldValue =
string(
"[[delete]] ") + oldValue;
443stream << m_FieldName;
447stream << m_SequenceID <<
"\t";
448stream << (blank_sample ?
"": m_SampleVal) <<
"\t";
449stream << m_SrcVal <<
"\t";
475 int cmp= CompareAllButSequenceID(other);
491 stringname1 = f1->GetLabel();
492 stringname2 = f2->GetLabel();
508fields.insert(fields.end(), src_fields.begin(), src_fields.end());
512 if(fields.size() < 2) {
517TStructuredCommentTableColumnList::iterator f_prev = fields.begin();
518TStructuredCommentTableColumnList::iterator f_next = f_prev;
520 while(f_next != fields.end()) {
521 if(
NStr::Equal((*f_prev)->GetLabel(), (*f_next)->GetLabel())) {
522f_next = fields.erase(f_next);
540rval.push_back(diff);
565vector<CConstRef<CUser_object> > src_list;
567src_list.push_back(s1);
569src_list.push_back(s2);
574 if(
NStr::Equal((*it)->GetLabel(),
"StructuredCommentPrefix")
575||
NStr::Equal((*it)->GetLabel(),
"StructuredCommentSuffix")) {
578 stringsrc_val = (*it)->GetFromComment(src);
579 stringsample_val = (*it)->GetFromComment(sample);
583rval.push_back(diff);
595vector<CConstRef<CUser_object> > src_list;
597src_list.push_back(src);
600src_list.push_back(sample);
606 stringsrc_val =
"";
608src_val = (*it)->GetFromComment(*src);
610 stringsample_val =
"";
612(*it)->GetFromComment(*sample);
616rval.push_back(diff);
631 boolprinted_header =
false;
634 stringsrc_val = (*it)->GetSrcVal();
637 if(!printed_header) {
638*
log<<
"Conflict found for "<< (*it)->GetSequenceId() <<
" for "<< (*it)->GetBioSample() << endl;
639printed_header =
true;
641*
log<<
"\t"<< (*it)->GetFieldName() <<
": BioSource contains \""<< src_val <<
"\", BioSample contains \""<< (*it)->GetSampleVal() <<
"\""<< endl;
682 if((*cit)->IsSetHeader() && (*cit)->GetHeader().IsSetTitle()
683&&
NStr::Equal((*cit)->GetHeader().GetTitle(), column_name)) {
694 while(
column->SetData().SetString().size() <
row+ 1) {
695 column->SetData().SetString().push_back (
"");
706 if((*cit)->IsSetHeader() && (*cit)->GetHeader().IsSetTitle()
715new_col->SetHeader().SetTitle(column_name);
717 table.SetColumns().push_back(new_col);
726 if(
column.IsSetData() &&
column.GetData().IsString() &&
column.GetData().GetString().size() >
row) {
737 if((*cit)->IsSetHeader() && (*cit)->GetHeader().IsSetTitle()
753 if((*it)->IsSub()) {
770 boolinclude_comments,
const string& expected_prefix)
773 if(biosample_ids.size() > 0 && !with_id) {
787 while(pub_desc_ci && !
s_IsCitSub(*pub_desc_ci)) {
791 if(!src_desc_ci && !comm_desc_ci && bioproject_ids.size() == 0 && !pub_desc_ci) {
799 if(bioproject_ids.size() > 0) {
800 string val= bioproject_ids[0];
801 for(
size_t i= 1;
i< bioproject_ids.size();
i++) {
803 val+= bioproject_ids[
i];
810 if((*it)->IsSub() && (*it)->GetSub().IsSetAuthors() && (*it)->GetSub().GetAuthors().IsSetAffil()) {
811 const CAffil& affil = (*it)->GetSub().GetAuthors().GetAffil();
812 if(affil.
IsStd()) {
819}
else if(affil.
IsStr()) {
835 if(include_comments) {
836 while(comm_desc_ci) {
840 string label= (*it)->GetLabel();
849 if(with_id && biosample_ids.size() > 0) {
852 intnum_rows = (
int)
row+ 1;
853 table.SetNum_rows(num_rows);
876 if(biosample_ids.size() == 0) {
878biosample_ids.push_back(biosample_accession);
882 ITERATE(vector<string>, it, biosample_ids) {
891biosample_ids.clear();
892biosample_ids.push_back(biosample_accession);
904vector<CRef <CSeq_id> > id_list;
911id_list.push_back(ic);
917 id->GetLabel(&
label);
926 const string& biosample_accession,
927 size_t& num_processed,
928vector<string>& unprocessed_ids,
930 boolcompare_structured_comments,
931 const string& expected_prefix,
938vector<string> user_labels;
939vector<CConstRef<CUser_object> > user_objs;
940 while(comm_desc_ci) {
945user_labels.push_back(prefix);
946user_objs.push_back(obj);
964 if(biosample_ids.size() == 0) {
971 ITERATE(vector<string>,
id, biosample_ids) {
975 if((*it)->IsSource()) {
981diffs.insert(diffs.end(), these_diffs.begin(), these_diffs.end());
984 if(compare_structured_comments) {
988vector<string>::iterator sit = user_labels.begin();
989vector<CConstRef<CUser_object> >::iterator uit = user_objs.begin();
990 while(sit != user_labels.end() && uit != user_objs.end()) {
993diffs.insert(diffs.end(), these_diffs.begin(), these_diffs.end());
1004diffs.insert(diffs.end(), these_diffs.begin(), these_diffs.end());
1011unprocessed_ids.push_back(*
id);
1023 stringstreet =
"";
1026 stringcountry =
"";
1029 booladd_address =
false;
1032 if(auth_list && auth_list->
IsSetAffil()) {
1033affil = &(auth_list->
GetAffil());
1036 if(affil && affil->IsStd()) {
1050add_address =
true;
1057&& auth_list->
GetNames().
GetStd().front()->GetName().IsName()) {
1077address->
insert(
node(
"Street", street.c_str()));
1078address->
insert(
node(
"City", city.c_str()));
1079address->
insert(
node(
"Sub", sub.c_str()));
1080address->
insert(
node(
"Country", country.c_str()));
1100 if((*it)->IsSetSubtype() && (*it)->IsSetName()) {
1102 stringattribute_name =
"";
1104attribute_name =
"subsrc_note";
1109 string val= (*it)->GetName();
1126 if((*it)->IsSetSubtype() && (*it)->IsSetSubname()) {
1127 stringattribute_name =
"";
1129attribute_name =
"orgmod_note";
1150 string label= (*it)->GetLabel();
1155 string val= (*it)->GetFromComment(usr);
1158 boolfound =
false;
1159 while(
a!= sample_attrs.
end() && !found) {
1162 boolname_match =
false;
1163 while(at !=
a->get_attributes().end() && !name_match) {
1188list<string> sbm_info;
1189 if(affil.
IsStd()) {
1198}
else if(affil.
IsStr()) {
1199sbm_info.push_back(affil.
GetStr());
1209 const string& id_prefix,
1211 const string& bioproject_accession,
1212 const string& default_owner,
1213 const string& hup_date,
1214 const string& comment,
1215 boolfirst_seq_only,
1216 boolreport_structured_comments,
1217 const string& expected_prefix)
1220 if(biosample_ids.size() > 0) {
1226 if(bioproject_ids.size() > 0) {
1228 boolfound =
false;
1229 ITERATE(vector<string>, it, bioproject_ids) {
1238 " has conflicting BioProject ID "+ bioproject_ids[0];
1241bioproject_ids.clear();
1242bioproject_ids.push_back(bioproject_accession);
1245bioproject_ids.push_back(bioproject_accession);
1256 while(pub_desc_ci){
1259 if((*it)->IsSub() && (*it)->GetSub().IsSetAuthors()) {
1260auth_list = &((*it)->GetSub().GetAuthors());
1262}
else if((*it)->IsGen() && (*it)->GetGen().IsSetAuthors()) {
1263auth_list = &((*it)->GetGen().GetAuthors());
1270 if(!src_desc_ci && !comm_desc_ci && bioproject_ids.size() == 0) {
1284 stringtitle =
"Auto generated from GenBank Accession "+ sequence_id;
1285description->
insert(
node(
"Comment", title.c_str()));
1290 if(auth_list && auth_list->
IsSetAffil()) {
1291affil = &(auth_list->
GetAffil());
1298attrs.
insert(
"role",
"owner");
1299attrs.
insert(
"type",
"institute");
1302 nodeowner(
"Owner");
1304 stringowner_str =
"";
1309owner_str = default_owner;
1312organization->
insert(
node(
"Name", owner_str.c_str()));
1313owner.
insert(
node(
"Name", owner_str.c_str()));
1320description->
insert(hup);
1328 data->get_attributes().insert(
"content_type",
"XML");
1334 stringsample_id = sequence_id;
1336 if(first_seq_only) {
1337sample_id = id_prefix;
1339sample_id = id_prefix +
":"+ sequence_id;
1342node_iter = ids->
insert(
node(
"SPUID", sample_id.c_str()));
1348descr->
insert(
node(
"Description", comment.c_str()));
1355 if(bioproject_ids.size() > 0) {
1356 nodelinks(
"BioProject");
1357 ITERATE(vector<string>, it, bioproject_ids) {
1358 if(! it->empty()) {
1359node_iter = links.
insert(
node(
"PrimaryId", it->c_str()));
1366sample->
insert(
node(
"Package",
"Generic.1.0"));
1368 nodesample_attrs(
"Attributes");
1374 if(report_structured_comments) {
1375 while(comm_desc_ci) {
1384sample->
insert(sample_attrs);
1386node_iter = identifier->
insert(
node(
"SPUID", sample_id.c_str()));
1391 if(report_stream) {
1392*report_stream << doc << endl;
1394 stringpath = sequence_id;
1399path = path +
".xml";
1405*xml_out << doc << endl;
1419 for(
autopSampleDesc: bioSample.
Get()) {
1420 const CSeqdesc& sampleDesc = *pSampleDesc;
1425 "biosample",
"descriptors", bioSource, sampleDesc.
GetSource());
1426diffs.insert(diffs.end(), these_diffs.begin(), these_diffs.end());
1435 const string& filename,
1442ostr << asnText << object;
1450 const string& existingBiosampleAcc,
1458existingBiosampleAcc,
false,
nullptr);
1460 boolassigned =
false;
1461 for(
autopExistingDesc: pExistingBiosampleDescrs->
Get()) {
1462 CSeqdesc& existingDesc = *pExistingDesc;
1469 "submitted",
"curated", newBioSource, existingSource);
1470 if(!diffs.empty()) {
1472proposedNewBiosource.
Assign(existingSource);
1480 return!diffs.empty();
1490 if(existingBiosource.
IsSetOrg()) {
1491 const auto& existingOrg = existingBiosource.
GetOrg();
1492 if(existingOrg.IsSetTaxname()) {
1494newBiosource.
SetOrg().SetTaxname(existingOrg.GetTaxname());
1497 autoexistingTaxId = existingOrg.GetTaxId();
1500newBiosource.
SetOrg().SetTaxId(existingTaxId);
1506 auto& newOrgs = newBiosource.
SetOrg().SetOrgname().SetMod();
1507 for(
const auto& pExistingMod: existingOrgs) {
1508 autoexistingSubtype = pExistingMod->GetSubtype();
1509 autoexistingSubname = pExistingMod->GetSubname();
1510 boolalreadyThere =
false;
1511 for(
const auto& pNewMod: newOrgs) {
1512 autonewSubtype = pNewMod->GetSubtype();
1513 if( newSubtype == existingSubtype) {
1514alreadyThere =
true;
1522newOrgs.push_back(pNewMod);
1527 const auto& existingSubtypes = existingBiosource.
GetSubtype();
1528 for(
const auto& pExistingSubSource: existingSubtypes) {
1529 if(!pExistingSubSource->CanGetName()) {
1532 autoexistingSubtype = pExistingSubSource->GetSubtype();
1536 if(newBiosource.
HasSubtype(existingSubtype)) {
1540pNewSubsource->
Assign(*pExistingSubSource);
1541newBiosource.
SetSubtype().push_back(pNewSubsource);
1551 const string& fieldName)
1554 for(
const autopDiff: diffs) {
1555 if(pDiff->GetFieldName() == fieldName) {
1570 if(existingBiosource.
IsSetOrg()) {
1571 const auto& existingOrg = existingBiosource.
GetOrg();
1574 if(fromDiff && !fromDiff->GetSrcVal().empty()) {
1575newBiosource.
SetOrg().SetTaxname(existingOrg.GetTaxname());
1580 autoexistingTaxId = existingOrg.GetTaxId();
1582newBiosource.
SetOrg().SetTaxId(existingTaxId);
1589 auto& newOrgs = newBiosource.
SetOrg().SetOrgname().SetMod();
1590 for(
const auto& pExistingMod: existingOrgs) {
1591 autoexistingSubtype = pExistingMod->GetSubtype();
1594 if(fromDiff && !fromDiff->GetSrcVal().empty()) {
1596newOrgs.push_back(pNewMod);
1602 const auto& existingSubtypes = existingBiosource.
GetSubtype();
1603 auto& newSubtypes = newBiosource.
SetSubtype();
1604 for(
const auto& pExistingSubSource: existingSubtypes) {
1605 if(!pExistingSubSource->CanGetName()) {
1608 autoexistingSubtype = pExistingSubSource->GetSubtype();
1611 if(pFromDiff && !pFromDiff->GetSrcVal().empty()) {
1613 new CSubSource(existingSubtype, pFromDiff->GetSrcVal()));
1614newSubtypes.push_back(pNewSubsource);
1634ostr <<
string(keyWidth + 2 * valueWidth,
'-') <<
"\n";
1636 for(
autodiff: diffList) {
1637diff->PrettyPrint(ostr, keyWidth, valueWidth);
vector< CRef< CFieldDiff > > TFieldDiffList
User-defined methods of the data storage class.
User-defined methods of the data storage class.
bool s_ShouldIgnoreStructuredCommentFieldDiff(const string &label, const string &src_val, const string &sample_val)
bool UpdateBiosourceFromBiosample(const CBioSource &existingBiosource, CBioSource &newBiosource)
void AddBioseqToTable(CBioseq_Handle bh, CSeq_table &table, bool with_id, bool include_comments, const string &expected_prefix)
string OwnerFromAffil(const CAffil &affil)
static const char * kAffilInst
string GetValueFromColumn(const CSeqTable_column &column, size_t row)
void AddBioSourceToAttributes(node &organism, node &sample_attrs, const CBioSource &src)
void HarmonizeAttributeName(string &attribute_name)
vector< string > GetDBLinkIDs(const CUser_object &user, const string &field_name)
bool s_IsReportableStructuredComment(const CSeqdesc &desc, const string &expected_prefix)
void s_AddSamplePair(node &sample_attrs, string attribute_name, string val)
bool ResolveSuppliedBioSampleAccession(const string &biosample_accession, vector< string > &biosample_ids)
EStatus GetBioSampleStatusFromNode(const node &item)
static const char * kSequenceID
static const char * kStructuredCommentPrefix
static const char * kStructuredCommentSuffix
vector< string > GetBioProjectIDs(CBioseq_Handle bh)
CRef< CSeqTable_column > FindSeqTableColumnByName(CRef< CSeq_table > values_table, string column_name)
void AddValueToTable(CSeq_table &table, string column_name, string value, size_t row)
static const char * kAffilDept
string PrepareUrl(bool use_dev_server, const string &args)
bool DoDiffsContainConflicts(const TBiosampleFieldDiffList &diffs, CNcbiOstream *log)
string GetBestBioseqLabel(CBioseq_Handle bsh)
static const char * kBioProject
TStatus ProcessBiosampleStatusNode(node &item)
CRef< CSeq_descr > GetBiosampleData(const string &accession, bool use_dev_server, TBioSamples *cache)
bool s_CompareStructuredCommentFields(CRef< CStructuredCommentTableColumnBase > f1, CRef< CStructuredCommentTableColumnBase > f2)
CConstRef< CBiosampleFieldDiff > sGetDiffByFieldName(const TBiosampleFieldDiffList &diffs, const string &fieldName)
void PrettyPrint(const TBiosampleFieldDiffList &diffList, CNcbiOstream &ostr, size_t keyWidth, size_t valueWidth)
TStructuredCommentTableColumnList GetAvailableFields(vector< CConstRef< CUser_object > > src)
static bool s_IsCitSub(const CSeqdesc &desc)
void AddStructuredCommentToAttributes(node &sample_attrs, const CUser_object &usr)
TBiosampleFieldDiffList GetBioseqDiffs(CBioseq_Handle bh, const string &biosample_accession, size_t &num_processed, vector< string > &unprocessed_ids, bool use_dev_server, bool compare_structured_comments, const string &expected_prefix, TBioSamples *cache)
void PrintBioseqXML(CBioseq_Handle bh, const string &id_prefix, CNcbiOstream *report_stream, const string &bioproject_accession, const string &default_owner, const string &hup_date, const string &comment, bool first_seq_only, bool report_structured_comments, const string &expected_prefix)
string GetBiosampleStatusName(EStatus status)
EStatus GetBiosampleStatus(const string &accession, bool use_dev_server, TStatuses *cache)
void sPrintField(const string &value, size_t width, CNcbiOstream &ostr)
void GenerateDiffListFromBioSource(const CSeq_descr &bioSample, const CBioSource &bioSource, TBiosampleFieldDiffList &diffs)
void AddContact(node::iterator &organization, CConstRef< CAuth_list > auth_list)
bool AttributeNamesAreEquivalent(string name1, string name2)
string GetValueFromTable(const CSeq_table &table, string column_name, size_t row)
void SaveSerialObject(const string &filename, const CSerialObject &object)
void AddValueToColumn(CRef< CSeqTable_column > column, string value, size_t row)
void ProcessBulkBioSample(TStatuses &status, string list, bool use_dev_server)
vector< string > GetBiosampleIDs(CBioseq_Handle bh)
TBiosampleFieldDiffList GetFieldDiffs(const string &sequence_id, const string &biosample_id, const CBioSource &src, const CBioSource &sample)
vector< CRef< CBiosampleFieldDiff > > TBiosampleFieldDiffList
map< string, CRef< CSeq_descr > >::iterator TBioSamplesIterator
pair< string, biosample_util::EStatus > TStatus
map< string, EStatus >::iterator TStatusesIterator
@Affil.hpp User-defined methods of the data storage class.
static bool ShouldIgnoreConflict(const string &label, string src_val, string sample_val, bool is_local_copy=false)
TNameValList GetNameValPairs() const
static bool IsStopWord(const string &value)
bool HasSubtype(CSubSource::TSubtype subtype) const
vector< TNameVal > TNameValList
bool IsSetTaxname(void) const
TFieldDiffList GetBiosampleDiffs(const CBioSource &biosample, bool is_local_copy=false) const
string GetSampleVal() const
int Compare(const CBiosampleFieldDiff &other)
static void PrintHeader(ncbi::CNcbiOstream &stream, bool show_seq_id=true)
void PrettyPrint(ncbi::CNcbiOstream &stream, size_t keyWidth=20, size_t valueWidth=40) const
void Print(ncbi::CNcbiOstream &stream, bool show_seq_id=true) const
int CompareAllButSequenceID(const CBiosampleFieldDiff &other)
This stream exchanges data with an HTTP server located at the URL: http[s]://host[:port]/path[?...
@Name_std.hpp User-defined methods of the data storage class.
@OrgMod.hpp User-defined methods of the data storage class.
static string GetSubtypeName(TSubtype stype, EVocabulary vocabulary=eVocabulary_raw)
bool IsSetOrgMod(void) const
@Seq_descr.hpp User-defined methods of the data storage class.
Base class for all serializable objects.
static bool NCBI_UseGeoLocNameForCountry(void)
static string GetSubtypeName(CSubSource::TSubtype stype, EVocabulary vocabulary=eVocabulary_raw)
static bool NeedsNoText(const TSubtype &subtype)
const CUser_field & GetField(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const
Access a named field in this user object.
container_type::iterator iterator
const_iterator begin() const
const_iterator end() const
const_iterator find(const key_type &key) const
const char * get_value(void) const
Get the value of this attribute.
const char * get_name(void) const
Get the name of this attribute.
Const Iterator class for accessing attribute pairs.
Iterator class for accessing attribute pairs.
The xml::attributes class is used to access all the attributes of one xml::node.
iterator begin(void)
Get an iterator that points to the first attribute.
iterator end(void)
Get an iterator that points one past the the last attribute.
void insert(const char *name, const char *value, const ns *nspace=NULL)
Add an attribute to the attributes list.
The xml::document class is used to hold the XML tree and various bits of information about it.
void set_encoding(const char *encoding)
Set the XML encoding string.
const node & get_root_node(void) const
Get a reference to the root node of this document.
void set_is_standalone(bool sa)
Set the standalone flag.
The xml::error_messages class is used to store all the error message which are collected while parsin...
The xml::node::iterator provides a way to access children nodes similar to a standard C++ container.
The xml::node class is used to hold information about one XML node.
const char * get_name(void) const
Get the name of this xml::node.
iterator end(void)
Get an iterator that points one past the last child for this node.
iterator begin(void)
Get an iterator that points to the beginning of this node's children.
iterator insert(const node &n)
Insert a new child node.
xml::attributes & get_attributes(void)
Get the list of attributes.
void Print(const CCompactSAMApplication::AlignInfo &ai)
Include a standard set of the NCBI C++ Toolkit most basic headers.
The NCBI C++ standard methods for dealing with std::string.
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
static DLIST_TYPE *DLIST_NAME() last(DLIST_LIST_TYPE *list)
static DLIST_TYPE *DLIST_NAME() prev(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
static const char * column
#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 NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
static int BestRank(const CRef< CSeq_id > &id)
vector< CSeq_id_Handle > TId
const TId & GetId(void) const
TObjectType * GetPointer(void) const THROWS_NONE
Get pointer,.
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.
IO_PREFIX::ofstream CNcbiOfstream
Portable alias for ofstream.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
static int CompareNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive compare of a substring with another string.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
static int Compare(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2, ECase use_case=eCase)
Compare of a substring with another string.
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.
static int CompareCase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-sensitive compare of a substring with another string.
@ eNocase
Case insensitive compare.
@ eCurrent
Use current time. See also CCurrentTime.
C::value_type FindBestChoice(const C &container, F score_func)
Find the best choice (lowest score) for values in a container.
static const char label[]
bool IsSetAffil(void) const
author affiliation Check if a value has been assigned to Affil data member.
const TAffil & GetAffil(void) const
Get the Affil member data.
bool IsSetStreet(void) const
street address, not ANSI Check if a value has been assigned to Street data member.
const TStr & GetStr(void) const
Get the variant data.
bool IsSetCity(void) const
Author Affiliation, City Check if a value has been assigned to City data member.
const TEmail & GetEmail(void) const
Get the Email member data.
bool IsSetEmail(void) const
Check if a value has been assigned to Email data member.
const TStreet & GetStreet(void) const
Get the Street member data.
const TAffil & GetAffil(void) const
Get the Affil member data.
const TSub & GetSub(void) const
Get the Sub member data.
bool IsStr(void) const
Check if variant Str is selected.
bool IsSetNames(void) const
Check if a value has been assigned to Names data member.
bool IsSetDiv(void) const
Author Affiliation, Division Check if a value has been assigned to Div data member.
const TCountry & GetCountry(void) const
Get the Country member data.
const TStd & GetStd(void) const
Get the variant data.
const TNames & GetNames(void) const
Get the Names member data.
const TStd & GetStd(void) const
Get the variant data.
bool IsStd(void) const
Check if variant Std is selected.
bool IsSetCountry(void) const
Author Affiliation, Country Check if a value has been assigned to Country data member.
const TCity & GetCity(void) const
Get the City member data.
bool IsSetAffil(void) const
Author Affiliation, Name Check if a value has been assigned to Affil data member.
const TDiv & GetDiv(void) const
Get the Div member data.
bool IsSetSub(void) const
Author Affiliation, County Sub Check if a value has been assigned to Sub data member.
bool IsStd(void) const
Check if variant Std is selected.
const TSubtype & GetSubtype(void) const
Get the Subtype member data.
bool IsSetOrg(void) const
Check if a value has been assigned to Org data member.
list< CRef< CSubSource > > TSubtype
bool IsSetSubtype(void) const
Check if a value has been assigned to Subtype data member.
const TOrg & GetOrg(void) const
Get the Org member data.
void SetOrg(TOrg &value)
Assign a value to Org data member.
TSubtype & SetSubtype(void)
Assign a value to Subtype data member.
bool IsStr(void) const
Check if variant Str is selected.
bool IsSetType(void) const
type of object within class Check if a value has been assigned to Type data member.
bool IsStrs(void) const
Check if variant Strs is selected.
const TStrs & GetStrs(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
bool IsSetLast(void) const
Check if a value has been assigned to Last data member.
const TStr & GetStr(void) const
Get the variant data.
const TType & GetType(void) const
Get the Type member data.
const TFirst & GetFirst(void) const
Get the First member data.
const TLast & GetLast(void) const
Get the Last member data.
bool IsSetData(void) const
Check if a value has been assigned to Data data member.
vector< CStringUTF8 > TStrs
bool IsSetFirst(void) const
Check if a value has been assigned to First data member.
const TMod & GetMod(void) const
Get the Mod member data.
const TTaxname & GetTaxname(void) const
Get the Taxname member data.
list< CRef< COrgMod > > TMod
bool IsSetOrgname(void) const
Check if a value has been assigned to Orgname data member.
bool IsSetTaxname(void) const
preferred formal name Check if a value has been assigned to Taxname data member.
const TOrgname & GetOrgname(void) const
Get the Orgname member data.
@ eSubtype_other
ASN5: old-name (254) will be added to next spec.
list< CRef< CPub > > Tdata
const Tdata & Get(void) const
Get the member data.
const TColumns & GetColumns(void) const
Get the Columns member data.
vector< CRef< CSeqTable_column > > TColumns
bool IsGenbank(void) const
Check if variant Genbank is selected.
list< CRef< CSeqdesc > > Tdata
const TUser & GetUser(void) const
Get the variant data.
const TSource & GetSource(void) const
Get the variant data.
const TPub & GetPub(void) const
Get the variant data.
bool IsSource(void) const
Check if variant Source is selected.
const Tdata & Get(void) const
Get the member data.
bool IsPub(void) const
Check if variant Pub is selected.
bool IsSetPub(void) const
the citation(s) Check if a value has been assigned to Pub data member.
const TPub & GetPub(void) const
Get the Pub member data.
bool IsUser(void) const
Check if variant User is selected.
@ e_User
user defined object
@ e_Pub
a reference to the publication
@ e_Source
source of materials, includes Org-ref
unsigned int
A callback function used to compare two keys in a database.
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n table
constexpr auto sort(_Init &&init)
const GenericPointer< typename T::ValueType > T2 value
static SLJIT_INLINE sljit_ins st(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
#define row(bind, expected)
vector< CRef< CStructuredCommentTableColumnBase > > TStructuredCommentTableColumnList
TStructuredCommentTableColumnList GetStructuredCommentFields(const CUser_object &src)
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