112 using namespace ncbi;
129 m_UseDevServer(
false)
153 virtual void AddSummary();
167 for (
const auto &it : ids) {
168 if (m_Status.find(it) == m_Status.end()) {
170 m_Status.insert(new_pair);
177 if (m_Status.empty()) {
178 *m_ReportStream <<
"No BioSample IDs found" << endl;
181 biosample_util::TStatuses::iterator it = m_Status.begin();
182 while (it != m_Status.end()) {
196 virtual void Init(
void);
197 virtual int Run (
void);
204 void Setup(
const CArgs& args);
206 unique_ptr<CObjectIStream> OpenFile(
const CArgs& args);
207 unique_ptr<CObjectIStream> OpenFile(
const string &fname);
208 void SaveFile(
const string &fname,
bool useBinaryOutputFormat);
216 void ProcessSeqEntry(
void);
217 void ProcessSet(
void);
218 void ProcessSeqSubmit(
void);
219 void ProcessAsnInput (
void);
220 void ProcessList (
const string& fname);
221 void ProcessFileList (
const string& fname);
222 int ProcessOneDirectory(
const string& dir_name,
const string& file_suffix,
const string& file_mask,
bool recurse);
223 void ProcessOneFile(
string fname);
224 void ProcessReleaseFile(
const CArgs& args);
237 vector<CRef<CSeqdesc> > GetBiosampleDescriptors(
string fname);
238 vector<CRef<CSeqdesc> > GetBiosampleDescriptorsFromSeqSubmit();
239 vector<CRef<CSeqdesc> > GetBiosampleDescriptorsFromSeqEntry();
240 vector<CRef<CSeqdesc> > GetBiosampleDescriptorsFromSeqEntry(
const CSeq_entry& se);
243 unique_ptr<CObjectIStream>
m_In;
301 m_ObjMgr(0), m_Continue(
false),
302 m_Level(0), m_ReportStream(0), m_NeedReportHeader(
true), m_AsnOut(0),
303 m_LogStream(0), m_Mode(e_report_diffs), m_ReturnCode(0),
304 m_StructuredCommentPrefix(
""), m_CompareStructuredComments(
true),
305 m_FirstSeqOnly(
false), m_IDPrefix(
""), m_HUPDate(
""),
306 m_BioSampleAccession(
""), m_BioProjectAccession(
""),
307 m_Owner(
""), m_Comment(
""),
308 m_Processed(0), m_Unprocessed(0), m_Handler(
NULL)
320 arg_desc->AddOptionalKey
321 (
"p",
"Directory",
"Path to ASN.1 Files",
323 arg_desc->AddOptionalKey
324 (
"i",
"InFile",
"Single Input File",
326 arg_desc->AddOptionalKey(
327 "o",
"OutFile",
"Single Output File",
329 arg_desc->AddOptionalKey(
330 "f",
"Filter",
"Substring Filter",
332 arg_desc->AddDefaultKey
334 arg_desc->AddFlag(
"u",
"Recurse");
335 arg_desc->AddFlag(
"d",
"Use development Biosample server");
337 arg_desc->AddDefaultKey(
"a",
"a",
338 "ASN.1 Type (a Automatic, z Any, e Seq-entry, b Bioseq, s Bioseq-set, m Seq-submit, t Batch Bioseq-set, u Batch Seq-submit) or accession list (l)",
342 arg_desc->AddFlag(
"b",
"Output binary ASN.1");
344 arg_desc->AddFlag(
"M",
"Process only first sequence in file (master)");
348 arg_desc->AddOptionalKey(
349 "L",
"OutFile",
"Log File",
352 arg_desc->AddDefaultKey(
353 "m",
"mode",
"Mode:\n"
354 "\t1 create update file\n"
355 "\t2 generate file for creating new biosample entries\n"
356 "\t3 push source info from one file (-i) to others (-p)\n"
357 "\t4 update with source qualifiers from BioSample unless conflict\n"
358 "\t5 update with source qualifiers from BioSample (continue with conflict))\n"
359 "\t6 report transaction status\n"
360 "\t7 use web API for update (with delete)\n"
361 "\t8 use web API for update (no delete)\n",
364 arg_desc->SetConstraint(
"m", constraint);
366 arg_desc->AddOptionalKey(
369 arg_desc->AddOptionalKey(
370 "biosample",
"BioSampleAccession",
"BioSample Accession to use for sequences in record. Report error if sequences contain a reference to a different BioSample accession.",
CArgDescriptions::eString);
371 arg_desc->AddOptionalKey(
372 "bioproject",
"BioProjectAccession",
"BioProject Accession to use for sequences in record. Report error if sequences contain a reference to a different BioProject accession.",
CArgDescriptions::eString);
373 arg_desc->AddOptionalKey(
"comment",
"BioSampleComment",
"Comment to use for creating new BioSample xml",
CArgDescriptions::eString);
375 arg_desc->AddOptionalKey(
"apikey_file",
"BioSampleWebAPIKey",
"File containing Web API Key needed to update BioSample database",
CArgDescriptions::eString);
378 string prog_description =
"BioSample Checker\n";
379 arg_desc->SetUsageContext(
GetArguments().GetProgramBasename(),
380 prog_description,
false);
395 string header =
m_In->ReadFileHeader();
397 bool unhandled =
false;
399 if (header ==
"Seq-submit" ) {
401 }
else if ( header ==
"Seq-entry" ) {
403 }
else if (header ==
"Bioseq-set" ) {
436 while ( !lr->
AtEOF() ) {
446 *
m_LogStream <<
"Unable to fetch Bioseq for " << line << endl;
448 id->GetLabel(&
label);
474 while ( !lr->
AtEOF() ) {
488 bool need_to_close_report =
false;
489 bool need_to_close_asn =
false;
496 if (pos != string::npos) {
497 path = path.substr(0, pos);
499 path = path +
".val";
507 need_to_close_report =
true;
516 if (pos != string::npos) {
517 path = path.substr(0, pos);
519 path = path +
".out";
521 need_to_close_asn =
true;
534 if (
m_In.get() ==
nullptr) {
537 if (!
m_In->InGoodState()) {
559 if (need_to_close_report) {
569 if (need_to_close_asn) {
588 vector<CRef<CSeqdesc> > descriptors;
597 src_desc->
Assign(*src_desc_ci);
598 descriptors.push_back(src_desc);
608 vector<CRef<CSeqdesc> > descriptors;
633 string header =
m_In->ReadFileHeader();
635 vector<CRef<CSeqdesc> > descriptors;
636 if (header ==
"Seq-submit" ) {
638 }
else if ( header ==
"Seq-entry" ) {
650 int num_of_files = 0;
654 for (
const auto &ii : files) {
655 string fname = ii->GetName();
657 (!file_suffix.empty() ||
NStr::Find (fname, file_suffix) != string::npos)) {
665 for (
const auto &ii : subdirs) {
666 string subdir = ii->GetName();
686 m_Mode = args[
"m"].AsInteger();
688 m_IDPrefix = args[
"R"] ? args[
"R"].AsString() :
"";
689 m_HUPDate = args[
"HUP"] ? args[
"HUP"].AsString() :
"";
692 m_Comment = args[
"comment"] ? args[
"comment"].AsString() :
"";
694 string apikey_file = args[
"apikey_file"] ? args[
"apikey_file"].AsString() :
"";
695 if (!apikey_file.empty()) {
696 ifstream is(apikey_file.c_str());
721 SaveFile(args[
"o"].AsString(), args[
"b"]);
748 *
m_LogStream <<
"Structured comment prefix is only appropriate for generating a biosample table." << endl;
763 }
else if (
NStr::Equal(args[
"a"].AsString(),
"f")) {
769 string dir_name = (args[
"p"]) ? args[
"p"].AsString() :
"";
770 string file_suffix = (args[
"f"]) ? args[
"f"].AsString() :
"";
771 string file_mask = (args[
"x"]) ? args[
"x"].AsString() :
".sqn";
772 file_mask =
"*" + file_mask;
773 bool dir_recurse = args[
"u"];
784 *
m_LogStream <<
"List type (-a l or -a f) is not appropriate for push mode." << endl;
786 }
else if (!args[
"p"] || !args[
"i"]) {
788 *
m_LogStream <<
"Both directory containing contigs (-p) and master file (-i) are required for push mode." << endl;
794 }
else if ( args[
"p"] ) {
860 }
catch (std::exception e) {
868 in.ReadClassMember(member);
910 if (
table->GetNum_rows() == 0) {
915 for (
const auto &it :
table->GetColumns()) {
920 for (
const auto &it :
table->GetColumns()) {
921 if (row < it->GetData().GetString().size()) {
942 biosample_util::CBiosampleFieldDiff::PrintHeader(*
m_ReportStream,
false);
946 for (
const auto &it : diffs) {
968 vector< CRef<biosample_util::CBiosampleFieldDiff> >
add_item;
969 vector< CRef<biosample_util::CBiosampleFieldDiff> > change_item;
970 vector< CRef<biosample_util::CBiosampleFieldDiff> > delete_item;
971 vector< CRef<biosample_util::CBiosampleFieldDiff> > change_organism;
975 for (
const auto &it : diffs) {
976 string id = it->GetBioSample();
977 string smp = it->GetSampleVal();
978 string src = it->GetSrcVal();
979 string fld = it->GetFieldName();
982 if (blank_smp && blank_src) {
989 if (fld ==
"Organism Name") {
990 change_organism.push_back(it);
991 }
else if (blank_smp) {
993 }
else if (blank_src) {
995 delete_item.push_back(it);
998 change_item.push_back(it);
1007 options_obj.
insert(
"attribute_synonyms",
"true");
1009 for (
auto&
id : ids) {
1011 obj1.
insert(
"samples",
id);
1018 obj2.
insert(
"name", itm->GetFieldName());
1019 obj2.
insert(
"new_value", itm->GetSrcVal());
1023 if (! delete_item.empty()) {
1026 for (
auto& itm : delete_item) {
1028 obj2.
insert(
"name", itm->GetFieldName());
1029 obj2.
insert(
"old_value", itm->GetSampleVal());
1033 if (! change_item.empty() || ! change_organism.empty()) {
1035 if (! change_organism.empty()) {
1037 for (
auto& itm : change_organism) {
1038 chg_org.
insert(
"new_value", itm->GetSrcVal());
1041 if (! change_item.empty()) {
1043 for (
auto& itm : change_item) {
1044 string fld = itm->GetFieldName();
1045 if (fld ==
"Tax ID") {
1049 obj2.
insert(
"name", fld);
1050 obj2.
insert(
"old_value", itm->GetSampleVal());
1051 obj2.
insert(
"new_value", itm->GetSrcVal());
1057 if ( ids.
size() > 1 ) {
1058 *
m_LogStream <<
"ERROR: More than one BioSample ID is not supported by -m 7." << endl;
1067 string sUrl =
"https://api-int.ncbi.nlm.nih.gov/biosample/update/";
1069 sUrl =
"https://dev-api-int.ncbi.nlm.nih.gov/biosample/update/";
1071 string sContentType =
"application/json; charset=utf-8";
1090 vector<string> unprocessed_ids;
1100 if (! new_diffs.empty()) {
1101 m_Diffs.insert(
m_Diffs.end(), new_diffs.begin(), new_diffs.end());
1102 for (
const auto &
id : unprocessed_ids) {
1103 *
m_LogStream <<
"Failed to retrieve BioSample data for " <<
id << endl;
1113 if (it->IsSource()) {
1127 *
m_LogStream <<
label <<
" has conflicting BioSample Accession " << biosample_ids[0] << endl;
1131 if (biosample_ids.empty()) {
1136 for (
const auto &
id : biosample_ids) {
1140 copy(descr->
Set().begin(), descr->
Set().end(),
1182 *
m_LogStream <<
"Conflicts found for " << sequence_id << endl;
1305 for (; src_desc_ci;) {
1308 const CSeqdesc& cur_descr = *src_desc_ci;
1335 for (++src_desc_ci; src_desc_ci;) {
1338 const CSeqdesc& cur_descr = *src_desc_ci;
1365 string fname = args[
"i"].AsString();
1373 unique_ptr<CNcbiIstream> hold_stream(
new CNcbiIfstream (fname.c_str(), ios::binary));
1379 switch (formatGuess)
1389 hold_stream.release();
1390 hold_stream.reset(decompress);
1391 InputStream = hold_stream.get();
1395 unique_ptr<CObjectIStream> objectStream;
1396 switch (formatGuess)
1403 hold_stream.release();
1408 return objectStream;
1419 if ( useBinaryOutputFormat ) {
1431 int main(
int argc,
const char* argv[])
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
static bool s_IsEmptyBioSource(const CSeqdesc &src)
const char * BIOSAMPLE_CHK_APP_VER
int main(int argc, const char *argv[])
string OwnerFromAffil(const CAffil &affil)
vector< CRef< CBiosampleFieldDiff > > TBiosampleFieldDiffList
bool ResolveSuppliedBioSampleAccession(const string &biosample_accession, vector< string > &biosample_ids)
bool DoDiffsContainConflicts(const TBiosampleFieldDiffList &diffs, CNcbiOstream *log)
string GetBestBioseqLabel(CBioseq_Handle bsh)
EStatus GetBiosampleStatus(const string &accession, bool use_dev_server=false, TStatuses *cache=NULL)
map< string, CRef< CSeq_descr > > TBioSamples
map< string, EStatus > TStatuses
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)
CRef< CSeq_descr > GetBiosampleData(const string &accession, bool use_dev_server=false, TBioSamples *cache=NULL)
string GetBiosampleStatusName(EStatus status)
TBiosampleFieldDiffList GetBioseqDiffs(CBioseq_Handle bh, const string &biosample_accession, size_t &num_processed, vector< string > &unprocessed_ids, bool use_dev_server=false, bool compare_structured_comments=false, const string &expected_prefix="", TBioSamples *cache=NULL)
pair< string, biosample_util::EStatus > TStatus
vector< string > GetBiosampleIDs(CBioseq_Handle bh)
void AddBioseqToTable(CBioseq_Handle bh, CSeq_table &table, bool with_id, bool include_comments=false, const string &expected_prefix="")
bool IsSetOrgname(void) const
bool IsSetDivision(void) const
void UpdateWithBioSample(const CBioSource &biosample, bool force, bool is_local_copy=false)
bool IsSetTaxname(void) const
void Setup(const CArgs &args)
string m_StructuredCommentPrefix
void ProcessBioseqHandle(CBioseq_Handle bh)
string m_BioSampleWebAPIKey
string m_BioProjectAccession
biosample_util::TBioSamples m_cache
void ProcessSeqSubmit(void)
void SaveFile(const string &fname, bool useBinaryOutputFormat)
void UpdateBioSource(CBioseq_Handle bh, const CBioSource &src)
vector< CRef< CSeqdesc > > GetBiosampleDescriptorsFromSeqEntry()
biosample_util::TBiosampleFieldDiffList m_Diffs
CRef< CSeq_entry > ReadSeqEntry(void)
void ProcessReleaseFile(const CArgs &args)
string m_BioSampleAccession
void PushToRecord(CBioseq_Handle bh)
CRef< CObjectManager > m_ObjMgr
void ProcessAsnInput(void)
CRef< CBioseq_set > ReadBioseqSet(void)
unique_ptr< CObjectIStream > OpenFile(const CArgs &args)
void CreateBiosampleUpdateWebService(biosample_util::TBiosampleFieldDiffList &diffs, bool del_okay)
vector< CRef< CSeqdesc > > m_Descriptors
void ReadClassMember(CObjectIStream &in, const CObjectInfo::CMemberIterator &member)
This method will be called at approriate time when the object of requested type is to be read.
CNcbiOstream * m_LogStream
void ProcessSeqEntry(void)
virtual void Init(void)
Initialize the application.
void ProcessList(const string &fname)
bool m_CompareStructuredComments
void PrintDiffs(biosample_util::TBiosampleFieldDiffList &diffs)
CNcbiOstream * m_ReportStream
int ProcessOneDirectory(const string &dir_name, const string &file_suffix, const string &file_mask, bool recurse)
void PrintResults(biosample_util::TBiosampleFieldDiffList &diffs)
void GetBioseqDiffs(CBioseq_Handle bh)
void ProcessFileList(const string &fname)
virtual int Run(void)
Run the application.
void ProcessOneFile(string fname)
vector< CRef< CSeqdesc > > GetBiosampleDescriptorsFromSeqSubmit()
vector< CRef< CSeqdesc > > GetBiosampleDescriptors(string fname)
CRef< CScope > BuildScope(void)
@ e_take_from_biosample_force
void ProcessBioseqForUpdate(CBioseq_Handle bh)
unique_ptr< CObjectIStream > m_In
CBiosampleHandler * m_Handler
CRef< CSeq_table > m_Table
void PrintTable(CRef< CSeq_table > table)
virtual void AddSummary()
virtual ~CBiosampleHandler()
virtual bool NeedsReportStream()
virtual void ProcessBioseq(CBioseq_Handle bh)
CNcbiOstream * m_ReportStream
void SetReportStream(CNcbiOstream *stream)
virtual bool NeedsReportStream()
virtual void AddSummary()
virtual ~CBiosampleStatusReport()
biosample_util::TStatuses m_Status
virtual void ProcessBioseq(CBioseq_Handle bh)
CBioseq_set_EditHandle –.
static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, CReader *reader=0, CObjectManager::EIsDefault is_default=CObjectManager::eDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
Reading (iterating through) elements of containers (SET OF, SEQUENCE OF).
CJson_Object push_back_object(void)
Add object type element to the end of the array.
std::string ToString(TJson_Write_Flags flags=fJson_Write_IndentWithSpace, unsigned int indent_char_count=4) const
Convert the contents of the node into string.
CJson_Object SetObject(void)
Get JSON object contents of the node.
CJson_Array insert_array(const CJson_Node::TKeyType &name)
Insert array type element into the object.
void insert(const CJson_Node::TKeyType &name)
Insert null element into the object.
CJson_Object insert_object(const CJson_Node::TKeyType &name)
Insert object type element into the object.
Read hook for data member of a containing object (eg, SEQUENCE)
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, const SLoaderParams ¶ms, CObjectManager::EIsDefault is_default=CObjectManager::eNonDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
iterator_bool insert(const value_type &val)
Include a standard set of the NCBI C++ Toolkit most basic headers.
std::ofstream out("events_result.xml")
main entry point for tests
const CNcbiRegistry & GetConfig(void) const
Get the application's cached configuration parameters (read-only).
virtual const CArgs & GetArgs(void) const
Get parsed command line arguments.
int AppMain(int argc, const char *const *argv, const char *const *envp=0, EAppDiagStream diag=eDS_Default, const char *conf=NcbiEmptyCStr, const string &name=NcbiEmptyString)
Main function (entry point) for the NCBI application.
virtual void SetupArgDescriptions(CArgDescriptions *arg_desc)
Setup the command line argument descriptions.
const CNcbiArguments & GetArguments(void) const
Get the application's cached unprocessed command-line arguments.
@ eTakeOwnership
An object can take ownership of another.
@ eInputFile
Name of file (must exist and be readable)
@ eString
An arbitrary string.
@ eOutputFile
Name of file (must be writable)
@ eInteger
Convertible into an integer number (int or Int8)
EMethod
Compression/decompression methods.
@ eNone
no compression method (copy "as is")
@ eGZipFile
.gz file (including concatenated files)
@ fDefault
Use algorithm-specific defaults.
@ eDS_Default
Try standard log file (app.name + ".log") in /log/, use stderr on failure.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
const string & GetMsg(void) const
Get message string.
TEntries GetEntries(const string &mask=kEmptyStr, TGetEntriesFlags flags=0) const
Get directory entries based on the specified "mask".
static string MakePath(const string &dir=kEmptyStr, const string &base=kEmptyStr, const string &ext=kEmptyStr)
Assemble a path from basic components.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
#define MSerial_AsnBinary
#define MSerial_AsnText
I/O stream manipulators –.
ESerialDataFormat
Data file format.
@ eSerial_AsnText
ASN.1 text.
@ eSerial_AsnBinary
ASN.1 binary.
CNcbiIstream & ContentStream(void) const
Get input stream.
int GetStatusCode(void) const
Get response status code.
void SetValue(CHeaderNameConverter name, CTempString value)
Remove all existing values with the name, set the new value.
CNcbiIstream & ErrorStream(void) const
Get input stream containing error message (e.g.
CHttpResponse g_HttpPost(const CUrl &url, CTempString data, const CHttpParam ¶m=CHttpParam())
Shortcut for POST request.
static CRef< ILineReader > New(const string &filename)
Return a new ILineReader object corresponding to the given filename, taking "-" (but not "....
virtual bool AtEOF(void) const =0
Indicates (negatively) whether there is any more input.
pair< TObjectPtr, TTypeInfo > ObjectInfo(C &obj)
CMemberIterator FindMember(const string &memberName) const
Find class member by its name.
static CObjectIStream * Open(ESerialDataFormat format, CNcbiIstream &inStream, bool deleteInStream)
Create serial object reader and attach it to an input stream.
void SetLocalReadHook(CObjectIStream &stream, CReadClassMemberHook *hook) const
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
CSeq_entry_Handle AddTopLevelSeqEntry(CSeq_entry &top_entry, TPriority pri=kPriority_Default, EExist action=eExist_Default)
Add seq_entry, default priority is higher than for defaults or loaders Add object to the score with p...
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
void AddDefaults(TPriority pri=kPriority_Default)
Add default data loaders from object manager.
void RemoveTopLevelSeqEntry(const CTSE_Handle &entry)
Revoke TSE previously added using AddTopLevelSeqEntry() or AddBioseq().
CBioseq_set_EditHandle GetEditHandle(void) const
Get 'edit' version of handle.
TClass GetClass(void) const
CBioseq_set_Handle GetParentBioseq_set(void) const
Return a handle for the parent Bioseq-set, or null handle.
bool AddSeqdesc(CSeqdesc &d) const
CBioseq_EditHandle GetEditHandle(void) const
Get 'edit' version of handle.
bool IsSetClass(void) const
bool AddSeqdesc(CSeqdesc &d) const
CRef< CSeqdesc > RemoveSeqdesc(const CSeqdesc &d) const
void Reset(void)
Reset reference object.
IO_PREFIX::ofstream CNcbiOfstream
Portable alias for ofstream.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
bool NcbiStreamCopy(CNcbiOstream &os, CNcbiIstream &is)
Copy the entire contents of stream "is" to stream "os".
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
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 StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
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.
@ eReverseSearch
Search in a backward direction.
@ eCase
Case sensitive compare.
void Run(void)
Enter the main loop.
double Elapsed(void) const
Return time elapsed since first Start() or last Restart() call (in seconds).
@ eStart
Start timer immediately after creating.
LOG LOG_cxx2c(void)
Create LOG on top of C++ Toolkit CNcbiDiag.
void CORE_SetREG(REG rg)
Set the registry (no registry if "rg" is passed zero) – to be used by the core internals.
REG REG_cxx2c(IRWRegistry *reg, bool pass_ownership=false)
Convert a C++ Toolkit registry object to a REG registry.
void CORE_SetLOG(LOG lg)
Set the log handle (no logging if "lg" is passed zero) – to be used by the core internals (CORE LOG).
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.
const TAffil & GetAffil(void) const
Get the Affil member data.
const TAuthors & GetAuthors(void) const
Get the Authors member data.
bool IsSetAffil(void) const
Check if a value has been assigned to Affil data member.
bool IsSetAuthors(void) const
not necessarily authors of the paper Check if a value has been assigned to Authors data member.
bool IsSetOrg(void) const
Check if a value has been assigned to Org data member.
bool IsSetSubtype(void) const
Check if a value has been assigned to Subtype data member.
bool IsSetOrigin(void) const
Check if a value has been assigned to Origin data member.
bool IsSetGenome(void) const
Check if a value has been assigned to Genome data member.
void SetNum_rows(TNum_rows value)
Assign a value to Num_rows data member.
TNum_rows GetNum_rows(void) const
Get the Num_rows member data.
virtual void Reset(void)
Reset the whole object.
bool IsSetSeq_set(void) const
Check if a value has been assigned to Seq_set data member.
const TSeq_set & GetSeq_set(void) const
Get the Seq_set member data.
@ eClass_nuc_prot
nuc acid and coded proteins
const TSource & GetSource(void) const
Get the variant data.
TSource & SetSource(void)
Select the variant.
Tdata & Set(void)
Assign a value to data member.
@ e_Source
source of materials, includes Org-ref
@ eMol_na
just a nucleic acid
const TContact & GetContact(void) const
Get the Contact member data.
const TCit & GetCit(void) const
Get the Cit member data.
const TEntrys & GetEntrys(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
const TSub & GetSub(void) const
Get the Sub member data.
bool IsSetSub(void) const
Check if a value has been assigned to Sub data member.
bool IsEntrys(void) const
Check if variant Entrys is selected.
const TContact & GetContact(void) const
Get the Contact member data.
bool IsSetCit(void) const
citation for this submission Check if a value has been assigned to Cit data member.
bool IsSetContact(void) const
who to contact Check if a value has been assigned to Contact data member.
bool IsSetContact(void) const
WARNING: this will replace the above Check if a value has been assigned to Contact data member.
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n table
Lightweight interface for getting lines of data with minimal memory copying.
constexpr auto add_item(T item, list< Ts... > l) noexcept
Magic spell ;-) needed for some weird compilers... very empiric.
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
Defines command line argument related classes.
Defines unified interface to application:
NCBI C++ stream class wrappers for triggering between "new" and "old" C++ stream libraries.
Useful/utility classes and methods.
std::istream & in(std::istream &in_, double &x_)
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
void PrintResults(CNcbiOstream &ostream, const vector< string > &idmap, CDbIndex::TSeqNum qnum, const vector< CSRSearch::SResultData > &results, const string &idstr1, const string &idstr2="")
C++ I/O stream wrappers to compress/decompress data on-the-fly.
#define row(bind, expected)
CRef< CScope > BuildScope(void)