NCBI C++ ToolKit
blastn_app.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: blastn_app.cpp 101547 2024-01-02 15:14:29Z merezhuk $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Christiam Camacho
27  *
28  */
29 
30 /** @file blastn_app.cpp
31  * BLASTN command line application
32  */
33 
34 #include <ncbi_pch.hpp>
35 #include <corelib/ncbiapp.hpp>
43 #include "blast_app_util.hpp"
44 #include "blastn_node.hpp"
45 
46 #ifndef SKIP_DOXYGEN_PROCESSING
48 USING_SCOPE(blast);
50 #endif
51 
53 {
54 public:
55  /** @inheritDoc */
58  version->SetVersionInfo(new CBlastVersion());
61  if (m_UsageReport.IsEnabled()) {
63  }
64  }
65 
68  }
69 private:
70  /** @inheritDoc */
71  virtual void Init();
72  /** @inheritDoc */
73  virtual int Run();
74 
75  int x_RunMTBySplitDB();
76  int x_RunMTBySplitQuery();
77 
78  /// This application's command line args
84 };
85 
87 {
88  // formulate command line arguments
89 
91  // read the command line
94 }
95 
96 static void s_GetMT1Cutoffs(const int word_size, Int8 & max_db_size, Int8 & min_q_size)
97 {
98  const Int8 kMT1MaxDbSz_Blastn = 150000000; // bases
99  const Int8 kMT1MinQSz_Blastn = 1500000; //bytes
100 
101  // Choose a bigger min quer size so we can support larger DB
102  const Int8 kMT1MaxDbSz_Megablast = 6000000000;
103  const Int8 kMT1MinQSz_Megablast = 10000000;
104 
105  if (word_size < 10) {
106  // CompressedAa
107  max_db_size = kMT1MaxDbSz_Blastn;
108  min_q_size = kMT1MinQSz_Blastn;
109  }
110  else {
111  max_db_size = kMT1MaxDbSz_Megablast;
112  min_q_size = kMT1MinQSz_Megablast;
113  }
114 }
115 
117 {
118  int status = BLAST_EXIT_SUCCESS;
119  const CArgs& args = GetArgs();
120  BLAST_PROF_ADD2( PROGRAM, blastn ) ;
121  BLAST_PROF_ADD( THREADS , (int)m_CmdLineArgs->GetNumThreads() );
122  BLAST_PROF_ADD( MT_MODE , (int)m_CmdLineArgs->GetMTMode() );
123  //Check to see if search should split by queries
124  try {
126  SetDiagPostPrefix("blastn");
127  SetDiagHandler(&m_Bah, false);
130  }
131  else {
133  }
134  int num_threads = m_CmdLineArgs->GetNumThreads();
135  int mt_mode = m_CmdLineArgs->GetMTMode();
136  if (!m_CmdLineArgs->ExecuteRemotely() && (num_threads > 1) &&
137  (mt_mode != CMTArgs::eSplitByDB)){
140  if (db_args->GetDatabaseName() != kEmptyStr) {
141  int word_size = m_OptsHndl->GetOptions().GetWordSize();
142  Int8 max_db_size = 0;
143  Int8 min_q_size = 0;
144  s_GetMT1Cutoffs(word_size, max_db_size, min_q_size);
145  CRef<CSeqDB> seqdb = sdb->GetSeqDb();
146  Uint8 total_length = seqdb->GetTotalLength();
147  if (mt_mode == CMTArgs::eSplitAuto){
148  if (total_length < max_db_size) {
149  if (args.Exist(kArgQuery) && args[kArgQuery].HasValue()) {
150  CFile file( args[kArgQuery].AsString());
151  if (file.GetLength() > min_q_size) {
153  return x_RunMTBySplitQuery();
154  }
155  }
156  }
157  }
158  else {
159  if (total_length > max_db_size) {
160  MTByQueries_DBSize_Warning(max_db_size, false);
161  }
162  }
163  }
164  }
165  if ((mt_mode == CMTArgs::eSplitByQueries) && (num_threads > 1)){
167  return x_RunMTBySplitQuery();
168  }
169  else {
170  return x_RunMTBySplitDB();
171  }
172  } CATCH_ALL(status)
173  if(!m_Bah.GetMessages().empty()) {
175  }
176  return status;
177 }
178 
180 {
181  BLAST_PROF_START( APP.MAIN );
182  BLAST_PROF_START( APP.PRE );
183  int status = BLAST_EXIT_SUCCESS;
184  int batch_num = 0;
185 
186  try {
187 
188  /*** Get the BLAST options ***/
189  const CArgs& args = GetArgs();
190  const CBlastOptions& opt = m_OptsHndl->GetOptions();
191  /*** Initialize the database/subject ***/
193  CRef<CLocalDbAdapter> db_adapter;
194  CRef<CScope> scope;
196  db_adapter, scope);
197  _ASSERT(db_adapter && scope);
198 
199  /*** Get the query sequence(s) ***/
200  CRef<CQueryOptionsArgs> query_opts =
202  SDataLoaderConfig dlconfig =
204  db_adapter);
205  CBlastInputSourceConfig iconfig(dlconfig, query_opts->GetStrand(),
206  query_opts->UseLowercaseMasks(),
207  query_opts->GetParseDeflines(),
208  query_opts->GetRange());
210  ERR_POST(Warning << "Query is Empty!");
211  return BLAST_EXIT_SUCCESS;
212  }
214  CBlastInput input(&fasta);
215 
216  // Initialize the megablast database index now so we can know whether an indexed search will be run.
217  // This is only important for the reference in the report, but would be done anyway.
218  if (opt.GetUseIndex() && !m_CmdLineArgs->ExecuteRemotely()) {
219  CRef<CBlastOptions> my_options(&(m_OptsHndl->SetOptions()));
221  }
222  /*** Get the formatting options ***/
224  bool isArchiveFormat = fmt_args->ArchiveFormatRequested(args);
225  if(!isArchiveFormat) {
227  }
228  CBlastFormat formatter(opt, *db_adapter,
229  fmt_args->GetFormattedOutputChoice(),
230  query_opts->GetParseDeflines(),
232  fmt_args->GetNumDescriptions(),
233  fmt_args->GetNumAlignments(),
234  *scope,
235  opt.GetMatrixName(),
236  fmt_args->ShowGis(),
237  fmt_args->DisplayHtmlOutput(),
238  opt.GetQueryGeneticCode(),
239  opt.GetDbGeneticCode(),
240  opt.GetSumStatisticsMode(),
242  db_adapter->GetFilteringAlgorithm(),
243  fmt_args->GetCustomOutputFormatSpec(),
244  m_CmdLineArgs->GetTask() == "megablast",
245  opt.GetMBIndexLoaded(),
246  NULL, NULL,
248  GetSubjectFile(args));
249 
250  formatter.SetQueryRange(query_opts->GetRange());
251  formatter.SetLineLength(fmt_args->GetLineLength());
252  formatter.SetHitsSortOption(fmt_args->GetHitsSortOption());
253  formatter.SetHspsSortOption(fmt_args->GetHspsSortOption());
254  formatter.SetCustomDelimiter(fmt_args->GetCustomDelimiter());
255  if(UseXInclude(*fmt_args, args[kArgOutput].AsString())) {
256  formatter.SetBaseFile(args[kArgOutput].AsString());
257  }
258  formatter.PrintProlog();
259 
260  /*** Process the input ***/
262  int batch_size = m_CmdLineArgs->GetQueryBatchSize();
263  if (batch_size) {
264  input.SetBatchSize(batch_size);
265  //BLAST_PROF_ADD( BATCH_SIZE, (int)batch_size );
266  } else {
267  Int8 total_len = formatter.GetDbTotalLength();
268  if (total_len > 0) {
269  /* the optimal hits per batch scales with total db size */
270  mixer.SetTargetHits(total_len / 3000);
271  }
272  input.SetBatchSize(mixer.GetBatchSize());
273  //BLAST_PROF_ADD( BATCH_SIZE, (int)mixer.GetBatchSize() );
274  }
275  BLAST_PROF_ADD( BATCH_SIZE, (int)input.GetBatchSize() );
276  BLAST_PROF_STOP( APP.PRE );
277  for (; !input.End(); formatter.ResetScopeHistory(), QueryBatchCleanup() ) {
278  BLAST_PROF_START( APP.LOOP.PRE );
279  CRef<CBlastQueryVector> query_batch(input.GetNextSeqBatch(*scope));
280  CRef<IQueryFactory> queries(new CObjMgr_QueryFactory(*query_batch));
281 
283 
285 
286  BLAST_PROF_STOP( APP.LOOP.PRE );
288  CRef<CRemoteBlast> rmt_blast =
289  InitializeRemoteBlast(queries, db_args, m_OptsHndl,
292  results = rmt_blast->GetResultSet();
293  } else {
294  BLAST_PROF_START( APP.LOOP.BLAST );
295  CLocalBlast lcl_blast(queries, m_OptsHndl, db_adapter);
297  lcl_blast.SetBatchNumber( batch_num );
298  results = lcl_blast.Run();
299  if (!batch_size)
300  input.SetBatchSize(mixer.GetBatchSize(lcl_blast.GetNumExtensions()));
301  BLAST_PROF_STOP( APP.LOOP.BLAST );
302  }
303  BLAST_PROF_START( APP.LOOP.FMT );
304  if (isArchiveFormat) {
305  formatter.WriteArchive(*queries, *m_OptsHndl, *results, 0, m_Bah.GetMessages());
307  } else {
309  fmt_args->GetFormattedOutputChoice());
311  formatter.PrintOneResultSet(**result, query_batch);
312  }
313  }
314  BLAST_PROF_STOP( APP.LOOP.FMT );
315  batch_num++;
316  }
317  BLAST_PROF_START( APP.POST );
318  formatter.PrintEpilog(opt);
319 
321  m_OptsHndl->GetOptions().DebugDumpText(NcbiCerr, "BLAST options", 1);
322  }
323 
326  BLAST_PROF_STOP( APP.POST );
327  } CATCH_ALL(status)
328 
329  if(!m_Bah.GetMessages().empty()) {
330  const CArgs & a = GetArgs();
332  }
333 
337  BLAST_PROF_STOP( APP.MAIN );
338  BLAST_PROF_ADD( BATCHES , (int)batch_num );
339  BLAST_PROF_ADD( EXIT_STATUS , (int)status );
341  return status;
342 }
343 
345 {
346  BLAST_PROF_START( APP.MAIN );
347  int status = BLAST_EXIT_SUCCESS;
348  int chunk_num = 0;
349 
350  try {
351  const CArgs& args = GetArgs();
353  ERR_POST(Warning << "Query is Empty!");
354  return BLAST_EXIT_SUCCESS;
355  }
356  CNcbiOstream & out_stream = m_CmdLineArgs->GetOutputStream();
357  const int kMaxNumOfThreads = m_CmdLineArgs->GetNumThreads();
358  CBlastMasterNode master_node(out_stream, kMaxNumOfThreads);
359 
362 
363  int batch_size = GetMTByQueriesBatchSize(m_OptsHndl->GetOptions().GetProgram(), kMaxNumOfThreads);
364  INFO_POST("Batch Size: " << batch_size);
366  while (master_node.Processing()) {
367  if (!input.AtEOF()) {
368  if (!master_node.IsFull()) {
369  string qb;
370  int q_index = 0;
371  int num_q = input.GetQueryBatch(qb, q_index);
372  if (num_q > 0) {
373  CBlastNodeMailbox * mb(new CBlastNodeMailbox(chunk_num, master_node.GetBuzzer()));
374  CBlastnNode * t(new CBlastnNode(chunk_num, GetArguments(), args, m_Bah, qb, q_index, num_q, mb));
375  master_node.RegisterNode(t, mb);
376  chunk_num ++;
377  }
378  }
379  }
380  else {
381  master_node.Shutdown();
382  }
383  }
384 
389 
390  } CATCH_ALL (status)
391 
392  if(!m_Bah.GetMessages().empty()) {
393  const CArgs & a = GetArgs();
395  }
396  BLAST_PROF_STOP( APP.MAIN );
397  BLAST_PROF_ADD( EXIT_STATUS , (int)status );
398  BLAST_PROF_ADD( BATCHES , (int)chunk_num );
403  return status;
404 }
405 
406 #ifndef SKIP_DOXYGEN_PROCESSING
407 int NcbiSys_main(int argc, ncbi::TXChar* argv[])
408 {
409  return CBlastnApp().AppMain(argc, argv);
410 }
411 #endif /* SKIP_DOXYGEN_PROCESSING */
Produce formatted blast output for command line applications.
void LogCmdOptions(blast::CBlastUsageReport &report, const CBlastAppArgs &args)
CRef< blast::CRemoteBlast > InitializeRemoteBlast(CRef< blast::IQueryFactory > queries, CRef< blast::CBlastDatabaseArgs > db_args, CRef< blast::CBlastOptionsHandle > opts_hndl, bool verbose_output, const string &client_id, CRef< objects::CPssmWithParameters > pssm)
Initializes a CRemoteBlast instance for usage by command line BLAST binaries.
blast::SDataLoaderConfig InitializeQueryDataLoaderConfiguration(bool query_is_protein, CRef< blast::CLocalDbAdapter > db_adapter)
Initialize the data loader configuration for the query.
void SaveSearchStrategy(const CArgs &args, blast::CBlastAppArgs *cmdline_args, CRef< blast::IQueryFactory > queries, CRef< blast::CBlastOptionsHandle > opts_hndl, CRef< objects::CPssmWithParameters > pssm, unsigned int num_iters)
Save the search strategy corresponding to the current command line search.
void QueryBatchCleanup()
Clean up formatter scope and release.
string GetSubjectFile(const CArgs &args)
Get name of subject file @parameter args arguments class [in].
bool RecoverSearchStrategy(const CArgs &args, blast::CBlastAppArgs *cmdline_args)
Recover search strategy from input file.
int GetMTByQueriesBatchSize(EProgram p, int num_threads, const string &task)
void MTByQueries_DBSize_Warning(const Int8 length_limit, bool is_db_protein)
void PrintErrorArchive(const CArgs &a, const list< CRef< CBlast4_error > > &msg)
Function to print blast archive with only error messages (search failed) to output stream.
void InitializeSubject(CRef< blast::CBlastDatabaseArgs > db_args, CRef< blast::CBlastOptionsHandle > opts_hndl, bool is_remote_search, CRef< blast::CLocalDbAdapter > &db_adapter, CRef< objects::CScope > &scope)
Initializes the subject/database as well as its scope.
string GetCmdlineArgs(const CNcbiArguments &a)
void BlastFormatter_PreFetchSequenceData(const blast::CSearchResultSet &results, CRef< CScope > scope, blast::CFormattingArgs::EOutputFormat format_type)
This method optimize the retrieval of sequence data to scope.
void LogBlastOptions(blast::CBlastUsageReport &report, const CBlastOptions &opt)
bool UseXInclude(const CFormattingArgs &f, const string &s)
bool IsIStreamEmpty(CNcbiIstream &in)
void LogQueryInfo(CBlastUsageReport &report, const CBlastInput &q_info)
Utility functions for BLAST command line applications.
#define CATCH_ALL(exit_code)
Standard catch statement for all BLAST command line programs.
#define BLAST_EXIT_SUCCESS
Command line binary exit code: success.
Interface for reading SRA sequences into blast input.
static void s_GetMT1Cutoffs(const int word_size, Int8 &max_db_size, Int8 &min_q_size)
Definition: blastn_app.cpp:96
USING_SCOPE(blast)
int NcbiSys_main(int argc, ncbi::TXChar *argv[])
Definition: blastn_app.cpp:407
USING_NCBI_SCOPE
Definition: blastn_app.cpp:47
Main argument class for BLASTN application.
blastn node api
CArgs –.
Definition: ncbiargs.hpp:379
Class to mix batch size for BLAST runs.
void SetTargetHits(Int4 target)
Int4 GetBatchSize(Int4 hits=-1)
CRef< CBlastOptionsHandle > SetOptionsForSavedStrategy(const CArgs &args)
Combine the command line arguments into a CBlastOptions object recovered from saved search strategy.
string GetTask() const
Get the task for this object.
virtual CNcbiIstream & GetInputStream()
Get the input stream.
size_t GetNumThreads() const
Get the number of threads to spawn.
CRef< CBlastOptionsHandle > SetOptions(const CArgs &args)
Extract the command line arguments into a CBlastOptionsHandle object.
int GetMTMode() const
CRef< CBlastDatabaseArgs > GetBlastDatabaseArgs() const
Get the BLAST database arguments.
CArgDescriptions * SetCommandLine()
Set the command line arguments.
bool ExecuteRemotely() const
Determine whether the search should be executed remotely or not.
bool ProduceDebugRemoteOutput() const
Return whether debug (verbose) output should be produced on remote searches (only available when comp...
CRef< CQueryOptionsArgs > GetQueryOptionsArgs() const
Get the options for the query sequence(s)
string GetClientId() const
Retrieve the client ID for remote requests.
CRef< CFormattingArgs > GetFormattingArgs() const
Get the formatting options.
bool ProduceDebugOutput() const
Return whether debug (verbose) output should be produced on remote searches (only available when comp...
virtual CNcbiOstream & GetOutputStream()
Get the output stream.
Class to capture message from diag handler.
Definition: blast_aux.hpp:249
CRef< CSearchDatabase > GetSearchDatabase() const
Retrieve the search database information.
Definition: blast_args.hpp:929
string GetDatabaseName() const
Get the BLAST database name.
Definition: blast_args.hpp:924
Class representing a text file containing sequences in fasta format.
This class formats the BLAST results for command line applications.
void LogBlastSearchInfo(blast::CBlastUsageReport &report)
void SetHitsSortOption(int hitsSortOption)
void SetHspsSortOption(int hspsSortOption)
void PrintOneResultSet(const blast::CSearchResults &results, CConstRef< blast::CBlastQueryVector > queries, unsigned int itr_num=numeric_limits< unsigned int >::max(), blast::CPsiBlastIterationState::TSeqIds prev_seqids=blast::CPsiBlastIterationState::TSeqIds(), bool is_deltablast_domain_result=false)
Print all alignment information for a single query sequence along with any errors or warnings (errors...
void SetCustomDelimiter(string customDelim)
void PrintEpilog(const blast::CBlastOptions &options)
Print the footer of the blast report.
void SetBaseFile(string base)
For use by XML2 only.
void ResetScopeHistory()
Resets the scope history for some output formats.
void SetLineLength(size_t len)
Set Alignment Length.
void WriteArchive(blast::IQueryFactory &queries, blast::CBlastOptionsHandle &options_handle, const blast::CSearchResultSet &results, unsigned int num_iters=0, const list< CRef< objects::CBlast4_error > > &msg=list< CRef< objects::CBlast4_error > >())
Writes out the query and results as an "archive" format.
Int8 GetDbTotalLength()
Get total length of the database.
void PrintProlog()
Print the header of the blast report.
void SetQueryRange(const TSeqRange &query_range)
Set query range.
Class that centralizes the configuration data for sequences to be converted.
Definition: blast_input.hpp:48
Generalized converter from an abstract source of biological sequence data to collections of blast inp...
Int8 GetQueriesLength()
Definition: blast_node.hpp:156
CConditionVariable & GetBuzzer()
Definition: blast_node.hpp:153
void RegisterNode(CBlastNode *node, CBlastNodeMailbox *mailbox)
Definition: blast_node.cpp:136
Encapsulates ALL the BLAST algorithm's options.
void AddParam(EUsageParams p, int val)
Keeps track of the version of the BLAST engine in the NCBI C++ toolkit.
Definition: version.hpp:53
Handles command line arguments for blastn binary.
Definition: blastn_args.hpp:44
virtual int GetQueryBatchSize() const
@inheritDoc
CBlastnApp()
@inheritDoc
Definition: blastn_app.cpp:56
int x_RunMTBySplitQuery()
Definition: blastn_app.cpp:344
virtual void Init()
@inheritDoc
Definition: blastn_app.cpp:86
CBlastUsageReport m_UsageReport
Definition: blastn_app.cpp:81
CRef< CBlastnAppArgs > m_CmdLineArgs
This application's command line args.
Definition: blastn_app.cpp:79
CStopWatch m_StopWatch
Definition: blastn_app.cpp:82
CRef< CBlastOptionsHandle > m_OptsHndl
Definition: blastn_app.cpp:83
virtual int Run()
@inheritDoc
Definition: blastn_app.cpp:116
CBlastAppDiagHandler m_Bah
Definition: blastn_app.cpp:80
int x_RunMTBySplitDB()
Definition: blastn_app.cpp:179
void DebugDumpText(ostream &out, const string &bundle, unsigned int depth) const
Definition: ddumpable.cpp:56
CFile –.
Definition: ncbifile.hpp:1605
int GetHitsSortOption() const
virtual bool ArchiveFormatRequested(const CArgs &args) const
string GetCustomOutputFormatSpec() const
Retrieve for string that specifies the custom output format for tabular and comma-separated value.
EOutputFormat GetFormattedOutputChoice() const
Get the choice of formatted output.
int GetHspsSortOption() const
TSeqPos GetNumAlignments() const
Number of alignments to show in traditional BLAST output.
bool ShowGis() const
Display the NCBI GIs in formatted output?
TSeqPos GetNumDescriptions() const
Number of one-line descriptions to show in traditional BLAST output.
size_t GetLineLength() const
bool DisplayHtmlOutput() const
Display HTML output?
string GetCustomDelimiter()
Class to perform a BLAST search on local BLAST databases Note that PHI-BLAST can be run using this cl...
Definition: local_blast.hpp:62
@ eSplitByQueries
NCBI C++ Object Manager dependant implementation of IQueryFactory.
objects::ENa_strand GetStrand() const
Get strand to search in query sequence(s)
Definition: blast_args.hpp:793
bool GetParseDeflines() const
Should the defline be parsed?
Definition: blast_args.hpp:797
bool QueryIsProtein() const
Is the query sequence protein?
Definition: blast_args.hpp:800
TSeqRange GetRange() const
Get query sequence range restriction.
Definition: blast_args.hpp:789
bool UseLowercaseMasks() const
Use lowercase masking in FASTA input?
Definition: blast_args.hpp:795
CRef –.
Definition: ncbiobj.hpp:618
Search Results for All Queries.
Uint8 GetTotalLength() const
Returns the sum of the lengths of all available sequences.
Definition: seqdb.cpp:685
CStopWatch –.
Definition: ncbitime.hpp:1937
const string kArgOutput
Output file name.
const string kArgQuery
Query sequence(s)
void Print(const CCompactSAMApplication::AlignInfo &ai)
int GetDbGeneticCode() const
virtual void SetNumberOfThreads(size_t nthreads)
Mutator for the number of threads.
void ResetMessages(void)
Reset messgae buffer, erase all saved message.
Definition: blast_aux.cpp:1174
CRef< CSeqDB > GetSeqDb() const
Obtain a reference to the database.
CRef< CSearchResultSet > Run()
Executes the search.
void SetBatchNumber(int batch_num)
static void InitializeMegablastDbIndex(CRef< CBlastOptions > options)
Initialize a megablast BLAST database index.
CBlastOptions & SetOptions()
Returns a reference to the internal options class which this object is a handle for.
size_t SplitQuery_GetChunkSize(EProgram program)
Returns the optimal chunk size for a given task.
Definition: local_blast.cpp:54
int GetFilteringAlgorithm()
Retrieve the database filtering algorithm.
EProgram GetProgram() const
Accessors/Mutators for individual options.
const CBlastOptions & GetOptions() const
Return the object which this object is a handle for.
int GetQueryGeneticCode() const
bool GetSumStatisticsMode() const
Sum statistics options.
CRef< CSearchResultSet > GetResultSet()
Submit the search (if necessary) and return the results.
bool GetMBIndexLoaded() const
void DoNotSaveMessages(void)
Call to turn off saving diag message, discard all saved message.
Definition: blast_aux.cpp:1189
Int4 GetNumExtensions()
Retrieve the number of extensions performed during the search.
bool GetUseIndex() const
const char * GetMatrixName() const
list< CRef< objects::CBlast4_error > > & GetMessages(void)
Return list of saved diag messages.
Definition: blast_aux.hpp:262
int GetWordSize() const
void SetFullVersion(CRef< CVersionAPI > version)
Set version data for the program.
Definition: ncbiapp.cpp:1187
void HideStdArgs(THideStdArgs hide_mask)
Set the hide mask for the Hide Std Flags.
Definition: ncbiapp.cpp:1325
virtual const CArgs & GetArgs(void) const
Get parsed command line arguments.
Definition: ncbiapp.cpp:305
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.
Definition: ncbiapp.cpp:832
CVersionInfo GetVersion(void) const
Get the program version information.
Definition: ncbiapp.cpp:1197
virtual void SetupArgDescriptions(CArgDescriptions *arg_desc)
Setup the command line argument descriptions.
Definition: ncbiapp.cpp:1208
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
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.
bool Exist(const string &name) const
Check existence of argument description.
Definition: ncbiargs.cpp:1813
#define NULL
Definition: ncbistd.hpp:225
void SetDiagPostPrefix(const char *prefix)
Specify a string to prefix all subsequent error postings with.
Definition: ncbidiag.cpp:6100
#define INFO_POST(message)
Definition: ncbidiag.hpp:201
EDiagSev SetDiagPostLevel(EDiagSev post_sev=eDiag_Error)
Set the threshold severity for posting the messages.
Definition: ncbidiag.cpp:6132
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
Definition: ncbidiag.hpp:186
void SetDiagHandler(CDiagHandler *handler, bool can_delete=true)
Set the diagnostic handler using the specified diagnostic handler class.
Definition: ncbidiag.cpp:6291
@ eDiag_Warning
Warning message.
Definition: ncbidiag.hpp:652
void Warning(CExceptionArgs_Base &args)
Definition: ncbiexpt.hpp:1191
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:773
int64_t Int8
8-byte (64-bit) signed integer
Definition: ncbitype.h:104
uint64_t Uint8
8-byte (64-bit) unsigned integer
Definition: ncbitype.h:105
bool IsEnabled(void)
Indicates whether application usage statistics collection is enabled for a current reporter instance.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
Definition: ncbistre.hpp:149
#define NcbiCerr
Definition: ncbistre.hpp:544
#define kEmptyStr
Definition: ncbistr.hpp:123
char TXChar
Definition: ncbistr.hpp:172
double Elapsed(void) const
Return time elapsed since first Start() or last Restart() call (in seconds).
Definition: ncbitime.hpp:2775
void Start(void)
Start the timer.
Definition: ncbitime.hpp:2764
#define CVersion
FILE * file
static int input()
Main class to perform a BLAST search on the local machine.
const string version
version string
Definition: variables.hpp:66
unsigned int a
Definition: ncbi_localip.c:102
EIPRangeType t
Definition: ncbi_localip.c:101
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
NOTE: This file contains work in progress and the APIs are likely to change, please do not rely on th...
static int * results[]
Declares the CRemoteBlast class.
#define BLAST_PROF_STOP(sw_name)
Definition: rtprofile.hpp:21
#define BLAST_PROF_ADD(key_name, key_val)
Definition: rtprofile.hpp:22
#define BLAST_PROF_REPORT
Definition: rtprofile.hpp:18
#define BLAST_PROF_ADD2(key_name, key_val)
Definition: rtprofile.hpp:23
#define BLAST_PROF_START(sw_name)
Definition: rtprofile.hpp:19
Configuration structure for the CBlastScopeSource.
#define _ASSERT
else result
Definition: token2.c:20
Modified on Fri Sep 20 14:58:30 2024 by modify_doxy.py rev. 669887