62 : m_DefaultsMode(
false)
201 "eBlastNotSet may not be used as argument");
217 retval.
insert(
"blastn-short");
218 retval.
insert(
"megablast");
219 retval.
insert(
"dc-megablast");
220 retval.
insert(
"vecscreen");
222 retval.
insert(
"rmblastn");
227 retval.
insert(
"blastp-short");
228 retval.
insert(
"blastp-fast");
232 if (choice ==
eAll) {
233 retval.
insert(
"psiblast");
235 retval.
insert(
"phiblastp");
236 retval.
insert(
"rpsblast");
237 retval.
insert(
"rpstblastn");
239 retval.
insert(
"blastx-fast");
240 retval.
insert(
"deltablast");
242 retval.
insert(
"tblastn-fast");
243 retval.
insert(
"psitblastn");
261 string task(task_name);
265 if (task ==
"blastn") {
266 retval.assign(
"Traditional BLASTN requiring an exact match of 11");
267 }
else if (task ==
"blastn-short") {
268 retval.assign(
"BLASTN program optimized for sequences shorter than ");
269 retval +=
"50 bases";
270 }
else if (task ==
"vecscreen") {
271 retval.assign(
"BLASTN with several options re-set for running VecScreen");
272 }
else if (task ==
"rmblastn") {
273 retval.assign(
"BLASTN with complexity adjusted scoring and masklevel");
274 retval +=
"filtering";
275 }
else if (task ==
"blastp") {
276 retval.assign(
"Traditional BLASTP to compare a protein query to a ");
277 retval +=
"protein database";
278 }
else if (task ==
"blastp-short") {
279 retval.assign(
"BLASTP optimized for queries shorter than 30 residues");
280 }
else if (task ==
"blastp-fast") {
281 retval.assign(
"BLASTP optimized for faster runtime");
282 }
else if (task ==
"blastx") {
283 retval.assign(
"Search of a (translated) nucleotide query against a ");
284 retval +=
"protein database";
285 }
else if (task ==
"blastx-fast") {
286 retval.assign(
"Search of a (translated) nucleotide query against a ");
287 retval +=
"protein database with parameters optimized for faster runtime";
288 }
else if (task ==
"dc-megablast") {
289 retval.assign(
"Discontiguous megablast used to find more distant ");
290 retval +=
"(e.g., interspecies) sequences";
291 }
else if (task ==
"megablast") {
292 retval.assign(
"Traditional megablast used to find very similar ");
293 retval +=
"(e.g., intraspecies or closely related species) sequences";
295 retval.assign(
"Limits BLASTP search to those subjects with a ");
296 retval +=
"pattern matching one in the query";
297 }
else if (task ==
"psiblast") {
298 retval.assign(
"PSIBLAST that searches a (protein) profile against ");
299 retval +=
"a protein database";
300 }
else if (task ==
"rpsblast") {
301 retval.assign(
"Search of a protein query against a database of motifs");
302 }
else if (task ==
"rpstblastn") {
303 retval.assign(
"Search of a (translated) nucleotide query against ");
304 retval.append(
"a database of motifs");
305 }
else if (task ==
"tblastn") {
306 retval.assign(
"Search of a protein query against a (translated) ");
307 retval +=
"nucleotide database";
308 }
else if (task ==
"tblastn-fast") {
309 retval.assign(
"Search of a protein query against a (translated) ");
310 retval +=
"nucleotide database with parameters optimized for faster runtime";
311 }
else if (task ==
"psitblastn") {
312 retval.assign(
"Search of a PSSM against a (translated) ");
313 retval +=
"nucleotide database";
314 }
else if (task ==
"tblastx") {
315 retval.assign(
"Search of a (translated) nucleotide query against ");
316 retval +=
"a (translated) nucleotide database";
317 }
else if (task ==
"deltablast") {
318 retval.assign(
"DELTA-BLAST builds profile using conserved domain ");
319 retval +=
"and uses this profile to search protein database";
320 }
else if (task ==
"mapper") {
321 retval.assign(
"Map short reads to a genome");
322 }
else if (task ==
"mapr2g") {
323 retval.assign(
"Map RNA-seq sequence to a genome");
324 }
else if (task ==
"mapr2r") {
325 retval.assign(
"Map RNA-seq sequences to an mRNA database");
326 }
else if (task ==
"mapg2g") {
327 retval.assign(
"Map genomic reads to a genome");
328 }
else if (task ==
"kblastp") {
329 retval.assign(
"Kmer screenign followed by BLASTP");
331 retval.assign(
"Unknown task");
388 if (task ==
"blastp-short") {
395 }
else if (task ==
"blastp-fast") {
429 if (task ==
"blastx-fast") {
442 if(task ==
"tblastn-fast") {
Declares the CBlastAdvancedProteinOptionsHandle class.
Declares the BLAST exception class.
Declares the CBlastNucleotideOptionsHandle class.
#define BLAST_WORD_THRESHOLD_BLASTP_FAST
@ eCompressedAaLookupTable
compressed alphabet (blastp) lookup table
Declares the CBlastOptionsHandle and CBlastOptionsFactory classes.
Declares the CBlastProteinOptionsHandle class.
Declares the CBlastRPSOptionsHandle class.
EProgram
This enumeration is to evolve into a task/program specific list that specifies sets of default parame...
@ eBlastNotSet
Not yet set.
@ eVecScreen
Vector screening.
@ eTblastx
Translated nucl-Translated nucl.
@ eBlastn
Nucl-Nucl (traditional blastn)
@ eRPSBlast
protein-pssm (reverse-position-specific BLAST)
@ ePHIBlastn
Nucleotide PHI BLAST.
@ eBlastp
Protein-Protein.
@ ePHIBlastp
Protein PHI BLAST.
@ eMapper
Jumper alignment for mapping.
@ eTblastn
Protein-Translated nucl.
@ eMegablast
Nucl-Nucl (traditional megablast)
@ eDeltaBlast
Delta Blast.
@ ePSITblastn
PSI Tblastn.
@ eKBlastp
KMER screening and BLASTP.
@ eDiscMegablast
Nucl-Nucl using discontiguous megablast.
@ eRPSTblastn
nucleotide-pssm (RPS blast with translated query)
@ eBlastx
Translated nucl-Protein.
Declares the CBlastpKmerOptionsHandle class.
Declares the CBlastxOptionsHandle class.
Handle to the Advanced BLASTP options.
Defines BLAST error codes (user errors included)
Handle to the nucleotide-nucleotide options to the BLAST algorithm.
Handle to the options to the BLAST algorithm.
Encapsulates ALL the BLAST algorithm's options.
EAPILocality
Enumerates the possible contexts in which objects of this type can be used.
@ eRemote
To be used when running BLAST remotely.
Handle to the rpsblast options to the BLAST algorithm.
Handle to the KMER BLASTP options.
Handle to the translated nucleotide-protein options to the BLAST algorithm.
Handle to the protein-protein options to the BLAST algorithm.
Handle to the nucleotide-nucleotide options to the discontiguous BLAST algorithm.
Handle to the nucleotide mapping options to the BLAST algorithm.
Handle to the nuclein PHI BLAST options.
Handle to the protein PHI BLAST options.
Handle to the protein-protein options to the BLAST algorithm.
Handle to the options for translated nucleotide-RPS blast.
Handle to the protein-translated nucleotide options to the BLAST algorithm.
Handle to the translated nucleotide-translated nucleotide options to the BLAST algorithm.
iterator_bool insert(const value_type &val)
Declares the CDeltaBlastOptionsHandle class.
Declares the CDiscNucleotideOptionsHandle class.
void SetGapExtensionCost(int e)
Sets GapExtensionCost.
void SetEvalueThreshold(double eval)
Sets EvalueThreshold.
void SetWordThreshold(double wt)
Sets WordThreshold.
virtual void SetScoringOptionsDefaults()=0
Sets ScoringOptionsDefaults.
void SetWordSize(int ws)
Sets WordSize.
EAPILocality GetLocality() const
Return the locality used when the object was created.
virtual void SetLookupTableDefaults()=0
Sets LookupTableDefaults.
void SetMatchReward(int r)
Sets MatchReward.
virtual void SetSubjectSequenceOptionsDefaults()=0
Sets SubjectSequenceOptionsDefaults.
virtual void SetGappedExtensionDefaults()=0
Sets GappedExtensionDefaults.
static string GetDocumentation(const string &task_name)
Return the documentation for the provided task.
void SetChaining(bool ch)
Enables/disables chaining.
void SetGapOpeningCost(int g)
Sets GapOpeningCost.
virtual void SetQueryOptionDefaults()=0
Sets QueryOptionDefaults.
CBlastOptionsHandle(EAPILocality locality)
Default c-tor.
CRef< CBlastOptions > m_Opts
Data type this class controls access to.
void SetVecScreenDefaults()
Sets default options for VecScreen.
static CBlastOptionsHandle * Create(EProgram program, EAPILocality locality=CBlastOptions::eLocal)
Creates an options handle object configured with default options for the requested program,...
CBlastOptions & SetOptions()
Returns a reference to the internal options class which this object is a handle for.
virtual void SetRNAToGenomeDefaults()
void SetTraditionalBlastnDefaults()
Sets TraditionalBlastnDefaults.
void SetMismatchPenalty(int p)
Sets MismatchPenalty.
virtual void SetEffectiveLengthsOptionsDefaults()=0
Sets EffectiveLengthsOptionsDefaults.
bool Validate() const
Validate the options.
virtual void SetGenomeToGenomeDefaults()
static set< string > GetTasks(ETaskSets choice=eAll)
Retrieve the set of supported tasks.
void SetTraditionalMegablastDefaults()
Sets TraditionalMegablastDefaults.
void SetMatrixName(const char *matrix)
Sets MatrixName.
char * GetFilterString() const
Return the filtering string used.
void SetFilterString(const char *f, bool clear=true)
virtual void SetInitialWordOptionsDefaults()=0
Sets InitialWordOptionsDefaults.
virtual void SetRemoteProgramAndService_Blast3()=0
Set the program and service name for remote blast.
bool Validate() const
Validate the options contained in this object.
void SetDefaultsMode(bool dmode)
If this is true, remote options will ignore "Set" calls.
void SetFilterString(const char *f, bool clear=true)
Sets FilterString.
void SetWordSize(int ws)
Sets WordSize.
virtual void SetHitSavingOptionsDefaults()=0
Sets HitSavingOptionsDefaults.
virtual void SetRNAToRNADefaults()
virtual void SetDefaults()
Resets the state of the object to all default values.
void ThrowIfInvalidTask(const string &task)
Validates that the task provided is indeed a valid task, otherwise throws a CBlastException.
ETaskSets
Sets of tasks for the command line BLAST binaries.
char * GetFilterString() const
Returns FilterString.
void ClearFilterOptions()
Clears the filtering options.
void SetLookupTableType(ELookupTableType type)
static CBlastOptionsHandle * CreateTask(string task, EAPILocality locality=CBlastOptions::eLocal)
Creates an options handle object configured with default options for the requested task,...
@ eProtProt
Protein-protein tasks.
@ eNuclNucl
Nucleotide-nucleotide tasks.
@ eAll
Retrieve all available tasks.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
static int CompareNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive compare of a substring with another string.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
static string & ToLower(string &str)
Convert string to lower case – string& version.
Declares the CPHIBlastNuclOptionsHandle class.
Declares the CPHIBlastProtOptionsHandle class.
Declares the CPSIBlastOptionsHandle class.
Declares the CRPSTBlastnOptionsHandle class.
Declares the CTBlastnOptionsHandle class.
Declares the CTBlastxOptionsHandle class.