(
void);
90 virtual int Run(
void);
92 virtual void Exit(
void);
122 unsigned intnum_threads = (
unsigned int) (args[
kArgNumThreads].AsInteger());
129dbInfo.is_protein =
false;
131dbInfo.definition = dbInfo.name;
142 version->SetVersionInfo(
newCBlastVdbVersion);
171vector<string> paths;
196 "Must specify at least one SRA/WGS database");
218vector< CBlastFormatUtil::SDbInfo > vecDbInfo(1);
248 if(pssm.
Empty()) {
329cerr <<
"BLAST query/options error: "<< e.
GetMsg() << endl;
333cerr <<
"Command line argument error: "<< e.
GetMsg() << endl;
337cerr <<
"BLAST engine error: "<< e.
GetMsg() << endl;
343cerr <<
"Error: "<< e.
GetMsg() << endl;
346 catch(
constexception& e) {
347cerr <<
"Error: "<< e.
what() << endl;
351cerr <<
"Unknown exception occurred"<< endl;
372 #ifndef SKIP_DOXYGEN_PROCESSING 373 int main(
intargc,
const char* argv[])
Produce formatted blast output for command line applications.
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.
bool RecoverSearchStrategy(const CArgs &args, blast::CBlastAppArgs *cmdline_args)
Recover search strategy from input file.
string GetCmdlineArgs(const CNcbiArguments &a)
void LogQueryInfo(CBlastUsageReport &report, const CBlastInput &q_info)
Interface for reading SRA sequences into blast input.
CRef< CScope > GetVDBScope(string dbAllNames)
void SortAndFetchSeqData(const blast::CSearchResultSet &results, CRef< CScope > scope, CScope::TBioseqHandles &handles)
Utility functions for BLAST VDB command line applications.
const string kArgSRASearchMode
const string kArgIncludeFilteredReads
const CSeq_id * GetFirstId() const
CRef< CBlastOptionsHandle > SetOptionsForSavedStrategy(const CArgs &args)
Combine the command line arguments into a CBlastOptions object recovered from saved search strategy.
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.
CRef< CQueryOptionsArgs > GetQueryOptionsArgs() const
Get the options for the query sequence(s)
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.
string GetDatabaseName() const
Get the BLAST database name.
Defines BLAST error codes (user errors included)
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 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 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.
void SetQueryLocalIdMode()
Append query-specific prefix codes to all generated local ids.
Generalized converter from an abstract source of biological sequence data to collections of blast inp...
Encapsulates ALL the BLAST algorithm's options.
void AddParam(EUsageParams p, int val)
void DebugDumpText(ostream &out, const string &bundle, unsigned int depth) 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.
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?
Defines user input exceptions.
static string PreprocessDBs(CLocalVDBBlast::SLocalVDBStruct &local_vdb, const string db_names, unsigned int num_threads=kDisableThreadedSearch, ESRASearchMode seach_mode=eAligned)
CRef< CSearchResultSet > Run()
NCBI C++ Object Manager dependant implementation of IQueryFactory.
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)
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.
Handles command line arguments for blastx binary.
virtual int GetQueryBatchSize() const
Get the query batch size.
CRef< objects::CPssmWithParameters > GetInputPssm() const
Get the PSSM.
static void FindVDBPaths(const string &dbname, bool isProtein, vector< string > &paths, vector< string > *db_alias_list=NULL, vector< string > *vdb_alias_list=NULL, bool recursive=true, bool expand_links=true, bool verify_dbs=true)
Get the list of vdb names.
static Uint4 SetupVDBManager()
*Note* Call this in main thread first, if you are going to instantiate this object or use any of the ...
static void ReleaseVDBManager()
Call this release vdb manager if SetupManger has been explicitly called in the main thread.
void x_GetFullVDBPaths(void)
CVDBTblastnApp()
Constructor, sets up the version info.
CLocalVDBBlast::SLocalVDBStruct m_localVDBStruct
virtual void Init(void)
Initialize the application.
virtual void Exit(void)
Cleanup on application exit.
virtual int Run(void)
Run the application.
void x_FillVDBInfo(CBlastFormatUtil::SDbInfo &vecDbInfo)
CRef< CTblastnVdbAppArgs > m_CmdLineArgs
This application's command line arguments.
CRef< CScope > x_GetScope(void)
CBlastUsageReport m_UsageReport
void x_SetupLocalVDBSearch()
const string kArgOutput
Output file name.
const string kArgDb
BLAST database name.
const string kArgNumThreads
Argument to determine the number of threads to use when running BLAST.
void Print(const CCompactSAMApplication::AlignInfo &ai)
const CBlastOptions & GetOptions() const
Return the object which this object is a handle for.
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.
CNcbiEnvironment & SetEnvironment(void)
Get a non-const copy of the application's cached environment.
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.
EDiagSev SetDiagPostLevel(EDiagSev post_sev=eDiag_Error)
Set the threshold severity for posting the messages.
void SetDiagStream(CNcbiOstream *os, bool quick_flush=true, FDiagCleanup cleanup=0, void *cleanup_data=0, const string &stream_name="")
Set diagnostic stream.
@ eDS_Default
Try standard log file (app.name + ".log") in /log/, use stderr on failure.
@ eDiag_Warning
Warning message.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
const string & GetMsg(void) const
Get message string.
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
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...
vector< CBioseq_Handle > TBioseqHandles
void Reset(void)
Reset reference object.
bool Empty(void) const THROWS_NONE
Check if CRef is empty â not pointing to any object, which means having a null value.
bool IsEnabled(void)
Indicates whether application usage statistics collection is enabled for a current reporter instance.
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
double Elapsed(void) const
Return time elapsed since first Start() or last Restart() call (in seconds).
void Start(void)
Start the timer.
const TSeq & GetSeq(void) const
Get the variant data.
bool IsSeq(void) const
Check if variant Seq is selected.
unsigned int
A callback function used to compare two keys in a database.
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.
Configuration structure for the CBlastScopeSource.
void OptimizeForWholeLargeSequenceRetrieval(bool value=true)
Configures the BLAST database data loader to optimize the retrieval of *entire* large sequences.
#define BLAST_SRA_UNKNOWN_ERROR
Exit code for all other errors and unknown exceptions.
#define BLAST_SRA_EXIT_SUCCESS
Exit code for successful completion of the Blast search.
#define BLAST_SRA_ENGINE_ERROR
Exit code for a Blast engine-related error.
#define BLAST_SRA_INPUT_ERROR
Exit code for a Blast input error (in query/options).
int main(int argc, const char *argv[])
Defines database alias file access classes.
Declares the CLocalVDBBlast class.
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