(
void);
81 virtual int Run(
void);
83 virtual void Exit(
void);
116 case e_Brief:
return "Brief";
129 for(
int i= 0;
i<=
e_Max;
i++) {
150arg_desc->SetUsageContext(
GetArguments().GetProgramBasename(),
151 "BLAST database integrity and validity " 152 "checking application");
154arg_desc->SetCurrentGroup(
"Input Options");
156arg_desc->AddOptionalKey
158 "Specify a database name.",
161arg_desc->AddDefaultKey(
"dbtype",
"molecule_type",
162 "Molecule type of database",
167 "nucl",
"prot",
"guess"));
169arg_desc->AddOptionalKey
170(
"dir",
"DirName",
171 "Specify a directory containing one or more databases.",
177 "Specify true to recurse through all dbs in directory tree.");
181arg_desc->SetCurrentGroup(
"Output Options");
184arg_desc->AddOptionalKey
185(
"logfile",
"LogFile",
186 "If specified, output will be redirected to this file.",
189arg_desc->AddDefaultKey
190(
"verbosity",
"DefaultKey",
194arg_desc->SetConstraint(
"verbosity",
new 196(
int)
e_Max,
true));
211arg_desc->SetCurrentGroup(
"Test Methods");
215 "If true, test every sequence (warning: may be slow).");
220arg_desc->AddOptionalKey
221(
"stride",
"StrideLength",
222 "Check integrity of every Nth sequence.",
225arg_desc->AddOptionalKey
226(
"random",
"NumSequences",
227 "Check this many randomly selected sequences.",
230arg_desc->AddOptionalKey
231(
"ends",
"NumSequences",
232 "Check this many sequences at each end of the database.",
237 "Disable ISAM testing.");
241 "Enable check for existence of temporary files.");
244(
"must_have_taxids",
245 "Require that all sequences in the database have taxid set.");
248(
"cdd_delta",
"Do aditional tests for a CDD database for DELTA-BLAST");
373tot_faults +=
test.DoTest(db, seen);
398 intnum_failures = 0;
411 intnv = vols.size();
417 Log(db,
e_Brief) <<
"[ERROR] db has empty date string"<< endl;
421 Log(db,
e_Brief) <<
"[ERROR] db has no volumes"<< endl;
425 ITERATE(vector<string>, vol, vols) {
438legacy_name.
Add(
"*tm");
439 if(legacy_name.
Match((*entry)->GetExt())) {
440 Log(db,
e_Brief) <<
"[ERROR] legacy file "<< (*entry)->GetPath() <<
447 if((*entry)->IsFile() && (
CFile((*entry)->GetPath()).
GetLength() <= 0)) {
448 Log(db,
e_Brief) <<
"[ERROR] file "<< (*entry)->GetPath() <<
449 " has zero length."<< endl;
455 if((nseq > noid) || ((! tl) != (! noid)) || ((! vl) && tl)) {
456 Log(db,
e_Brief) <<
"[ERROR] sequence count/length mismatch"<< endl;
460 if(hs !=
"Homo sapiens") {
461 Log(db,
e_Brief) <<
"[ERROR] tax info looks wrong ("<< hs <<
")"<< endl;
464}
catch(exception &e) {
466 Log(db,
e_Brief) <<
" [ERROR] caught exception."<< endl;
481 if(seen.
find(oid) != seen.
end()) {
493list< CRef<CSeq_id> > seqids = db.
GetSeqIDs(oid);
501 const char* p =
NULL;
503 if((length == 0) || (p ==
NULL)) {
504 throwruntime_error(
"sequence data is empty");
514 throwruntime_error(
"no bioseq");
520 using namespacealign_format;
525 throwruntime_error(
"no taxid set");
532where =
"isam lookups";
538 if((! db.
SeqidToOid(**iter, oid2)) || (oid != oid2)) {
540 msg<<
"seqid="<< (**iter).AsFastaString();
542}
else if(oid != oid2) {
543 msg<<
"oid1="<< oid
545<<
" seqid="<< (**iter).AsFastaString();
553details <<
"Failed during "<< where
555<<
": "<< e.
what() << endl;
559 catch(exception & e) {
561<<
" failed; oid="<< oid
562<<
": "<< e.
what() << endl;
567minutiae <<
"Status for OID "<< oid <<
": " 568<< (rv ?
"PASS":
"FAIL") << endl;
594 Log(db,
e_Minutiae) <<
"<testing every "<< m_N <<
"th OID>"<< endl;
597 if(!
TestOID(db, seen, oid)) {
625 Log(db,
e_Brief) <<
" [ERROR] empty volume"<< endl;
631 for(
int i= 0;
i< m_N;) {
632 intoid = m_Rng.GetRand(0,
max-1);
641<<
" randomly selected OIDs ("<< oids.
size()
642<<
" unique)>"<< endl;
645 if(!
TestOID(db, seen, *iter)) {
668 Log(db,
e_Minutiae) <<
"<testing "<< m_N <<
" OIDs at each end>"<< endl;
703 intnum_failures = 0;
706 const stringdir(
f.GetDir());
707 const stringbase(
f.GetBase());
708 const stringext(
f.GetExt());
711 Log(name,
e_Brief) <<
" [ERROR] alias file does not exist"<< endl;
712 return++num_failures;
715 if(
f.GetLength() <= 0) {
716 Log(name,
e_Brief) <<
" [ERROR] alias file has zero length"<< endl;
717 return++num_failures;
721 intoidlist, gilist, nseq, mem_bit, first_oid, last_oid, maxoid, maxlen;
722oidlist=gilist=nseq=mem_bit=first_oid=last_oid=maxoid=maxlen=-1;
732vector <string> tokens;
735 if(tokens.size() <= 1) {
736 Log(name,
e_Brief) <<
" [ERROR] no value(s) found for keyword " 737<< tokens[0] << endl;
742 if(tokens[0] ==
"DBLIST") {
744}
else if(tokens[0] ==
"TITLE") {
746}
else if(tokens[0] ==
"MASKLIST") {
748}
else if(tokens[0] ==
"TAXIDLIST") {
749num_failures += x_CheckFile(name, dir, tokens);
750}
else if(tokens[0] ==
"OIDLIST") {
752num_failures += x_CheckFile(name, dir, tokens);
753}
else if(tokens[0] ==
"GILIST") {
755num_failures += x_CheckFile(name, dir, tokens);
756}
else if(tokens[0] ==
"NSEQ") {
757num_failures += x_CheckNumber(name, tokens, nseq);
758}
else if(tokens[0] ==
"LENGTH") {
759num_failures += x_CheckNumber8(name, tokens, length);
760}
else if(tokens[0] ==
"MEMB_BIT") {
761num_failures += x_CheckNumber(name, tokens, mem_bit);
762}
else if(tokens[0] ==
"FIRST_OID") {
763num_failures += x_CheckNumber(name, tokens, first_oid);
764}
else if(tokens[0] ==
"LAST_OID") {
765num_failures += x_CheckNumber(name, tokens, last_oid);
766}
else if(tokens[0] ==
"MAXOID") {
767num_failures += x_CheckNumber(name, tokens, maxoid);
768}
else if(tokens[0] ==
"MAXLEN") {
769num_failures += x_CheckNumber(name, tokens, maxlen);
770}
else if(tokens[0] ==
"STATS_TOTLEN") {
772}
else if(tokens[0] ==
"STATS_NSEQ") {
775 Log(name,
e_Brief) <<
" [ERROR] unknown keyword encountered: " 776<< tokens[0] << endl;
780}
while(!line.
AtEOF());
783 if((first_oid+1)*(last_oid+1)==0) {
784 if(first_oid+last_oid != -2) {
785 Log(name,
e_Brief) <<
" [ERROR] FIRST_OID not paired with LAST_OID"<< endl;
788}
else if((nseq+1)*(nseq + first_oid -last_oid -1)!=0) {
789 Log(name,
e_Brief) <<
" [ERROR] (FIRST_OID, LAST_OID) is not consistent" 790<<
" with NSEQ"<< endl;
795 if(oidlist + gilist >=0) {
796 Log(name,
e_Brief) <<
" [ERROR] OIDLIST and GILIST cannot be present in the" 797<<
" same alias file"<< endl;
801 if(oidlist!=-1 && (maxoid+1)*(length+1)*(nseq+1)==0) {
802 Log(name,
e_Brief) <<
" [ERROR] OIDLIST cannot be provided without MAXOID" 803<<
" , LENGTH, or NSEQ"<< endl;
813}
catch(exception &e) {
815 Log(name,
e_Brief) <<
" [ERROR] caught exception in initializing blastdb"<< endl;
822ostream &
Log(
const string& name,
intlvl)
832 int x_CheckFile(
const string&name,
const string&dir,
constvector<string> &tokens)
834 intnum_failures = 0;
836 for(
size_t i=1;
i< tokens.size(); ++
i) {
840 if(tokens[0] ==
"OIDLIST"&&
f.GetExt() !=
".msk") {
841 Log(name,
e_Details) <<
" [WARNING] oidlist file "<< tokens[
i]
842<<
" does not have .msk extension"<< endl;
845 if(tokens[0] ==
"GILIST"&&
f.GetExt() !=
".gil") {
846 Log(name,
e_Details) <<
" [WARNING] gilist file "<< tokens[
i]
847<<
" does not have .gil extension"<< endl;
852 Log(name,
e_Brief) <<
" [ERROR] file "<< tokens[
i]
853<<
" referenced in keyword "<< tokens[0]
854<<
" does not exist"<< endl;
859 if(
f.GetLength() <=0) {
860 Log(name,
e_Brief) <<
" [ERROR] file "<< tokens[
i]
861<<
" referenced in keyword "<< tokens[0]
862<<
" has zero length"<< endl;
877<<
" [ERROR] could not convert value to number for " 878<< tokens[0] << endl;
891<<
" [ERROR] could not convert value to number for " 892<< tokens[0] << endl;
903m_DbType (dbtype) { }
924 intx_GetVolumeList(
constvector <string> &dbs,
936 ITERATE(vector<string>, iter, dbs) {
937vector <string> paths;
938vector <string> alias;
943<<
" [ERROR] could not find all volume or alias " 944<<
"files referenced in "<< *iter <<
", [skipped]"<< endl;
948vlist.
insert(paths.begin(), paths.end());
949alist.
insert(alias.begin(), alias.end());
967tot_faults += x_GetVolumeList(dbs, seqtype, vol_list, ali_list);
970 inttotal = vol_list.
size(), passed = 0;
972<<
"Testing "<< total <<
" volume(s)."<< endl;
975m_Out.Log(
e_Details) <<
" "<< *iter << endl;
980num_faults = action.
DoTests(*db, seen);
981}
catch(exception &e) {
983m_Out.Log(
e_Brief) <<
" [ERROR] caught exception in "<< *iter << endl;
984m_Out.Log(
e_Details) << e.what() << endl;
987 if(num_faults) tot_faults += num_faults;
991 if(total == passed) {
993<<
" Result=SUCCESS. No errors reported for " 994<< total <<
" volume(s)."<< endl;
997<<
" Result=FAILURE. " 998<< (total-passed) <<
" errors reported in " 999<< total <<
" volume(s)."<< endl;
1003total = ali_list.
size(), passed = 0;
1005<<
"Testing "<< total <<
" alias(es)."<< endl;
1009m_Out.Log(
e_Details) <<
" "<< *iter << endl;
1010 intnum_faults = ali_test.
DoTest(*iter, seen);
1011 if(num_faults) tot_faults += num_faults;
1015 if(total == passed) {
1017<<
" Result=SUCCESS. No errors reported for " 1018<< total <<
" alias(es)."<< endl;
1021<<
" Result=FAILURE. " 1022<< (total-passed) <<
" errors reported in " 1023<< total <<
" alias(es)."<< endl;
1029<<
"Total errors: "<< tot_faults << endl;
1032 return(tot_faults == 0);
1044m_Recurse (recurse) { }
1060 ITERATE(vector<SSeqDBInitInfo>, iter, m_DBs) {
1061 if(iter->m_MoleculeType != stype)
continue;
1062vector <string> paths;
1063vector <string> alias;
1068<<
" [ERROR] could not find all volume or alias " 1069<<
"files referenced in "<< iter->m_BlastDbName <<
", [skipped]"<< endl;
1073vlist.
insert(paths.begin(), paths.end());
1074alist.
insert(alias.begin(), alias.end());
1086<<
"Finding database volumes."<< endl;
1088m_DBs =
FindBlastDBs(m_Dir, m_DbType, m_Recurse,
true);
1098 inttotal = prot_list.
size() + nucl_list.
size(), passed = 0;
1100<<
"Testing "<< total <<
" volume(s)."<< endl;
1103m_Out.Log(
e_Details) <<
" "<< *iter << endl;
1108num_faults = action.
DoTests(*db, seen);
1109}
catch(exception &e) {
1111m_Out.Log(
e_Brief) <<
" [ERROR] caught exception in "<< *iter << endl;
1112m_Out.Log(
e_Details) << e.what() << endl;
1115 if(num_faults) tot_faults += num_faults;
1120m_Out.Log(
e_Details) <<
" "<< *iter << endl;
1125num_faults = action.
DoTests(*db, seen);
1126}
catch(exception &e) {
1128m_Out.Log(
e_Brief) <<
" [ERROR] caught exception in "<< *iter << endl;
1129m_Out.Log(
e_Details) << e.what() << endl;
1132 if(num_faults) tot_faults += num_faults;
1136 if(total == passed) {
1138<<
" Result=SUCCESS. No errors reported for " 1139<< total <<
" volumes."<< endl;
1142<<
" Result=FAILURE. " 1143<< (total-passed) <<
" errors reported in " 1144<< total <<
" volumes."<< endl;
1148total = ali_list.
size(), passed = 0;
1150<<
"Testing "<< total <<
" alias(es)."<< endl;
1154m_Out.Log(
e_Details) <<
" "<< *iter << endl;
1155 intnum_faults = ali_test.
DoTest(*iter, seen);
1156 if(num_faults) tot_faults += num_faults;
1160 if(total == passed) {
1162<<
" Result=SUCCESS. No errors reported for " 1163<< total <<
" alias(es)."<< endl;
1166<<
" Result=FAILURE. " 1167<< (total-passed) <<
" errors reported in " 1168<< total <<
" alias(es)."<< endl;
1174<<
"Total errors: "<< tot_faults << endl;
1177 return(tot_faults == 0);
1191 boolx_GetHeader(
CSeqDB& db);
1192 boolx_TestFreqRatios(
CSeqDB& db);
1203 if(x_GetHeader(db)) {
1204x_TestFreqRatios(db);
1207 returnm_NumFailures;
1220m_Offsets.reserve(m_NumProfiles);
1221 for(
int i=0;
i< m_NumProfiles;
i++) {
1225 catch(exception& e) {
1226 Log(db,
e_Brief) <<
" [ERROR] caught exception while reading rps header " 1232 return(m_NumFailures == 0);
1243 Log(db,
e_Brief) <<
" [ERROR] Bad magic number of the " 1244 " .freq file"<< endl;
1249 Log(db,
e_Brief) <<
" [ERROR] Wrong number of profiles in the " 1254 for(
int i=0;
i< m_NumProfiles;
i++) {
1256 Log(db,
e_Brief) <<
" [ERROR] Header offsets differ between .rps " 1257 "and .freq files"<< endl;
1262 catch(exception& e) {
1263 Log(db,
e_Brief) <<
" [ERROR] caught exception while reading " 1264 ".freq freqs header "<< endl;
1269 return(m_NumFailures == 0);
1282 boolx_TestWeightedCounts(
CSeqDB& db);
1283 boolx_TestObservations(
CSeqDB& db);
1289 if(x_GetHeader(db)) {
1290x_TestFreqRatios(db);
1291x_TestWeightedCounts(db);
1292x_TestObservations(db);
1295 returnm_NumFailures;
1307 Log(db,
e_Brief) <<
" [ERROR] Bad magic number of the " 1308 " .wcounts file"<< endl;
1313 Log(db,
e_Brief) <<
" [ERROR] Wrong number of profiles in the " 1318 for(
int i=0;
i< m_NumProfiles;
i++) {
1320 Log(db,
e_Brief) <<
" [ERROR] Header offsets differ between .rps " 1321 "and .wcounts files"<< endl;
1326 catch(exception& e) {
1327 Log(db,
e_Brief) <<
" [ERROR] caught exception while reading " 1328 ".wcounts freqs header "<< endl;
1333 return(m_NumFailures == 0);
1344 Log(db,
e_Brief) <<
" [ERROR] Bad magic number of the " 1345 " .obsr file"<< endl;
1350 Log(db,
e_Brief) <<
" [ERROR] Wrong number of profiles in the " 1360 catch(exception& e) {
1361 Log(db,
e_Brief) <<
" [ERROR] caught exception while reading " 1362 ".obsr freqs header "<< endl;
1367 return(m_NumFailures == 0);
1388ostream*
lg= args[
"logfile"] ? &args[
"logfile"].AsOutputFile() : &cout;
1391 const int verbosity= args[
"verbosity"].AsInteger();
1397 if(args[
"logfile"]) {
1399<<
"file ("<< args[
"logfile"].AsString() <<
")";
1405<<
" at verbosity (" 1412 stringdb(args[
"db"] ? args[
"db"].AsString() :
"");
1413 stringdir(args[
"dir"] ? args[
"dir"].AsString() :
"");
1414 stringdbtype(args[
"dbtype"].AsString());
1415 boolrecurse = !! args[
"recursive"];
1418 if((db ==
"") == (dir ==
"")) {
1420<<
"error: Must specify exactly one of -dir or -db."<< endl;
1423}
else if(db !=
"") {
1435<<
"ISAM testing is "<< (args[
"no_isam"] ?
"DIS":
"EN") <<
"ABLED."<< endl;
1439<<
"Legacy testing is "<< (args[
"legacy"] ?
"EN":
"DIS") <<
"ABLED."<< endl;
1443<<
"TaxID testing is "<< (args[
"must_have_taxids"] ?
"EN":
"DIS") <<
"ABLED."<< endl;
1453 booldefault_set =
false;
1455 if(args[
"full"]) {
1457<<
"Using `full' mode: every OID will be tested."<< endl;
1459default_set =
true;
1462 if(args[
"stride"]) {
1463 intstride = args[
"stride"].HasValue() ? args[
"stride"].AsInteger() : 10000;
1465<<
"Testing every "<< stride <<
"-th OID."<< endl;
1467default_set =
true;
1470 if(args[
"random"]) {
1471 intrandom_sample = args[
"random"].HasValue() ? args[
"random"].AsInteger(): 200;
1473<<
"Testing "<< random_sample <<
" randomly sampled OIDs."<< endl;
1475default_set =
true;
1478 if(args[
"ends"]) {
1479 intend_amt = args[
"ends"].HasValue() ? args[
"ends"].AsInteger() : 200;
1481<<
"Testing first "<< end_amt
1482<<
" and last "<< end_amt <<
" OIDs."<< endl;
1484default_set =
true;
1488 intrandom_sample = 200;
1490<<
"By default, testing "<< random_sample <<
" randomly sampled OIDs."<< endl;
1494 if(args[
"cdd_delta"]) {
1496<<
"Testing CDD files' headers for DELTA-BLAST"<< endl;
1511status = okay ? 0 : 1;
1523 if(args[
"random"].
HasValue()) {
1526 else if(args[
"full"].
HasValue()) {
1529 else if(args[
"stride"].
HasValue()) {
1532 else if(args[
"ends"].
HasValue()) {
1554 #ifndef SKIP_DOXYGEN_PROCESSING 1555 int main(
intargc,
const char* argv[])
Declares singleton objects to store the version and reference for the BLAST engine.
#define CATCH_ALL(exit_code)
Standard catch statement for all BLAST command line programs.
Interface for converting sources of sequence data into blast sequence input.
int main(int argc, const char *argv[])
static string s_VerbosityText()
static string s_VerbosityString(int v)
int DoTest(const string &name, TSeen &)
int x_CheckNumber(const string &name, const vector< string > &tokens, int &n)
CAliasTest(CBlastDbCheckLog &log, int flags)
int x_CheckFile(const string &name, const string &dir, const vector< string > &tokens)
int x_CheckNumber8(const string &name, const vector< string > &tokens, Int8 &n)
ostream & Log(const string &name, int lvl)
static TTaxId GetTaxidForSeqid(const objects::CSeq_id &id, objects::CScope &scope)
return the tax id for a seqid
Class to constrain the values of an argument to those in between the values specified in the construc...
const CSeq_id * GetFirstId() const
TTaxId GetTaxId() const
Determine the tax-id for this bioseq.
CBlastDbCheckApplication: the main application class.
~CBlastDbCheckApplication()
CBlastUsageReport m_UsageReport
virtual void Init(void)
@inheritDoc
virtual int Run(void)
@inheritDoc
CBlastDbCheckApplication()
@inheritDoc
virtual void Exit(void)
@inheritDoc
CBlastDbCheckLog(ostream &outp, int max_level)
CNcbiOstrstream m_DevNull
CBlastDbCheckLog(const CBlastDbCheckLog &)
CBlastDbCheckLog & operator=(const CBlastDbCheckLog &)
Wrapper class to manage the BlastRPSInfo structure, as currently there aren't any allocation or deall...
void AddParam(EUsageParams p, int val)
Keeps track of the version of the BLAST engine in the NCBI C++ toolkit.
CDbTest(CBlastDbCheckLog &outp, string db, string dbtype)
virtual bool Test(CTestActionList &action)
int x_GetVolumeList(const vector< string > &dbs, CSeqDB::ESeqType stype, set< string > &vlist, set< string > &alist) const
vector< SSeqDBInitInfo > m_DBs
CDirTest(CBlastDbCheckLog &outp, string dir, string dbtype, int threads, bool recurse)
int x_GetVolumeList(CSeqDB::ESeqType stype, set< string > &vlist, set< string > &alist) const
virtual bool Test(CTestActionList &action)
CEndsTest(CBlastDbCheckLog &log, int n, int flags)
virtual int DoTest(CSeqDB &db, TSeen &seen)
int m_N
Test m_N elements from the start, m_N elements from the end.
CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
virtual int DoTest(CSeqDB &db, TSeen &seen)
CSampleTest(CBlastDbCheckLog &log, int n, int flags)
static void FindVolumePaths(const string &dbname, ESeqType seqtype, vector< string > &paths, vector< string > *alias_paths=NULL, bool recursive=true, bool expand_links=true)
Find volume paths.
Uint8 GetTotalLength() const
Returns the sum of the lengths of all available sequences.
int GetNumOIDs() const
Returns the size of the (possibly sparse) OID range.
Uint8 GetVolumeLength() const
Returns the sum of the lengths of all volumes.
const string & GetDBNameList() const
Get list of database names.
list< CRef< CSeq_id > > GetSeqIDs(int oid) const
Gets a list of sequence identifiers.
ESeqType
Sequence types (eUnknown tries protein, then nucleotide).
bool SeqidToOid(const CSeq_id &seqid, int &oid) const
Translate a Seq-id to any matching OID.
CRef< CBioseq > GetBioseq(int oid, TGi target_gi=ZERO_GI, const CSeq_id *target_seq_id=NULL) const
Get a CBioseq for a sequence.
void RetSequence(const char **buffer) const
Returns any resources associated with the sequence.
string GetTitle() const
Returns the database title.
int GetNumSeqs() const
Returns the number of sequences available.
int GetSequence(int oid, const char **buffer) const
Get a pointer to raw sequence data.
bool CheckOrFindOID(int &next_oid) const
Find an included OID, incrementing next_oid if necessary.
string GetDate() const
Returns the construction date of the database.
static void GetTaxInfo(TTaxId taxid, SSeqDBTaxInfo &info)
Get taxonomy information.
Simple implementation of ILineReader for i(o)streams.
virtual int DoTest(CSeqDB &db, TSeen &seen)
CStrideTest(CBlastDbCheckLog &log, int n, int flags)
int DoTests(CSeqDB &db, TSeen &seen)
vector< CRef< CTestAction > > m_List
void Add(CTestAction *action)
CTestAction(CBlastDbCheckLog &log, const string &nm, int flags)
ostream & Log(CSeqDB &db, int lvl)
virtual int DoTest(CSeqDB &db, TSeen &seen)=0
bool TestOID(CSeqDB &db, TSeen &seen, int oid)
ostream & LogMore(int lvl)
CTestData(CBlastDbCheckLog &outp, string dbtype)
virtual bool Test(CTestActionList &action)=0
iterator_bool insert(const value_type &val)
const_iterator find(const key_type &key) const
const_iterator end() const
void Print(const CCompactSAMApplication::AlignInfo &ai)
#define test(a, b, c, d, e)
static void Test(const char *bind1, SQLSMALLINT type1, const char *bind2, SQLSMALLINT type2)
static SQLCHAR output[256]
static DbTestEntry * tests
@ fFrequenciesFile
Open residue frequencies file.
@ fFreqRatiosFile
Open file with frequency ratios.
@ fObservationsFile
Open file with numbers of independent observations.
@ fRpsBlast
Flags set for RPS-BLAST.
void SetFullVersion(CRef< CVersionAPI > version)
Set version data for the program.
void HideStdArgs(THideStdArgs hide_mask)
Set the hide mask for the Hide Std Flags.
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.
CVersionInfo GetVersion(void) const
Get the program version information.
virtual void SetupArgDescriptions(CArgDescriptions *arg_desc)
Setup the command line argument descriptions.
#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.
const CNcbiArguments & GetArguments(void) const
Get the application's cached unprocessed command-line arguments.
@ fHideXmlHelp
Hide XML help description.
@ fHideLogfile
Hide log file description.
@ fHideFullVersion
Hide full version description.
@ fHideDryRun
Hide dryrun description.
@ fHideConffile
Hide configuration file description.
@ eExcludes
One argument excludes another.
@ eString
An arbitrary string.
@ eOutputFile
Name of file (must be writable)
@ eInteger
Convertible into an integer number (int or Int8)
void SetDiagPostPrefix(const char *prefix)
Specify a string to prefix all subsequent error postings with.
void SetDiagStream(CNcbiOstream *os, bool quick_flush=true, FDiagCleanup cleanup=0, void *cleanup_data=0, const string &stream_name="")
Set diagnostic stream.
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
TEntries GetEntries(const string &mask=kEmptyStr, TGetEntriesFlags flags=0) const
Get directory entries based on the specified "mask".
string GetDir(EIfEmptyPath mode=eIfEmptyPath_Current) const
Get the directory component for this directory entry.
Int8 GetLength(void) const
Get size of file.
static string MakePath(const string &dir=kEmptyStr, const string &base=kEmptyStr, const string &ext=kEmptyStr)
Assemble a path from basic components.
string GetName(void) const
Get the base entry name with extension (if any).
bool AtEOF(void) const
Indicates (negatively) whether there is any more input.
CBioseq_Handle AddBioseq(CBioseq &bioseq, TPriority pri=kPriority_Default, EExist action=eExist_Throw)
Add bioseq, return bioseq handle.
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
bool Empty(void) const THROWS_NONE
Check if CRef is empty â not pointing to any object, which means having a null value.
int32_t Int4
4-byte (32-bit) signed integer
int64_t Int8
8-byte (64-bit) signed integer
uint64_t Uint8
8-byte (64-bit) unsigned integer
Uint4 TValue
Type of the generated integer value and/or the seed value.
bool IsEnabled(void)
Indicates whether application usage statistics collection is enabled for a current reporter instance.
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
static Int8 StringToInt8(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to Int8.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
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 bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
@ fSplit_Tokenize
All delimiters are merged and trimmed, to get non-empty tokens only.
double Elapsed(void) const
Return time elapsed since first Start() or last Restart() call (in seconds).
time_t GetTimeT(void) const
Get time in time_t format.
void Start(void)
Start the timer.
@ eCurrent
Use current time. See also CCurrentTime.
bool Match(CTempString str, NStr::ECase use_case=NStr::eCase) const
Match a string.
void Add(const string &mask)
Add an inclusion mask.
char * dbname(DBPROCESS *dbproc)
Get name of current database.
Lightweight interface for getting lines of data with minimal memory copying.
const string version
version string
Classes to match a string against a set of masks.
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
#define GetArgs
Avoid preprocessor name clash with the NCBI C Toolkit.
Defines command line argument related classes.
Defines unified interface to application:
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...
Declares auxiliary classes to manage RPS-BLAST related C-structures.
Defines BLAST database access classes.
CSeqDB::ESeqType ParseMoleculeTypeString(const string &str)
Convert a string to a CSeqDB ESeqType object.
vector< SSeqDBInitInfo > FindBlastDBs(const string &path, const string &dbtype, bool recurse, bool include_alias_files=false, bool remove_redundant_dbs=false)
Find BLAST DBs in the directory specified.
static SLJIT_INLINE sljit_ins lg(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)
string scientific_name
Scientific name, such as "Aotus vociferans".
static wxAcceleratorEntry entries[3]
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