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

Go to the SVN repository for this file.

1 /* $Id: tblastn_app.cpp 101373 2023-12-07 13:17:03Z fongah2 $
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 tblastn_app.cpp
31  * TBLASTN command line application
32  */
33 
34 #include <ncbi_pch.hpp>
35 #include <corelib/ncbiapp.hpp>
43 #include "blast_app_util.hpp"
44 #include "tblastn_node.hpp"
45 
46 #ifndef SKIP_DOXYGEN_PROCESSING
48 USING_SCOPE(blast);
50 #endif
51 
53 {
54 public:
57  version->SetVersionInfo(new CBlastVersion());
60  if (m_UsageReport.IsEnabled()) {
62  }
63  }
64 
67  }
68 private:
69  /** @inheritDoc */
70  virtual void Init();
71  /** @inheritDoc */
72  virtual int Run();
73 
74  int x_RunMTBySplitDB();
75  int x_RunMTBySplitQuery();
76 
77  /// This application's command line args
83 };
84 
86 {
87  // formulate command line arguments
89  // read the command line
92 }
93 
94 //To Do: Still need db sz numbers
95 static void s_GetMT1Cutoffs(const int word_size, Int8 & max_db_size, Int8 & min_q_size)
96 {
97  const Int8 kMT1MaxDbSz_Tblastn = 280000000;
98  const Int8 kMT1MinQSz_Tblastn = 200000;
99 
100  const Int8 kMT1MaxDbSz_TblastnFast = 350000000;
101  const Int8 kMT1MinQSz_TblastnFast = 200000;
102 
103  if (word_size > 4) {
104  // CompressedAa
105  max_db_size = kMT1MaxDbSz_TblastnFast;
106  min_q_size = kMT1MinQSz_TblastnFast;
107  }
108  else {
109  max_db_size = kMT1MaxDbSz_Tblastn;
110  min_q_size = kMT1MinQSz_Tblastn;
111  }
112 }
113 
115 {
116  int status = BLAST_EXIT_SUCCESS;
117  const CArgs& args = GetArgs();
118  //Check to see if search should split by queries
119  try {
121  SetDiagPostPrefix("tblastn");
122  SetDiagHandler(&m_Bah, false);
125  }
126  else {
128  }
129  int num_threads = m_CmdLineArgs->GetNumThreads();
130  int mt_mode = m_CmdLineArgs->GetMTMode();
131  if (!m_CmdLineArgs->ExecuteRemotely() && (num_threads > 1) &&
132  (mt_mode != CMTArgs::eSplitByDB)){
135  if (db_args->GetDatabaseName() != kEmptyStr) {
136  int word_size = m_OptsHndl->GetOptions().GetWordSize();
137  Int8 max_db_size = 0;
138  Int8 min_q_size = 0;
139  s_GetMT1Cutoffs(word_size, max_db_size, min_q_size);
140  CRef<CSeqDB> seqdb = sdb->GetSeqDb();
141  Uint8 total_length = seqdb->GetTotalLength();
142  if (mt_mode == CMTArgs::eSplitAuto){
143  if (total_length < max_db_size) {
144  if (args.Exist(kArgQuery) && args[kArgQuery].HasValue()) {
145  CFile file( args[kArgQuery].AsString());
146  if (file.GetLength() > min_q_size) {
148  return x_RunMTBySplitQuery();
149  }
150  }
151  }
152  }
153  else {
154  if (total_length > max_db_size) {
155  MTByQueries_DBSize_Warning(max_db_size, false);
156  }
157  }
158  }
159 
160  }
161 
162  if ((mt_mode == CMTArgs::eSplitByQueries) && (num_threads > 1)){
164  return x_RunMTBySplitQuery();
165  }
166  else {
167  return x_RunMTBySplitDB();
168  }
169  } CATCH_ALL(status)
170  if(!m_Bah.GetMessages().empty()) {
172  }
173  return status;
174 }
175 
177 {
178  int status = BLAST_EXIT_SUCCESS;
179 
180  try {
181 
182  /*** Get the BLAST options ***/
183  const CArgs& args = GetArgs();
184  const CBlastOptions& opt = m_OptsHndl->GetOptions();
185  CRef<CQueryOptionsArgs> query_opts =
187 
188  /*** Initialize the database/subject ***/
190  CRef<CLocalDbAdapter> db_adapter;
193  db_adapter, scope);
194  _ASSERT(db_adapter && scope);
195 
196  /*** Get the query sequence(s) or PSSM (these two options are mutually
197  * exclusive) ***/
201  SDataLoaderConfig dlconfig =
203  db_adapter);
204 
206  CRef<IQueryFactory> query_factory;
207 
208  if (pssm.Empty()) {
209  CBlastInputSourceConfig iconfig(dlconfig, query_opts->GetStrand(),
210  query_opts->UseLowercaseMasks(),
211  query_opts->GetParseDeflines(),
212  query_opts->GetRange());
214  ERR_POST(Warning << "Query is Empty!");
215  return BLAST_EXIT_SUCCESS;
216  }
217  fasta.Reset(new CBlastFastaInputSource(
219  iconfig));
220  input.Reset(new CBlastInput(&*fasta,
222  } else {
223  _ASSERT(pssm->HasQuery());
224  _ASSERT(pssm->GetQuery().IsSeq());
225  query.Reset(new CBlastQueryVector());
226  scope->AddTopLevelSeqEntry(pssm->SetQuery());
227 
228  CRef<CSeq_loc> sl(new CSeq_loc());
229  sl->SetWhole().Assign(*pssm->GetQuery().GetSeq().GetFirstId());
230 
231  CRef<CBlastSearchQuery> q(new CBlastSearchQuery(*sl, *scope));
232  query->AddQuery(q);
233  _ASSERT(query.NotEmpty());
234  }
235 
236  /*** Get the formatting options ***/
238  bool isArchiveFormat = fmt_args->ArchiveFormatRequested(args);
239  if(!isArchiveFormat) {
241  }
242  CBlastFormat formatter(opt, *db_adapter,
243  fmt_args->GetFormattedOutputChoice(),
244  query_opts->GetParseDeflines(),
246  fmt_args->GetNumDescriptions(),
247  fmt_args->GetNumAlignments(),
248  *scope,
249  opt.GetMatrixName(),
250  fmt_args->ShowGis(),
251  fmt_args->DisplayHtmlOutput(),
252  opt.GetQueryGeneticCode(),
253  opt.GetDbGeneticCode(),
254  opt.GetSumStatisticsMode(),
256  db_adapter->GetFilteringAlgorithm(),
257  fmt_args->GetCustomOutputFormatSpec(),
258  false, false, NULL, NULL,
260  GetSubjectFile(args));
261 
262  formatter.SetQueryRange(query_opts->GetRange());
263  formatter.SetLineLength(fmt_args->GetLineLength());
264  formatter.SetHitsSortOption(fmt_args->GetHitsSortOption());
265  formatter.SetHspsSortOption(fmt_args->GetHspsSortOption());
266  formatter.SetCustomDelimiter(fmt_args->GetCustomDelimiter());
267  if(UseXInclude(*fmt_args, args[kArgOutput].AsString())) {
268  formatter.SetBaseFile(args[kArgOutput].AsString());
269  }
270  formatter.PrintProlog();
271 
272  /*** Process the input ***/
273  CRef<CSearchResultSet> results;
274  if (pssm.Empty()) {
275  for (; !input->End(); formatter.ResetScopeHistory(), QueryBatchCleanup()) {
276 
277  query = input->GetNextSeqBatch(*scope);
278  query_factory.Reset(new CObjMgr_QueryFactory(*query));
279 
280  SaveSearchStrategy(args, m_CmdLineArgs, query_factory, m_OptsHndl);
281 
283  CRef<CRemoteBlast> rmt_blast =
284  InitializeRemoteBlast(query_factory, db_args, m_OptsHndl,
287  results = rmt_blast->GetResultSet();
288  } else {
289  CLocalBlast lcl_blast(query_factory, m_OptsHndl, db_adapter);
291  results = lcl_blast.Run();
292  }
293 
294  if (fmt_args->ArchiveFormatRequested(args)) {
295  formatter.WriteArchive(*query_factory, *m_OptsHndl, *results, 0, m_Bah.GetMessages());
297  } else {
298  BlastFormatter_PreFetchSequenceData(*results, scope,
299  fmt_args->GetFormattedOutputChoice());
300  ITERATE(CSearchResultSet, result, *results) {
301  formatter.PrintOneResultSet(**result, query);
302  }
303  }
304  }
305 
306  } else {
307  SaveSearchStrategy(args, m_CmdLineArgs, query_factory, m_OptsHndl, pssm);
308 
310 
311  CRef<CRemoteBlast> rmt_psiblast =
312  InitializeRemoteBlast(query_factory, db_args, m_OptsHndl,
314  m_CmdLineArgs->GetClientId(), pssm);
315 
316  results = rmt_psiblast->GetResultSet();
317 
318  } else {
319 
321  (dynamic_cast <CPSIBlastOptionsHandle *> (&*m_OptsHndl));
322  _ASSERT(psi_opts.NotEmpty());
323 
324  CRef<CPsiBlast> psiblast(new CPsiBlast(pssm, db_adapter, psi_opts));
326 
327  results = psiblast->Run();
328  }
329 
330  if (fmt_args->ArchiveFormatRequested(args)) {
331  formatter.WriteArchive(*query_factory, *m_OptsHndl, *results, 0, m_Bah.GetMessages());
333  } else {
334  BlastFormatter_PreFetchSequenceData(*results, scope,
335  fmt_args->GetFormattedOutputChoice());
336  ITERATE(CSearchResultSet, result, *results) {
337  formatter.PrintOneResultSet(**result, query);
338  }
339  }
340  }
341 
342  formatter.PrintEpilog(opt);
343 
345  m_OptsHndl->GetOptions().DebugDumpText(NcbiCerr, "BLAST options", 1);
346  }
347  if (input) {
349  }
351  } CATCH_ALL(status)
352  if(!m_Bah.GetMessages().empty()) {
353  const CArgs & a = GetArgs();
355  }
356 
360  return status;
361 }
363 {
364  int status = BLAST_EXIT_SUCCESS;
365 
366  try {
367  const CArgs& args = GetArgs();
369  ERR_POST(Warning << "Query is Empty!");
370  return BLAST_EXIT_SUCCESS;
371  }
372  CNcbiOstream & out_stream = m_CmdLineArgs->GetOutputStream();
373  const int kMaxNumOfThreads = m_CmdLineArgs->GetNumThreads();
374  CBlastMasterNode master_node(out_stream, kMaxNumOfThreads);
375 
378 
379  int chunk_num = 0;
380  int batch_size = GetMTByQueriesBatchSize(m_OptsHndl->GetOptions().GetProgram(), kMaxNumOfThreads);
381  INFO_POST("Batch Size: " << batch_size);
383  while (master_node.Processing()) {
384  if (!input.AtEOF()) {
385  if (!master_node.IsFull()) {
386  string qb;
387  int q_index = 0;
388  int num_q = input.GetQueryBatch(qb, q_index);
389  if (num_q > 0) {
390  CBlastNodeMailbox * mb(new CBlastNodeMailbox(chunk_num, master_node.GetBuzzer()));
391  CTblastnNode * t(new CTblastnNode(chunk_num, GetArguments(), args, m_Bah, qb, q_index, num_q, mb));
392  master_node.RegisterNode(t, mb);
393  chunk_num ++;
394  }
395  }
396  }
397  else {
398  master_node.Shutdown();
399  }
400  }
401 
406 
407  } CATCH_ALL (status)
408 
409  if(!m_Bah.GetMessages().empty()) {
410  const CArgs & a = GetArgs();
412  }
416  return status;
417 }
418 
419 
420 #ifndef SKIP_DOXYGEN_PROCESSING
421 int NcbiSys_main(int argc, ncbi::TXChar* argv[])
422 {
423  return CTblastnApp().AppMain(argc, argv);
424 }
425 #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.
CArgs –.
Definition: ncbiargs.hpp:379
const CSeq_id * GetFirstId() const
Definition: Bioseq.cpp:271
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:936
string GetDatabaseName() const
Get the BLAST database name.
Definition: blast_args.hpp:931
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.
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.
Query Vector.
Definition: sseqloc.hpp:276
Search Query.
Definition: sseqloc.hpp:147
void AddParam(EUsageParams p, int val)
Keeps track of the version of the BLAST engine in the NCBI C++ toolkit.
Definition: version.hpp:53
void DebugDumpText(ostream &out, const string &bundle, unsigned int depth) const
Definition: ddumpable.cpp:56
CFile –.
Definition: ncbifile.hpp:1604
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.
Handle to the protein-protein options to the BLAST algorithm.
Runs a single iteration of the PSI-BLAST algorithm on a BLAST database.
Definition: psiblast.hpp:79
const CSeq_entry & GetQuery() const
Retrieve the query sequence.
CSeq_entry & SetQuery()
Retrieve the query sequence.
bool HasQuery() const
Has this PSSM a query in it?
objects::ENa_strand GetStrand() const
Get strand to search in query sequence(s)
Definition: blast_args.hpp:800
bool GetParseDeflines() const
Should the defline be parsed?
Definition: blast_args.hpp:804
bool QueryIsProtein() const
Is the query sequence protein?
Definition: blast_args.hpp:807
TSeqRange GetRange() const
Get query sequence range restriction.
Definition: blast_args.hpp:796
bool UseLowercaseMasks() const
Use lowercase masking in FASTA input?
Definition: blast_args.hpp:802
CRef –.
Definition: ncbiobj.hpp:618
CScope –.
Definition: scope.hpp:92
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:1938
Handles command line arguments for Tblastn binary.
virtual int GetQueryBatchSize() const
Get the query batch size.
CRef< objects::CPssmWithParameters > GetInputPssm() const
Get the PSSM.
CBlastUsageReport m_UsageReport
Definition: tblastn_app.cpp:80
CStopWatch m_StopWatch
Definition: tblastn_app.cpp:81
int x_RunMTBySplitQuery()
int x_RunMTBySplitDB()
virtual int Run()
@inheritDoc
CRef< CTblastnAppArgs > m_CmdLineArgs
This application's command line args.
Definition: tblastn_app.cpp:78
CRef< CBlastOptionsHandle > m_OptsHndl
Definition: tblastn_app.cpp:82
virtual void Init()
@inheritDoc
Definition: tblastn_app.cpp:85
CBlastAppDiagHandler m_Bah
Definition: tblastn_app.cpp:79
const string kArgOutput
Output file name.
const string kArgQuery
Query sequence(s)
void Print(const CCompactSAMApplication::AlignInfo &ai)
CRef< CSearchResultSet > Run()
Run the PSI-BLAST engine for one iteration.
Definition: psiblast.cpp:95
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.
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.
void DoNotSaveMessages(void)
Call to turn off saving diag message, discard all saved message.
Definition: blast_aux.cpp:1189
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:1174
void HideStdArgs(THideStdArgs hide_mask)
Set the hide mask for the Hide Std Flags.
Definition: ncbiapp.cpp:1312
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:819
CVersionInfo GetVersion(void) const
Get the program version information.
Definition: ncbiapp.cpp:1184
virtual void SetupArgDescriptions(CArgDescriptions *arg_desc)
Setup the command line argument descriptions.
Definition: ncbiapp.cpp:1195
#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:6097
#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:6129
#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:6288
@ eDiag_Warning
Warning message.
Definition: ncbidiag.hpp:652
void Warning(CExceptionArgs_Base &args)
Definition: ncbiexpt.hpp:1191
void SetWhole(TWhole &v)
Definition: Seq_loc.hpp:982
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...
Definition: scope.cpp:522
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:773
bool NotEmpty(void) const THROWS_NONE
Check if CRef is not empty – pointing to an object and has a non-null value.
Definition: ncbiobj.hpp:726
bool Empty(void) const THROWS_NONE
Check if CRef is empty – not pointing to any object, which means having a null value.
Definition: ncbiobj.hpp:719
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:2776
void Start(void)
Start the timer.
Definition: ncbitime.hpp:2765
#define CVersion
const TSeq & GetSeq(void) const
Get the variant data.
Definition: Seq_entry_.cpp:102
bool IsSeq(void) const
Check if variant Seq is selected.
Definition: Seq_entry_.hpp:257
FILE * file
static int input()
Main class to perform a BLAST search on the local machine.
static int version
Definition: mdb_load.c:29
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...
Declares CPsiBlast, the C++ API for the PSI-BLAST engine.
Declares the CRemoteBlast class.
Configuration structure for the CBlastScopeSource.
static string query
static void s_GetMT1Cutoffs(const int word_size, Int8 &max_db_size, Int8 &min_q_size)
Definition: tblastn_app.cpp:95
USING_SCOPE(blast)
int NcbiSys_main(int argc, ncbi::TXChar *argv[])
USING_NCBI_SCOPE
Definition: tblastn_app.cpp:47
Main argument class for TBLASTN application.
#define _ASSERT
else result
Definition: token2.c:20
Modified on Sun Apr 21 03:38:33 2024 by modify_doxy.py rev. 669887