();
116vector<ESupportedInputFormats>
118vector<string>& blastdbs);
163 template<
classTObj>
169obj.
Reset(
newTObj);
191 template<
classTObj>
199 fg.GetFormatHints().DisableAllNonpreferred();
217arg_desc->SetUsageContext(
GetArguments().GetProgramBasename(),
218 "Application to create BLAST databases, version " 221 stringdflt(
"Default = input file name provided to -");
222dflt +=
kInput+
" argument";
224arg_desc->SetCurrentGroup(
"Input options");
225arg_desc->AddDefaultKey(
kInput,
"input_file",
226 "Input file/database name",
228arg_desc->AddDefaultKey(
"input_type",
"type",
229 "Type of the data specified in input_file",
232 "fasta",
"blastdb",
236arg_desc->AddKey(
kArgDbType,
"molecule_type",
241arg_desc->SetCurrentGroup(
"Configuration options");
242arg_desc->AddOptionalKey(
kArgDbTitle,
"database_title",
243 "Title for BLAST database\n"+ dflt,
246arg_desc->AddFlag(
"parse_seqids",
247 "Option to parse seqid for FASTA input if set, for all other input types seqids are parsed automatically",
true);
249arg_desc->AddFlag(
"hash_index",
250 "Create index of sequence hash values.",
253arg_desc->AddFlag(
"randomize",
256 #if ((!defined(NCBI_COMPILER_WORKSHOP) || (NCBI_COMPILER_VERSION > 550)) && \ 257 (!defined(NCBI_COMPILER_MIPSPRO)) ) 258arg_desc->SetCurrentGroup(
"Sequence masking options");
259arg_desc->AddOptionalKey(
"mask_data",
"mask_data_files",
260 "Comma-separated list of input files containing " 261 "masking data as produced by NCBI masking " 262 "applications (e.g. dustmasker, segmasker, " 266arg_desc->AddOptionalKey(
"mask_id",
"mask_algo_ids",
267 "Comma-separated list of strings to uniquely " 268 "identify the masking algorithm",
271arg_desc->AddOptionalKey(
"mask_desc",
"mask_algo_descriptions",
272 "Comma-separated list of free form strings to " 273 "describe the masking algorithm details",
279arg_desc->AddFlag(
"gi_mask",
280 "Create GI indexed masking data.",
true);
284arg_desc->AddOptionalKey(
"gi_mask_name",
"gi_based_mask_names",
285 "Comma-separated list of masking data output files.",
292arg_desc->SetCurrentGroup(
"Output options");
293arg_desc->AddOptionalKey(
kOutput,
"database_name",
294 "Name of BLAST database to be created\n"+ dflt +
295 "Required if multiple file(s)/database(s) are " 296 "provided as input",
298arg_desc->AddDefaultKey(
"blastdb_version",
"version",
299 "Version of BLAST database to be created",
302arg_desc->SetConstraint(
"blastdb_version",
304arg_desc->AddDefaultKey(
"max_file_sz",
"number_of_bytes",
305 "Maximum file size for BLAST database files",
307arg_desc->AddOptionalKey(
"metadata_output_prefix",
"",
309arg_desc->AddOptionalKey(
"logfile",
"File_Name",
310 "File to which the program log should be redirected",
314arg_desc->AddFlag(
"verbose",
"Produce verbose output",
true);
315arg_desc->AddFlag(
"limit_defline",
"limit_defline",
true);
318arg_desc->SetCurrentGroup(
"Taxonomy options");
319arg_desc->AddOptionalKey(
"taxid",
"TaxID",
320 "Taxonomy ID to assign to all sequences",
325arg_desc->AddOptionalKey(
"taxid_map",
"TaxIDMapFile",
326 "Text file mapping sequence IDs to taxonomy IDs.\n" 327 "Format:<SequenceId> <TaxonomyId><newline>",
331arg_desc->AddOptionalKey(
"oid_masks",
"oid_masks",
343 static stringkMods =
"KMGTPEZY";
346 for(
i= 0;
i< kMods.size();
i++) {
347 if(v <
Uint8(minprec)*1024) {
355rv.append(kMods,
i, 1);
370 while(p_ptr !=
NULL)
380 if(desc.
IsOrg()) {
415 const stringunv(
"Unverified");
448(ch ==
' '|| ch ==
'\t'|| ch ==
'\n'|| ch ==
'\r')) {
457 if(ch ==
'B'|| ch ==
'0') {
470 for(it_bio_set =
Begin(*
m_entry); it_bio_set; ++it_bio_set) {
475 if(it_bio_set->CanGetDescr() &&
IsUnverified(it_bio_set->GetDescr())) {
476 for(it_bio =
Begin(*it_bio_set); it_bio; ++it_bio) {
512 if(!
m_bio)
returnrv;
516 constsequence::CDeflineGenerator::TUserFlags
flags= sequence::CDeflineGenerator::fUseAutoDef;
517sequence::CDeflineGenerator
gen;
522 if(
i->IsTitle()) {
523old_title =
i->GetTitle();
529 des->SetTitle(title);
531desr.
Set().push_back(
des);
538 des->SetOrg().SetTaxId(taxid);
563 while(!
data.eof())
595vector<SBlastDbMaskData> & mask_range,
596vector<int> & column_ids,
597vector<CTempString> & column_blobs);
599 #if ((!defined(NCBI_COMPILER_WORKSHOP) || (NCBI_COMPILER_VERSION > 550)) && \ 600 (!defined(NCBI_COMPILER_MIPSPRO)) ) 630 #if ((!defined(NCBI_COMPILER_WORKSHOP) || (NCBI_COMPILER_VERSION > 550)) && \ 631 (!defined(NCBI_COMPILER_MIPSPRO)) ) 641: m_Sequence(
NULL), m_Oid(0)
647 #if ((!defined(NCBI_COMPILER_WORKSHOP) || (NCBI_COMPILER_VERSION > 550)) && \ 648 (!defined(NCBI_COMPILER_MIPSPRO)) ) 653 stringalgo_opts, algo_name;
668std::mt19937 rng(std::time(
nullptr));
682vector<SBlastDbMaskData> & mask_range,
683vector<int> & column_ids,
684vector<CTempString> & column_blobs)
695 intslength(0), alength(0);
704 #if ((!defined(NCBI_COMPILER_WORKSHOP) || (NCBI_COMPILER_VERSION > 550)) && \ 705 (!defined(NCBI_COMPILER_MIPSPRO)) ) 716mask_data.
offsets.push_back(pair<TSeqPos, TSeqPos>(range->first, range->second));
719mask_range.push_back(mask_data);
725column_blobs.resize(column_ids.size());
726 m_Blobs.resize(column_ids.size());
728 for(
int i= 0;
i< (
int)column_ids.size();
i++) {
774 if(args[
"input_type"].
HasValue()) {
775 const string& input_type = args[
"input_type"].AsString();
776 if(input_type ==
"fasta") {
778}
else if(input_type ==
"asn1_bin") {
780}
else if(input_type ==
"asn1_txt") {
782}
else if(input_type ==
"blastdb") {
806 stringerror_msg =
"File "+ seq_file +
" does not exist";
810 stringerror_msg =
"File "+ seq_file +
" is empty";
815unique_ptr<CDecompressIStream> comp_seq_istream;
819 boolis_gz =
false, is_bz2 =
false, is_zst=
false;
829data_in = comp_seq_istream.get();
833 string msg=
"\nInput file "+ seq_file +
" does NOT appear to be FASTA (processing anyway).\n"\
834+
"Advise validating database with 'blastdbcheck -dbtype [prot|nucl] -db ${DBNAME}'\n";
848 fg.GetFormatHints().DisableAllNonpreferred();
849 return fg.GuessFormat();
866 string msg(
"Input format not supported (");
868 msg+=
"Use -input_type to specify the input type being used.";
873 #if ((!defined(NCBI_COMPILER_WORKSHOP) || (NCBI_COMPILER_VERSION > 550)) && \ 874 (!defined(NCBI_COMPILER_MIPSPRO)) ) 880 const CArgValue& files = args[
"mask_data"];
881 const CArgValue& ids = args[
"mask_id"];
882 const CArgValue& descs = args[
"mask_desc"];
883 const CArgValue& gi_names = args[
"gi_mask_name"];
885vector<string> file_list;
886vector<string> id_list;
887vector<string> desc_list;
888vector<string> gi_mask_names;
892 if(! file_list.size()) {
894 "mask_data option found, but no files were specified.");
899 if(file_list.size() != id_list.size()) {
901 "the size of mask_id does not match that of mask_data.");
904 for(
unsigned int i= 0;
i< id_list.size(); ++
i) {
908 "mask_id can not be numeric.");
915 if(file_list.size() != desc_list.size()) {
917 "the size of mask_desc does not match that of mask_data.");
921vector<string> default_desc(id_list.size(),
"");
922desc_list.swap(default_desc);
927 if(file_list.size() != gi_mask_names.size()) {
929 "the size of gi_mask_name does not match that of mask_data.");
933 for(
unsigned int i= 0;
i< file_list.size(); ++
i) {
934 if( !
CFile(file_list[
i]).Exists() ) {
936<<
"' as it does not exist.");
946 fg.GetFormatHints().DisableAllNonpreferred();
947mask_file_format =
fg.GuessFormat();
955 s_ReadObject(mask_file, mask_file_format, first_obj,
"mask data in '"+ file_list[
i] +
"'");
963*
m_LogFile<<
"Mask file: "<< file_list[
i] << endl;
964 stringopts = first_obj->GetAlgo_options();
965 if(id_list.size()) {
970 stringname = gi_mask_names.size() ? gi_mask_names[
i] : file_list[
i];
987 if(seqid.
Empty()) {
989 "Cannot get masked range Seq-id");
998 s_ReadObject(mask_file, mask_file_format, masks,
"mask data (continuation)");
1008 if(
"fasta"!= args[
"input_type"].AsString())
1010 else if(args[
"parse_seqids"])
1019vector<CTempString>
names;
1021vector<string> blastdb;
1027 if(
names[0] ==
"-") {
1032 for(
size_t i= 0;
i<
names.size();
i++) {
1033 stringseq_file =
names[
i];
1037unique_ptr<CDecompressIStream> comp_seq_istream;
1038 boolis_gz =
false, is_bz2 =
false, is_zst=
false;
1049data_in = comp_seq_istream.get();
1057vector<string> blastdb;
1061 boolrandomize = args[
"randomize"].AsBoolean();
1063vector<string> final_blastdb;
1066 ASSERT(blastdb.size()==1);
1067 CSeqDBdb(blastdb[0], seqtype);
1068vector<string> paths;
1072 if(paths.size() > 1) {
1074 "Modifying an alias BLAST db is currently not supported.");
1076final_blastdb.push_back(blastdb[0]);
1078 ITERATE(vector<string>, iter, blastdb) {
1079 const string& s = *iter;
1086<< s <<
" as BLAST db");
1088final_blastdb.push_back(s);
1092 if(final_blastdb.size()) {
1106 if(!leafs.
empty()) {
1108bdl->GetSeqid().front()->AsFastaString();
1111leafTaxIds[id] = ids;
1123 "No valid input FASTA file or BLAST db is found.");
1130 const stringenv_skip =
1134 const stringdont_scan_bioseq =
1135 GetEnvironment().
Get(
"NCBI_MAKEBLASTDB_DONT_SCAN_BIOSEQ_FOR_CFASTAREADER_USER_OBJECTS");
1136 const boolscan_bioseq_4_cfastareader_usrobj =
static_cast<bool>(dont_scan_bioseq.empty());
1142 boolis_protein = (args[
kArgDbType].AsString() ==
"prot");
1148: args[
kInput]).AsString();
1152 "Cannot create a BLAST database from an existing one without " 1153 "changing the output name, please provide a (different) database name " 1156 if(input_fmt !=
eBlastDb&& args[
"randomize"].AsBoolean()) {
1158 "Option randomize is only applicable to blastdb input type");
1161vector<string> input_files;
1163 if(
dbname==
"-"|| input_files.size() > 1) {
1165 "Please provide a database name using -"+
kOutput);
1177: args[
kInput]).AsString();
1179vector<CTempString>
names;
1181 if(
names.size() > 1) {
1183 "Please provide a title using -title");
1194 if(title ==
"-") {
1196 "Please provide a title using -title");
1199 m_LogFile= & (args[
"logfile"].HasValue()
1200? args[
"logfile"].AsOutputFile()
1204 boolhash_index = args[
"hash_index"];
1205 booluse_gi_mask = args[
"gi_mask"];
1211 boollong_seqids =
false;
1215long_seqids = (
registry.
Get(
"BLAST",
"LONG_SEQID") ==
"1");
1221 boollimit_defline =
false;
1223 if(args[
"limit_defline"]) {
1224limit_defline =
true;
1227 Uint8oid_masks = 0;
1228 if(args[
"oid_masks"]) {
1229oid_masks = args[
"oid_masks"].AsInteger();
1241scan_bioseq_4_cfastareader_usrobj));
1244 if(args[
"verbose"]) {
1268 static const Uint8MAX_VOL_FILE_SIZE = 0x100000000;
1269 if(bytes >= MAX_VOL_FILE_SIZE) {
1271 "max_file_sz must be < 4 GiB");
1278 if(args[
"taxid"].
HasValue()) {
1282}
else if(args[
"taxid_map"].
HasValue()) {
1290 #if ((!defined(NCBI_COMPILER_WORKSHOP) || (NCBI_COMPILER_VERSION > 550)) && \ 1291 (!defined(NCBI_COMPILER_MIPSPRO)) ) 1301 stringoutput_prefix = args[
"metadata_output_prefix"]
1302? args[
"metadata_output_prefix"].AsString()
1309 stringmetadata_filename = new_db +
"."+ extn;
1310ofstream
out(metadata_filename.c_str());
1313json_out->PreserveKeyNames();
1315json_out->WriteObject(obj_info);
1338 if(args[
"input_type"].
HasValue()) {
1347 if(args[
"parse_seqids"].
HasValue()) {
1350 if(args[
"gi_mask"].
HasValue()) {
1353 else if(args[
"mask_data"].
HasValue()) {
1359 #ifndef SKIP_DOXYGEN_PROCESSING 1360 int main(
intargc,
const char* argv[]
)
User-defined methods of the data storage class.
User-defined methods of the data storage class.
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.
Auxiliary classes/functions for BLAST input library.
Code to build a database given various sources of sequence data.
Class to constrain the values of an argument to those greater than or equal to the value specified in...
CSeq_entry * GetParentEntry(void) const
TTaxId GetTaxId() const
Determine the tax-id for this bioseq.
void AddParam(EUsageParams p, int val)
Keeps track of the version of the BLAST engine in the NCBI C++ toolkit.
Build BlastDB format databases from various data sources.
bool AddSequences(IBioseqSource &src, bool add_pig=false)
Add sequences from an IBioseqSource object.
bool AddFasta(CNcbiIstream &fasta_file)
Add sequences from a file containing FASTA data.
void SetVerbosity(bool v)
Specify level of output verbosity.
void SetMaskDataSource(IMaskDataSource &ranges)
Specify an object mapping Seq-id to subject masking data.
void SetMembBits(const TLinkoutMap &membbits, bool keep_mbits)
Specify a membership bit lookup object.
int RegisterMaskingAlgorithm(EBlast_filter_program program, const string &options, const string &name="")
Define a masking algorithm.
void SetTaxids(CTaxIdSet &taxids)
Specify a mapping of sequence ids to taxonomic ids.
string GetOutputDbName() const
bool EndBuild(bool erase=false)
Finish building a new database.
void SetMaxFileSize(Uint8 max_file_size)
Set the maximum size of database component files.
void SetLeafTaxIds(const TIdToLeafs &taxids, bool keep_taxids)
Specify a leaf-taxids object.
Class implements different ad-hoc unreliable file format identifications.
EFormat
The formats are checked in the same order as declared here.
@ eBinaryASN
Binary ASN.1.
@ eFasta
FASTA format sequence record, CFastaReader.
@ eUnknown
unknown format
static const char * GetFormatName(EFormat format)
Defines invalid user input exceptions.
The main application class.
CRef< CMaskedRangeSet > m_Ranges
void x_ProcessInputData(const string &paths, bool is_protein)
void x_AddSeqEntries(CNcbiIstream &data, TFormat fmt)
CFormatGuess::EFormat TFormat
Convenience typedef.
void x_AddFasta(CNcbiIstream &data)
void x_AddSequenceData(CNcbiIstream &input, TFormat fmt)
virtual void Init()
@inheritDoc
CRef< CBuildDatabase > m_DB
bool x_ShouldParseSeqIds(void)
CMakeBlastDBApp()
@inheritDoc
virtual int Run()
@inheritDoc
ESupportedInputFormats x_GetUserInputTypeHint(void)
CBlastUsageReport m_UsageReport
TFormat x_ConvertToCFormatGuessType(ESupportedInputFormats fmt)
ESupportedInputFormats x_ConvertToSupportedType(TFormat fmt)
vector< ESupportedInputFormats > x_GuessInputType(const vector< CTempString > &filenames, vector< string > &blastdbs)
void x_VerifyInputFilesType(const vector< CTempString > &filenames, CMakeBlastDBApp::ESupportedInputFormats input_type)
TFormat x_GuessFileType(CNcbiIstream &input)
void Insert(int algo_id, const CSeq_id &id, const CSeq_loc &v)
static CNcbiApplication * Instance(void)
Singleton method.
virtual ~CRawSeqDBSource()
virtual int GetColumnId(const string &name)
Get the column ID for a column mentioned by name.
virtual const map< string, string > & GetColumnMetaData(int id)
Get metadata for the column with the specified Column ID.
CRef< CSeqDBExpert > m_Source
vector< CBlastDbBlob > m_Blobs
vector< int > m_RandomOids
virtual bool GetNext(CTempString &sequence, CTempString &ambiguities, CRef< CBlast_def_line_set > &deflines, vector< SBlastDbMaskData > &mask_range, vector< int > &column_ids, vector< CTempString > &column_blobs)
vector< string > m_ColumnNames
CRawSeqDBSource(const string &name, bool protein, CBuildDatabase *outdb, bool randomize)
vector< int > m_ColumnIds
virtual void GetColumnNames(vector< string > &names)
Get the names of all columns defined by this sequence source.
map< int, int > m_MaskIdMap
void GetRawSeqAndAmbig(int oid, const char **buffer, int *seq_length, int *ambig_length) const
Raw Sequence and Ambiguity Data.
void GetColumnBlob(int col_id, int oid, CBlastDbBlob &blob)
Fetch the data blob for the given column and oid.
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.
int GetNumOIDs() const
Returns the size of the (possibly sparse) OID range.
void GetAvailableMaskAlgorithms(vector< int > &algorithms)
Get a list of algorithm IDs for which mask data exists.
ESeqType
Sequence types (eUnknown tries protein, then nucleotide).
void GetMaskAlgorithmDetails(int algorithm_id, objects::EBlast_filter_program &program, string &program_name, string &algo_opts)
Get information about one type of masking available here.
void RetSequence(const char **buffer) const
Returns any resources associated with the sequence.
string GetTitle() const
Returns the database title.
CRef< CBlast_db_metadata > GetDBMetaData(string user_path=kEmptyStr)
void ListColumns(vector< string > &titles)
List columns titles found in this database.
bool CheckOrFindOID(int &next_oid) const
Find an included OID, incrementing next_oid if necessary.
int GetColumnId(const string &title)
Get an ID number for a given column title.
CRef< CBlast_def_line_set > GetHdr(int oid) const
Get the ASN.1 header for the sequence.
void GetMaskData(int oid, const vector< int > &algo_ids, TSequenceRanges &ranges)
Get masked ranges of a sequence.
const map< string, string > & GetColumnMetaData(int column_id)
Get all metadata for the specified column.
virtual CConstRef< CBioseq > GetNext()
Get a Bioseq object if there are any more to get.
CRef< CObjectManager > m_objmgr
set< CBioseq * > m_bio_skipped
CTypeIterator< CBioseq > m_bio
CSeqEntrySource(CNcbiIstream &is, TFormat fmt, bool skip_unver)
CRef< CSeq_entry > m_entry
CFormatGuess::EFormat TFormat
Convenience typedef.
bool IsUnverified(const CSeq_descr &descr)
@Seq_descr.hpp User-defined methods of the data storage class.
const CSeq_descr & GetDescr(void) const
bool IsSetDescr(void) const
CSeq_entry * GetParentEntry(void) const
void SetMappingFromFile(CNcbiIstream &f)
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
Template class for iteration on objects of class C.
@ eFullIndex
Use several forms of each Seq-id in the string index.
@ eAddHash
Add an index from sequence hash to OID.
@ eNoIndex
Build a database without any indices.
int TIndexType
Bitwise OR of "EIndexType".
Interface to a source of Bioseq objects.
Interface to a source of raw sequence data.
iterator_bool insert(const value_type &val)
const_iterator begin() const
const_iterator find(const key_type &key) const
const_iterator end() const
const string kArgDbTitle
Title for the BLAST database.
const string kArgDbType
BLAST database molecule type.
void Print(const CCompactSAMApplication::AlignInfo &ai)
API (CDeflineGenerator) for computing sequences' titles ("definitions").
std::ofstream out("events_result.xml")
main entry point for tests
static const struct name_t names[]
static const char * str(char *buf, int n)
static void des(const char *src, const char *out)
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.
const CNcbiEnvironment & GetEnvironment(void) const
Get the application's cached environment.
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.
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.
SStrictId_Tax::TId TTaxId
Taxon id type.
const CNcbiArguments & GetArguments(void) const
Get the application's cached unprocessed command-line arguments.
#define TAX_ID_FROM(T, value)
@ fHideXmlHelp
Hide XML help description.
@ fHideFullVersion
Hide full version description.
@ fHideDryRun
Hide dryrun description.
@ fHideConffile
Hide configuration file description.
@ eNoOwnership
No ownership is assumed.
virtual const string & AsString(void) const =0
Get the argument's string value.
virtual bool HasValue(void) const =0
Check if argument holds a value.
@ fAppend
Append to end-of-file; for eOutputFile or eIOFile.
@ fHidden
Hide it in Usage.
@ eRequires
One argument requires another.
@ eExcludes
One argument excludes 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.
@ eZstd
ZStandard (raw zstd data)
@ eGZipFile
.gz file (including concatenated files)
void SetDiagPostPrefix(const char *prefix)
Specify a string to prefix all subsequent error postings with.
EDiagSev SetDiagPostLevel(EDiagSev post_sev=eDiag_Error)
Set the threshold severity for posting the messages.
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
@ eDiag_Warning
Warning message.
const string & Get(const string &name, bool *found=NULL) const
Get environment value by name.
void Error(CExceptionArgs_Base &args)
TErrCode GetErrCode(void) const
Get error code.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
void Warning(CExceptionArgs_Base &args)
static char GetPathSeparator(void)
Get path separator symbol specific for the current platform.
#define MSerial_AsnBinary
#define MSerial_AsnText
I/O stream manipulators â.
CBeginInfo Begin(C &obj)
Get starting point of object hierarchy.
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...
bool Empty(void) const THROWS_NONE
Check if CConstRef is empty â not pointing to any object which means having a null value.
void Reset(void)
Reset reference object.
void Reset(void)
Reset reference object.
bool NotEmpty(void) const THROWS_NONE
Check if CRef is not empty â pointing to an object and has a non-null value.
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
uint64_t Uint8
8-byte (64-bit) unsigned integer
virtual const string & Get(const string §ion, const string &name, TFlags flags=0) const
Get the parameter value.
bool IsEnabled(void)
Indicates whether application usage statistics collection is enabled for a current reporter instance.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
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 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 EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)
Check if a string ends with a specified suffix value.
static Uint8 StringToUInt8_DataSize(const CTempString str, TStringToNumFlags flags=0)
Convert string that can contain "software" qualifiers to Uint8.
static TNumeric StringToNumeric(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to a numeric value.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
static string TruncateSpaces(const string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string.
static string UInt8ToString(Uint8 value, TNumToStringFlags flags=0, int base=10)
Convert UInt8 to string.
@ fConvErr_NoThrow
Do not throw an exception on error.
@ eNocase
Case insensitive compare.
double Elapsed(void) const
Return time elapsed since first Start() or last Restart() call (in seconds).
void Start(void)
Start the timer.
const TOrg & GetOrg(void) const
Get the Org member data.
list< CRef< CSeq_loc > > TMasks
const TMasks & GetMasks(void) const
Get the Masks member data.
EBlast_filter_program
This defines the possible sequence filtering algorithms to be used in a BLAST database.
const Tdata & Get(void) const
Get the member data.
list< CRef< CBlast_def_line > > Tdata
TMore GetMore(void) const
Get the More member data.
@ eBlast_filter_program_other
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.
const TStr & GetStr(void) const
Get the variant data.
const TType & GetType(void) const
Get the Type member data.
TSet & SetSet(void)
Select the variant.
@ eClass_nuc_prot
nuc acid and coded proteins
list< CRef< CSeqdesc > > Tdata
const TUser & GetUser(void) const
Get the variant data.
bool IsOrg(void) const
Check if variant Org is selected.
const TSource & GetSource(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 CanGetDescr(void) const
Check if it is safe to call GetDescr method.
const TOrg & GetOrg(void) const
Get the variant data.
void SetDescr(TDescr &value)
Assign a value to Descr data member.
Tdata & Set(void)
Assign a value to data member.
bool IsTitle(void) const
Check if variant Title is selected.
const TDescr & GetDescr(void) const
Get the Descr member data.
bool IsUser(void) const
Check if variant User is selected.
char * dbname(DBPROCESS *dbproc)
Get name of current database.
unsigned int
A callback function used to compare two keys in a database.
static TTaxId s_GetTaxId(const CBioseq &bio)
static bool s_HasTitle(const CBioseq &bio)
static const string kOutput("out")
Command line flag to represent the output.
static string Uint8ToString_DataSize(Uint8 v, unsigned minprec=10)
Converts a Uint8 into a string which contains a data size (converse to NStr::StringToUInt8_DataSize)
void s_ReadObject(CNcbiIstream &file, CFormatGuess::EFormat fmt, CRef< TObj > &obj, const string &msg)
Reads an object defined in a NCBI ASN.1 spec from a stream in multiple formats: binary and text ASN....
int main(int argc, const char *argv[])
static const string kInputSeparators(" ")
Defines token separators when multiple inputs are present.
static const string kInput("in")
Command line flag to represent the input.
const string version
version string
#define ASSERT
macro for assert.
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
Defines BLAST database access classes.
Defines exception class and several constants for SeqDB.
EBlastDbVersion
BLAST database version.
void SeqDB_GetMetadataFileExtension(bool db_is_protein, string &extn)
void SeqDB_SplitQuoted(const string &dbname, vector< CSeqDB_Substring > &dbs, bool keep_quote=false)
Combine and quote list of database names.
void SeqDB_CombineAndQuote(const vector< string > &dbs, string &dbname)
Combine and quote list of database names.
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
C++ I/O stream wrappers to compress/decompress data on-the-fly.
List of sequence offset ranges.
Structure describing filtered regions created using a particular sequence filtering algorithm.
int algorithm_id
Identifies the algorithm used.
vector< pair< TSeqPos, TSeqPos > > offsets
Start and end offsets of the filtered area.
Defines BLAST database construction classes.
Defines exception class for WriteDB.
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