68 virtual int Run(
void);
84 arg_desc->SetUsageContext(
GetArguments().GetProgramBasename(),
"BLAST demo program");
87 (
"program",
"ProgramName",
88 "One of blastn, megablast, disc_megablast, blastp, blastx, tblastn, tblastx, rpsblast",
91 arg_desc->SetConstraint
93 "blastn",
"megablast",
"disc_megablast",
"blastp",
"blastx",
"tblastn",
"tblastx",
"rpsblast"));
95 arg_desc->AddDefaultKey(
"db",
"DataBase",
98 arg_desc->AddDefaultKey(
"in",
"Queryfile",
101 arg_desc->AddDefaultKey(
"parse",
"parse",
"Parse FASTA defline",
104 arg_desc->AddDefaultKey(
"out",
"Outputfile",
107 arg_desc->AddDefaultKey(
"evalue",
"evalue",
110 arg_desc->AddDefaultKey(
"penalty",
"penalty",
"Penalty score for a mismatch",
113 arg_desc->AddDefaultKey(
"reward",
"reward",
"Reward score for a match",
116 arg_desc->AddDefaultKey(
"matrix",
"matrix",
"Scoring matrix name",
119 arg_desc->AddDefaultKey(
"hitsize",
"hitsize",
"Hitlist size",
136 if(args[
"evalue"].AsDouble())
139 if(args[
"hitsize"].AsInteger() && args[
"hitsize"].AsInteger() > 0)
152 if (args[
"reward"].AsInteger())
153 nucl_handle->SetMatchReward(args[
"reward"].AsInteger());
155 if (args[
"penalty"].AsInteger())
156 nucl_handle->SetMismatchPenalty(args[
"penalty"].AsInteger());
162 prot_handle->SetMatrixName(args[
"matrix"].AsString().c_str());
179 bool db_is_aa = (program ==
eBlastp ||
195 throw std::runtime_error(
"Could not initialize object manager");
218 bool status = blaster.SubmitSync();
221 throw std::runtime_error(
"No results returned by SubmitSync");
223 cerr <<
"RID: " << blaster.GetRID() <<
'\n';
228 for (
unsigned int i = 0;
i <
results.GetNumResults();
i++) {
249 #ifndef SKIP_DOXYGEN_PROCESSING
Contains C++ wrapper classes to structures in algo/blast/core as well as some auxiliary functions to ...
Declares the CBlastNucleotideOptionsHandle class.
Declares class to encapsulate all BLAST options.
Declares the CBlastOptionsHandle and CBlastOptionsFactory classes.
Boolean Blast_QueryIsProtein(EBlastProgramType p)
Returns true if the query is protein.
Declares the CBlastProteinOptionsHandle class.
Definitions of special type used in BLAST.
EProgram
This enumeration is to evolve into a task/program specific list that specifies sets of default parame...
@ eRPSBlast
protein-pssm (reverse-position-specific BLAST)
@ eBlastp
Protein-Protein.
@ eRPSTblastn
nucleotide-pssm (RPS blast with translated query)
@ eBlastx
Translated nucl-Protein.
void ProcessCommandLineArgs(CRef< CBlastOptionsHandle > opts_handle)
virtual int Run(void)
Run the application.
virtual int Run(void)
Run the application.
virtual void Exit(void)
Cleanup on application exit.
virtual void Init(void)
Initialize the application.
virtual void Init(void)
Initialize the application.
virtual void Exit(void)
Cleanup on application exit.
Handle to the nucleotide-nucleotide options to the BLAST algorithm.
@ eRemote
To be used when running BLAST remotely.
Handle to the protein-protein options to the BLAST algorithm.
NCBI C++ Object Manager dependant implementation of IQueryFactory.
API for Remote Blast Requests.
Search Results for All Queries.
std::ofstream out("events_result.xml")
main entry point for tests
void SetEvalueThreshold(double eval)
Sets EvalueThreshold.
static CBlastOptionsHandle * Create(EProgram program, EAPILocality locality=CBlastOptions::eLocal)
Creates an options handle object configured with default options for the requested program,...
void SetHitlistSize(int s)
Sets HitlistSize.
EProgram ProgramNameToEnum(const std::string &program_name)
Map a string into an element of the ncbi::blast::EProgram enumeration (except eBlastProgramMax).
@ eBlastDbIsNucleotide
nucleotide
@ eBlastDbIsProtein
protein
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.
virtual void SetupArgDescriptions(CArgDescriptions *arg_desc)
Setup the command line argument descriptions.
const CNcbiArguments & GetArguments(void) const
Get the application's cached unprocessed command-line arguments.
@ eInputFile
Name of file (must exist and be readable)
@ eBoolean
{'true', 't', 'false', 'f'}, case-insensitive
@ eDouble
Convertible into a floating point number (double)
@ eString
An arbitrary string.
@ eOutputFile
Name of file (must be writable)
@ eInteger
Convertible into an integer number (int or Int8)
#define MSerial_AsnText
I/O stream manipulators –.
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
Main class to perform a BLAST search on the local machine.
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
Defines command line argument related classes.
Defines unified interface to application:
NOTE: This file contains work in progress and the APIs are likely to change, please do not rely on th...
Declares the CRemoteBlast class.
int NcbiSys_main(int argc, ncbi::TXChar *argv[])
Definition of SSeqLoc structure.
vector< SSeqLoc > TSeqLocVector
Vector of sequence locations.
Configuration structure for the CBlastScopeSource.