46 #ifndef SKIP_DOXYGEN_PROCESSING
98 const Int8 kMT1MaxDbSz_Blastp = 740000000;
99 const Int8 kMT1MinQSz_Blastp = 200000;
101 const Int8 kMT1MaxDbSz_BlastpFast = 2500000000;
102 const Int8 kMT1MinQSz_BlastpFast = 200000;
106 max_db_size = kMT1MaxDbSz_BlastpFast;
107 min_q_size = kMT1MinQSz_BlastpFast;
110 max_db_size = kMT1MaxDbSz_Blastp;
111 min_q_size = kMT1MinQSz_Blastp;
142 Int8 max_db_size = 0;
148 if (total_length < max_db_size) {
151 if (
file.GetLength() > min_q_size) {
159 if (total_length > max_db_size) {
222 if(!isArchiveFormat) {
344 if (!
input.AtEOF()) {
345 if (!master_node.
IsFull()) {
348 int num_q =
input.GetQueryBatch(qb, q_index);
381 #ifndef SKIP_DOXYGEN_PROCESSING
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.
static void s_GetMT1Cutoffs(const int word_size, Int8 &max_db_size, Int8 &min_q_size)
int NcbiSys_main(int argc, ncbi::TXChar *argv[])
Main argument class for BLASTP application.
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.
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.
CRef< CSearchDatabase > GetSearchDatabase() const
Retrieve the search database information.
string GetDatabaseName() const
Get the BLAST database name.
CConditionVariable & GetBuzzer()
void RegisterNode(CBlastNode *node, CBlastNodeMailbox *mailbox)
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.
Handles command line arguments for blastp binary.
virtual int GetQueryBatchSize() const
@inheritDoc
virtual void Init()
@inheritDoc
CBlastAppDiagHandler m_Bah
CBlastUsageReport m_UsageReport
CRef< CBlastOptionsHandle > m_OptsHndl
virtual int Run()
@inheritDoc
int x_RunMTBySplitQuery()
CRef< CBlastpAppArgs > m_CmdLineArgs
This application's command line args.
void DebugDumpText(ostream &out, const string &bundle, unsigned int depth) const
Class to perform a BLAST search on local BLAST databases Note that PHI-BLAST can be run using this cl...
NCBI C++ Object Manager dependant implementation of IQueryFactory.
objects::ENa_strand GetStrand() const
Get strand to search in query sequence(s)
bool GetParseDeflines() const
Should the defline be parsed?
bool QueryIsProtein() const
Is the query sequence protein?
TSeqRange GetRange() const
Get query sequence range restriction.
bool UseLowercaseMasks() const
Use lowercase masking in FASTA input?
Search Results for All Queries.
Uint8 GetTotalLength() const
Returns the sum of the lengths of all available sequences.
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.
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.
const char * GetMatrixName() const
list< CRef< objects::CBlast4_error > > & GetMessages(void)
Return list of saved diag messages.
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.
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.
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.
void SetDiagPostPrefix(const char *prefix)
Specify a string to prefix all subsequent error postings with.
#define INFO_POST(message)
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.
void SetDiagHandler(CDiagHandler *handler, bool can_delete=true)
Set the diagnostic handler using the specified diagnostic handler class.
@ eDiag_Warning
Warning message.
void Warning(CExceptionArgs_Base &args)
void Reset(void)
Reset reference object.
int64_t Int8
8-byte (64-bit) signed integer
uint64_t Uint8
8-byte (64-bit) unsigned integer
bool IsEnabled(void)
Indicates whether application usage statistics collection is enabled for a current reporter instance.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
double Elapsed(void) const
Return time elapsed since first Start() or last Restart() call (in seconds).
void Start(void)
Start the timer.
Main class to perform a BLAST search on the local machine.
const string version
version string
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 the CRemoteBlast class.
#define BLAST_PROF_STOP(sw_name)
#define BLAST_PROF_ADD(key_name, key_val)
#define BLAST_PROF_REPORT
#define BLAST_PROF_ADD2(key_name, key_val)
#define BLAST_PROF_START(sw_name)
Configuration structure for the CBlastScopeSource.