NCBI C++ ToolKit
Classes | Macros | Typedefs | Enumerations | Functions | Variables
blast_options.h File Reference

The structures and functions in blast_options. More...

#include <algo/blast/core/ncbi_std.h>
#include <algo/blast/core/blast_export.h>
#include <algo/blast/core/blast_program.h>
#include <algo/blast/core/blast_def.h>
#include <algo/blast/core/blast_message.h>
+ Include dependency graph for blast_options.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

struct  LookupTableOptions
 Options needed to construct a lookup table Also needed: query sequence and query length. More...
 
struct  SDustOptions
 Options for dust algorithm, applies only to nucl. More...
 
struct  SSegOptions
 Options for SEG algorithm, applies only to protein-protein comparisons. More...
 
struct  SRepeatFilterOptions
 Filtering options for organsim specific repeats filtering. More...
 
struct  SWindowMaskerOptions
 Filtering options for organism-specific filtering with Window Masker. More...
 
struct  SBlastFilterOptions
 All filtering options. More...
 
struct  QuerySetUpOptions
 Options required for setting up the query sequence. More...
 
struct  BlastInitialWordOptions
 Options needed for initial word finding and processing. More...
 
struct  BlastExtensionOptions
 Options used for gapped extension These include: a. More...
 
struct  BlastHSPBestHitOptions
 Options for the Best Hit HSP collection algorithm. More...
 
struct  BlastHSPCullingOptions
 Options for the HSP culling algorithm. More...
 
struct  BlastHSPFilteringOptions
 Structure containing the HSP filtering/writing options. More...
 
struct  BlastHitSavingOptions
 Options used when evaluating and saving hits These include: a. More...
 
struct  BlastScoringOptions
 Scoring options block Used to produce the BlastScoreBlk structure This structure may be needed for lookup table construction (proteins only), and for evaluating alignments. More...
 
struct  BlastEffectiveLengthsOptions
 Options for setting up effective lengths and search spaces. More...
 
struct  PSIBlastOptions
 Options used in protein BLAST only (PSI, PHI, RPS and translated BLAST) Some of these possibly should be transfered elsewhere. More...
 
struct  BlastDatabaseOptions
 Options used to create the ReadDBFILE structure Include database name and various information for restricting the database to a subset. More...
 

Macros

#define BLAST_WINDOW_SIZE_PROT   40
 Some default values (used when creating blast options block and for command-line program defaults. More...
 
#define BLAST_WINDOW_SIZE_NUCL   0
 default window size (blastn) More...
 
#define BLAST_WINDOW_SIZE_MEGABLAST   0
 default window size (contiguous megablast) More...
 
#define BLAST_WINDOW_SIZE_DISC   40
 default window size (discontiguous megablast) More...
 
#define BLAST_SCAN_RANGE_NUCL   0
 default scan range (blastn) More...
 
#define BLAST_WORDSIZE_PROT   3
 length of word to trigger an extension. More...
 
#define BLAST_WORDSIZE_NUCL   11
 default word size (blastn) More...
 
#define BLAST_WORDSIZE_MEGABLAST   28
 default word size (contiguous megablast; for discontig megablast the word size is explicitly overridden) More...
 
#define BLAST_WORDSIZE_MAPPER   16
 default word size for mapping rna-seq to a genome More...
 
#define BLAST_DEFAULT_MATRIX   "BLOSUM62"
 Default matrix name: BLOSUM62. More...
 
#define BLAST_GAP_OPEN_PROT   11
 Protein gap costs are the defaults for the BLOSUM62 scoring matrix. More...
 
#define BLAST_GAP_OPEN_NUCL   5
 default gap open penalty (blastn) More...
 
#define BLAST_GAP_OPEN_MEGABLAST   0
 default gap open penalty (megablast with greedy gapped alignment) More...
 
#define BLAST_GAP_OPEN_MAPPER   0
 
#define BLAST_GAP_EXTN_PROT   1
 cost to extend a gap. More...
 
#define BLAST_GAP_EXTN_NUCL   2
 default gap open penalty (blastn) More...
 
#define BLAST_GAP_EXTN_MEGABLAST   0
 default gap open penalty (megablast) with greedy gapped alignment) More...
 
#define BLAST_GAP_EXTN_MAPPER   8
 
#define BLAST_WORD_THRESHOLD_BLASTP   11
 neighboring word score thresholds; a threshold of zero means that only query and subject words that match exactly will go into the BLAST lookup table when it is generated More...
 
#define BLAST_WORD_THRESHOLD_BLASTN   0
 default threshold (blastn) More...
 
#define BLAST_WORD_THRESHOLD_BLASTX   12
 default threshold (blastx) More...
 
#define BLAST_WORD_THRESHOLD_TBLASTN   13
 default neighboring threshold (tblastn/rpstblastn) More...
 
#define BLAST_WORD_THRESHOLD_TBLASTX   13
 default threshold (tblastx) More...
 
#define BLAST_WORD_THRESHOLD_MEGABLAST   0
 default threshold (megablast) More...
 
#define BLAST_UNGAPPED_X_DROPOFF_PROT   7
 default dropoff for ungapped extension; ungapped extensions will stop when the score for the extension has dropped from the current best score by at least this much More...
 
#define BLAST_UNGAPPED_X_DROPOFF_NUCL   20
 ungapped dropoff score for blastn (and megablast) More...
 
#define BLAST_GAP_X_DROPOFF_PROT   15
 default dropoff for preliminary gapped extensions More...
 
#define BLAST_GAP_X_DROPOFF_NUCL   30
 default dropoff for non-greedy nucleotide gapped extensions More...
 
#define BLAST_GAP_X_DROPOFF_GREEDY   25
 default dropoff for greedy nucleotide gapped extensions More...
 
#define BLAST_GAP_X_DROPOFF_TBLASTX   0
 default dropoff for tblastx More...
 
#define BLAST_GAP_TRIGGER_PROT   22.0
 default bit score that will trigger gapped extension More...
 
#define BLAST_GAP_TRIGGER_NUCL   27.0
 default bit score that will trigger a gapped extension for blastn More...
 
#define BLAST_GAP_X_DROPOFF_FINAL_PROT   25
 default dropoff for the final gapped extension with traceback More...
 
#define BLAST_GAP_X_DROPOFF_FINAL_NUCL   100
 default dropoff for nucleotide gapped extensions) More...
 
#define BLAST_GAP_X_DROPOFF_FINAL_TBLASTX   0
 default dropoff for tblastx More...
 
#define BLAST_PENALTY   -3
 default reward and penalty (only applies to blastn/megablast) More...
 
#define BLAST_REWARD   1
 default nucleotide match score More...
 
#define BLAST_PENALTY_MAPPER   -8
 
#define BLAST_REWARD_MAPPER   1
 
#define BLAST_EXPECT_VALUE   10.0
 Default parameters for saving hits. More...
 
#define BLAST_HITLIST_SIZE   500
 Number of database sequences to save hits for. More...
 
#define PSI_INCLUSION_ETHRESH   0.002
 Defaults for PSI-BLAST and DELTA-BLAST options. More...
 
#define PSI_PSEUDO_COUNT_CONST   0
 Pseudo-count constant for PSI-BLAST. More...
 
#define DELTA_INCLUSION_ETHRESH   0.05
 Inclusion threshold for DELTA-BLAST. More...
 
#define BLAST_GENETIC_CODE   1
 Default genetic code for query and/or database. More...
 
#define kDefaultRepeatFilterDb   "repeat/repeat_9606"
 Default value for repeats database filtering. More...
 

Typedefs

typedef struct LookupTableOptions LookupTableOptions
 Options needed to construct a lookup table Also needed: query sequence and query length. More...
 
typedef struct SDustOptions SDustOptions
 Options for dust algorithm, applies only to nucl. More...
 
typedef struct SSegOptions SSegOptions
 Options for SEG algorithm, applies only to protein-protein comparisons. More...
 
typedef struct SRepeatFilterOptions SRepeatFilterOptions
 Filtering options for organsim specific repeats filtering. More...
 
typedef struct SWindowMaskerOptions SWindowMaskerOptions
 Filtering options for organism-specific filtering with Window Masker. More...
 
typedef struct SBlastFilterOptions SBlastFilterOptions
 All filtering options. More...
 
typedef struct QuerySetUpOptions QuerySetUpOptions
 Options required for setting up the query sequence. More...
 
typedef struct BlastInitialWordOptions BlastInitialWordOptions
 Options needed for initial word finding and processing. More...
 
typedef enum EBlastPrelimGapExt EBlastPrelimGapExt
 The algorithm to be used for preliminary gapped extensions. More...
 
typedef enum EBlastTbackExt EBlastTbackExt
 The algorithm to be used for final gapped extensions with traceback. More...
 
typedef struct BlastExtensionOptions BlastExtensionOptions
 Options used for gapped extension These include: a. More...
 
typedef struct BlastHSPBestHitOptions BlastHSPBestHitOptions
 Options for the Best Hit HSP collection algorithm. More...
 
typedef struct BlastHSPCullingOptions BlastHSPCullingOptions
 Options for the HSP culling algorithm. More...
 
typedef struct BlastHSPFilteringOptions BlastHSPFilteringOptions
 Structure containing the HSP filtering/writing options. More...
 
typedef struct BlastHitSavingOptions BlastHitSavingOptions
 Options used when evaluating and saving hits These include: a. More...
 
typedef struct BlastScoringOptions BlastScoringOptions
 Scoring options block Used to produce the BlastScoreBlk structure This structure may be needed for lookup table construction (proteins only), and for evaluating alignments. More...
 
typedef struct BlastEffectiveLengthsOptions BlastEffectiveLengthsOptions
 Options for setting up effective lengths and search spaces. More...
 
typedef struct PSIBlastOptions PSIBlastOptions
 Options used in protein BLAST only (PSI, PHI, RPS and translated BLAST) Some of these possibly should be transfered elsewhere. More...
 
typedef struct BlastDatabaseOptions BlastDatabaseOptions
 Options used to create the ReadDBFILE structure Include database name and various information for restricting the database to a subset. More...
 
typedef enum EFilterOptions EFilterOptions
 Types of filtering options. More...
 

Enumerations

enum  ELookupTableType {
  eMBLookupTable, eSmallNaLookupTable, eNaLookupTable, eAaLookupTable,
  eCompressedAaLookupTable, ePhiLookupTable, ePhiNaLookupTable, eRPSLookupTable,
  eIndexedMBLookupTable, eMixedMBLookupTable, eNaHashLookupTable
}
 Types of the lookup table. More...
 
enum  EBlastPrelimGapExt { eDynProgScoreOnly, eGreedyScoreOnly, eJumperWithTraceback, eSmithWatermanScoreOnly }
 The algorithm to be used for preliminary gapped extensions. More...
 
enum  EBlastTbackExt { eDynProgTbck, eGreedyTbck, eSmithWatermanTbck, eSmithWatermanTbckFull }
 The algorithm to be used for final gapped extensions with traceback. More...
 
enum  EFilterOptions {
  eSeg, eDust, eRepeats, eDustRepeats,
  eEmpty
}
 Types of filtering options. More...
 

Functions

SDustOptionsSDustOptionsFree (SDustOptions *dust_options)
 Frees SDustOptions. More...
 
Int2 SDustOptionsNew (SDustOptions **dust_options)
 Allocates memory for SDustOptions, fills in defaults. More...
 
SSegOptionsSSegOptionsFree (SSegOptions *seg_options)
 Frees SSegOptions. More...
 
Int2 SSegOptionsNew (SSegOptions **seg_options)
 Allocates memory for SSegOptions, fills in defaults. More...
 
Int2 SRepeatFilterOptionsResetDB (SRepeatFilterOptions **repeat_options, const char *dbname)
 Resets name of db for repeat filtering. More...
 
Int2 SWindowMaskerOptionsResetDB (SWindowMaskerOptions **winmask_options, const char *dbname)
 Resets name of db for window masker filtering. More...
 
SRepeatFilterOptionsSRepeatFilterOptionsFree (SRepeatFilterOptions *repeat_options)
 Frees SRepeatFilterOptions. More...
 
SWindowMaskerOptionsSWindowMaskerOptionsFree (SWindowMaskerOptions *winmask_options)
 Frees SWindowMaskerOptions. More...
 
Int2 SRepeatFilterOptionsNew (SRepeatFilterOptions **repeat_options)
 Allocates memory for SRepeatFilterOptions, fills in defaults. More...
 
Int2 SWindowMaskerOptionsNew (SWindowMaskerOptions **winmask_options)
 Allocates memory for SWindowMaskerOptions, fills in defaults. More...
 
SBlastFilterOptionsSBlastFilterOptionsFree (SBlastFilterOptions *filter_options)
 Frees SBlastFilterOptions and all subservient structures. More...
 
Int2 SBlastFilterOptionsMerge (SBlastFilterOptions **combined, const SBlastFilterOptions *opt1, const SBlastFilterOptions *opt2)
 Merges two sets of options together, taking the non-default one as preferred. More...
 
Int2 SBlastFilterOptionsNew (SBlastFilterOptions **filter_options, EFilterOptions type)
 Allocates memory for SBlastFilterOptions and. More...
 
Boolean SBlastFilterOptionsNoFiltering (const SBlastFilterOptions *filter_options)
 Queries whether no masking is required. More...
 
Boolean SBlastFilterOptionsMaskAtHash (const SBlastFilterOptions *filter_options)
 Queries whether masking should be done only for the lookup table or for the entire search. More...
 
Int2 SBlastFilterOptionsValidate (EBlastProgramType program_number, const SBlastFilterOptions *filter_options, Blast_Message **blast_message)
 Validates filter options to ensure that program and options are consistent and that options have valid values. More...
 
QuerySetUpOptionsBlastQuerySetUpOptionsFree (QuerySetUpOptions *options)
 Deallocate memory for QuerySetUpOptions. More...
 
Int2 BlastQuerySetUpOptionsNew (QuerySetUpOptions **options)
 Allocate memory for QuerySetUpOptions and fill with default values. More...
 
Int2 BLAST_FillQuerySetUpOptions (QuerySetUpOptions *options, EBlastProgramType program, const char *filter_string, Uint1 strand_option)
 Fill non-default contents of the QuerySetUpOptions. More...
 
BlastInitialWordOptionsBlastInitialWordOptionsFree (BlastInitialWordOptions *options)
 Deallocate memory for BlastInitialWordOptions. More...
 
Int2 BlastInitialWordOptionsNew (EBlastProgramType program, BlastInitialWordOptions **options)
 Allocate memory for BlastInitialWordOptions and fill with default values. More...
 
Int2 BlastInitialWordOptionsValidate (EBlastProgramType program_number, const BlastInitialWordOptions *options, Blast_Message **blast_msg)
 Validate correctness of the initial word options. More...
 
Int2 BLAST_FillInitialWordOptions (BlastInitialWordOptions *options, EBlastProgramType program, Int4 window_size, double xdrop_ungapped)
 Fill non-default values in the BlastInitialWordOptions structure. More...
 
BlastExtensionOptionsBlastExtensionOptionsFree (BlastExtensionOptions *options)
 Deallocate memory for BlastExtensionOptions. More...
 
Int2 BlastExtensionOptionsNew (EBlastProgramType program, BlastExtensionOptions **options, Boolean gapped)
 Allocate memory for BlastExtensionOptions and fill with default values. More...
 
Int2 BLAST_FillExtensionOptions (BlastExtensionOptions *options, EBlastProgramType program, Int4 greedy, double x_dropoff, double x_dropoff_final)
 Fill non-default values in the BlastExtensionOptions structure. More...
 
Int2 BlastExtensionOptionsValidate (EBlastProgramType program_number, const BlastExtensionOptions *options, Blast_Message **blast_msg)
 Validate contents of BlastExtensionOptions. More...
 
BlastScoringOptionsBlastScoringOptionsFree (BlastScoringOptions *options)
 Deallocate memory for BlastScoringOptions. More...
 
Int2 BlastScoringOptionsNew (EBlastProgramType program, BlastScoringOptions **options)
 Allocate memory for BlastScoringOptions and fill with default values. More...
 
Int2 BLAST_FillScoringOptions (BlastScoringOptions *options, EBlastProgramType program, Boolean greedy_extension, Int4 penalty, Int4 reward, const char *matrix, Int4 gap_open, Int4 gap_extend)
 Fill non-default values in the BlastScoringOptions structure. More...
 
Int2 BlastScoringOptionsValidate (EBlastProgramType program_number, const BlastScoringOptions *options, Blast_Message **blast_msg)
 Validate contents of BlastScoringOptions. More...
 
Int2 BlastScoringOptionsDup (BlastScoringOptions **new_opt, const BlastScoringOptions *old_opt)
 Produces copy of "old" options, with new memory allocated. More...
 
Int2 BlastScoringOptionsSetMatrix (BlastScoringOptions *opts, const char *matrix_name)
 Resets matrix name option. More...
 
BlastEffectiveLengthsOptionsBlastEffectiveLengthsOptionsFree (BlastEffectiveLengthsOptions *options)
 Deallocate memory for BlastEffectiveLengthsOptions*. More...
 
Int2 BlastEffectiveLengthsOptionsNew (BlastEffectiveLengthsOptions **options)
 Allocate memory for BlastEffectiveLengthsOptions* and fill with default values. More...
 
Boolean BlastEffectiveLengthsOptions_IsSearchSpaceSet (const BlastEffectiveLengthsOptions *options)
 Return true if the search spaces is set for any of the queries in the search. More...
 
Int2 BLAST_FillEffectiveLengthsOptions (BlastEffectiveLengthsOptions *options, Int4 dbseq_num, Int8 db_length, Int8 *searchsp_eff, Int4 num_searchsp)
 Fill the non-default values in the BlastEffectiveLengthsOptions structure. More...
 
Int2 LookupTableOptionsNew (EBlastProgramType program, LookupTableOptions **options)
 Allocate memory for lookup table options and fill with default values. More...
 
Int2 BLAST_FillLookupTableOptions (LookupTableOptions *options, EBlastProgramType program, Boolean is_megablast, double threshold, Int4 word_size)
 Allocate memory for lookup table options and fill with default values. More...
 
LookupTableOptionsLookupTableOptionsFree (LookupTableOptions *options)
 Deallocates memory for LookupTableOptions*. More...
 
Int2 LookupTableOptionsValidate (EBlastProgramType program_number, const LookupTableOptions *options, Blast_Message **blast_msg)
 Validate LookupTableOptions. More...
 
BlastHitSavingOptionsBlastHitSavingOptionsFree (BlastHitSavingOptions *options)
 Deallocate memory for BlastHitSavingOptions. More...
 
Int2 BlastHitSavingOptionsValidate (EBlastProgramType program_number, const BlastHitSavingOptions *options, Blast_Message **blast_msg)
 Validate BlastHitSavingOptions. More...
 
Int2 BlastHitSavingOptionsNew (EBlastProgramType program, BlastHitSavingOptions **options, Boolean gapped_calculation)
 Allocate memory for BlastHitSavingOptions. More...
 
Int2 BLAST_FillHitSavingOptions (BlastHitSavingOptions *options, double evalue, Int4 hitlist_size, Boolean is_gapped, Int4 culling_limit, Int4 min_diag_separation)
 Allocate memory for BlastHitSavingOptions. More...
 
Int2 PSIBlastOptionsNew (PSIBlastOptions **psi_options)
 Initialize default options for PSI BLAST. More...
 
Int2 PSIBlastOptionsValidate (const PSIBlastOptions *psi_options, Blast_Message **blast_msg)
 Validates the PSI BLAST options so that they have sane values. More...
 
PSIBlastOptionsPSIBlastOptionsFree (PSIBlastOptions *psi_options)
 Deallocate PSI BLAST options. More...
 
BlastHSPBestHitOptionsBlastHSPBestHitOptionsNew (double overhang, double score_edge)
 Allocate and initialize a BlastHSPBestHitOptions structure. More...
 
Int2 BlastHSPBestHitOptionsValidate (const BlastHSPFilteringOptions *opts)
 Validate the best hit algorithm parameters (if any) in the. More...
 
BlastHSPBestHitOptionsBlastHSPBestHitOptionsFree (BlastHSPBestHitOptions *opt)
 Deallocate a BlastHSPBestHitOptions structure. More...
 
BlastHSPCullingOptionsBlastHSPCullingOptionsNew (int max)
 Allocate a new object for culling options. More...
 
Int2 BlastHSPCullingOptionsValidate (const BlastHSPFilteringOptions *opts)
 Validate culling options. More...
 
BlastHSPCullingOptionsBlastHSPCullingOptionsFree (BlastHSPCullingOptions *culling_opts)
 Deallocates culling options structure. More...
 
BlastHSPFilteringOptionsBlastHSPFilteringOptionsNew ()
 Allocate and initialize a BlastHSPFilteringOptions structure. More...
 
Int2 BlastHSPFilteringOptions_AddBestHit (BlastHSPFilteringOptions *filt_opts, BlastHSPBestHitOptions **opts, EBlastStage stage)
 Add the best hit options. More...
 
Int2 BlastHSPFilteringOptions_AddCulling (BlastHSPFilteringOptions *filt_opts, BlastHSPCullingOptions **opts, EBlastStage stage)
 Validates the BlastHSPFilteringOptions structure. More...
 
Int2 BlastHSPFilteringOptionsValidate (const BlastHSPFilteringOptions *opts)
 Validates the BlastHSPFilteringOptions structure. More...
 
BlastHSPFilteringOptionsBlastHSPFilteringOptionsFree (BlastHSPFilteringOptions *opts)
 Deallocate a BlastHSPFilteringOptions structure. More...
 
Int2 BlastDatabaseOptionsNew (BlastDatabaseOptions **db_options)
 Allocates the BlastDatabase options structure and sets the default database genetic code value (BLAST_GENETIC_CODE). More...
 
BlastDatabaseOptionsBlastDatabaseOptionsFree (BlastDatabaseOptions *db_options)
 Deallocate database options. More...
 
Int2 BLAST_InitDefaultOptions (EBlastProgramType blast_program, LookupTableOptions **lookup_options, QuerySetUpOptions **query_setup_options, BlastInitialWordOptions **word_options, BlastExtensionOptions **ext_options, BlastHitSavingOptions **hit_options, BlastScoringOptions **score_options, BlastEffectiveLengthsOptions **eff_len_options, PSIBlastOptions **protein_options, BlastDatabaseOptions **db_options)
 Initialize all the BLAST search options structures with the default values. More...
 
Int2 BLAST_ValidateOptions (EBlastProgramType program_number, const BlastExtensionOptions *ext_options, const BlastScoringOptions *score_options, const LookupTableOptions *lookup_options, const BlastInitialWordOptions *word_options, const BlastHitSavingOptions *hit_options, Blast_Message **blast_msg)
 Validate all options. More...
 
Int2 BLAST_GetSuggestedThreshold (EBlastProgramType program_number, const char *matrixName, double *threshold)
 Get thresholds for word-finding suggested by Stephen Altschul. More...
 
Int2 BLAST_GetSuggestedWindowSize (EBlastProgramType program_number, const char *matrixName, Int4 *window_size)
 Get window sizes for two hit algorithm suggested by Stephen Altschul. More...
 

Variables

const double kPSSM_NoImpalaScaling
 Value used to indicate that no IMPALA-style scaling should be performed when scaling a PSSM. More...
 

Detailed Description

The structures and functions in blast_options.

[ch] should be used to specify user preferences. The options structures should not be changed by the BLAST code but rather be read to determine user preferences. When possible these structures should be passed in as "const".

Definition in file blast_options.h.

Macro Definition Documentation

#define BLAST_DEFAULT_MATRIX   "BLOSUM62"
#define BLAST_EXPECT_VALUE   10.0
#define BLAST_GAP_EXTN_MAPPER   8
#define BLAST_GAP_EXTN_MEGABLAST   0

default gap open penalty (megablast) with greedy gapped alignment)

Definition at line 104 of file blast_options.h.

Referenced by BLAST_FillScoringOptions(), s_JumperScoreBlkFill(), and CBlastNucleotideOptionsHandle::SetMBScoringOptionsDefaults().

#define BLAST_GAP_EXTN_NUCL   2
#define BLAST_GAP_EXTN_PROT   1
#define BLAST_GAP_OPEN_MAPPER   0

Definition at line 97 of file blast_options.h.

Referenced by CMagicBlastOptionsHandle::SetScoringOptionsDefaults().

#define BLAST_GAP_OPEN_MEGABLAST   0

default gap open penalty (megablast with greedy gapped alignment)

Definition at line 94 of file blast_options.h.

Referenced by BLAST_FillScoringOptions(), s_JumperScoreBlkFill(), and CBlastNucleotideOptionsHandle::SetMBScoringOptionsDefaults().

#define BLAST_GAP_OPEN_NUCL   5
#define BLAST_GAP_OPEN_PROT   11

Protein gap costs are the defaults for the BLOSUM62 scoring matrix.

More gap costs are listed in BLASTOptionSetGapParams cost for the existence of a gap. default gap open penalty (all protein searches)

Definition at line 90 of file blast_options.h.

Referenced by AascanTestFixture::AascanTestFixture(), BlastScoringOptionsNew(), BOOST_AUTO_TEST_CASE(), AalookupTestFixture::FillLookupTable(), IPssmInput_Base::GetGapExistence(), and CBlastProteinOptionsHandle::SetScoringOptionsDefaults().

#define BLAST_GAP_TRIGGER_NUCL   27.0
#define BLAST_GAP_TRIGGER_PROT   22.0

default bit score that will trigger gapped extension

default bit score that will trigger a gapped extension for all protein- based searches

Definition at line 151 of file blast_options.h.

Referenced by BlastInitialWordOptionsNew(), CGapTriggerArgs::SetArgumentDescriptions(), CBlastRPSOptionsHandle::SetGappedExtensionDefaults(), CBlastProteinOptionsHandle::SetGappedExtensionDefaults(), and CBlastAppArgs::x_IssueWarningsForIgnoredOptions().

#define BLAST_GAP_X_DROPOFF_FINAL_NUCL   100
#define BLAST_GAP_X_DROPOFF_FINAL_PROT   25

default dropoff for the final gapped extension with traceback

default dropoff (all protein- based gapped extensions)

Definition at line 161 of file blast_options.h.

Referenced by BlastExtensionOptionsNew(), CBlastRPSOptionsHandle::SetGappedExtensionDefaults(), and CBlastProteinOptionsHandle::SetGappedExtensionDefaults().

#define BLAST_GAP_X_DROPOFF_FINAL_TBLASTX   0

default dropoff for tblastx

Definition at line 167 of file blast_options.h.

Referenced by CTBlastxOptionsHandle::SetGappedExtensionDefaults().

#define BLAST_GAP_X_DROPOFF_GREEDY   25

default dropoff for greedy nucleotide gapped extensions

Definition at line 145 of file blast_options.h.

Referenced by BLAST_FillExtensionOptions(), and CBlastNucleotideOptionsHandle::SetMBGappedExtensionDefaults().

#define BLAST_GAP_X_DROPOFF_NUCL   30
#define BLAST_GAP_X_DROPOFF_PROT   15

default dropoff for preliminary gapped extensions

default dropoff (all protein- based gapped extensions)

Definition at line 139 of file blast_options.h.

Referenced by BlastExtensionOptionsNew(), CBlastRPSOptionsHandle::SetGappedExtensionDefaults(), and CBlastProteinOptionsHandle::SetGappedExtensionDefaults().

#define BLAST_GAP_X_DROPOFF_TBLASTX   0

default dropoff for tblastx

Definition at line 148 of file blast_options.h.

Referenced by CTBlastxOptionsHandle::SetGappedExtensionDefaults().

#define BLAST_GENETIC_CODE   1
#define BLAST_HITLIST_SIZE   500

Number of database sequences to save hits for.

Definition at line 180 of file blast_options.h.

Referenced by BlastHitSavingOptionsNew(), CFormattingArgs::ExtractAlgorithmOptions(), and CFormattingArgs::SetArgumentDescriptions().

#define BLAST_PENALTY   -3

default reward and penalty (only applies to blastn/megablast)

default nucleotide mismatch score

Definition at line 170 of file blast_options.h.

Referenced by BLAST_CalcEffLengths(), Blast_ScoreBlkKbpGappedCalc(), Blast_ScoreBlkMatrixInit(), BlastScoringOptionsNew(), and s_JumperScoreBlkFill().

#define BLAST_PENALTY_MAPPER   -8
#define BLAST_REWARD   1
#define BLAST_REWARD_MAPPER   1
#define BLAST_SCAN_RANGE_NUCL   0

default scan range (blastn)

Definition at line 65 of file blast_options.h.

Referenced by BlastInitialWordOptionsNew(), and CBlastNucleotideOptionsHandle::SetInitialWordOptionsDefaults().

#define BLAST_UNGAPPED_X_DROPOFF_NUCL   20
#define BLAST_UNGAPPED_X_DROPOFF_PROT   7

default dropoff for ungapped extension; ungapped extensions will stop when the score for the extension has dropped from the current best score by at least this much

ungapped dropoff score for all searches except blastn

Definition at line 131 of file blast_options.h.

Referenced by BlastInitialWordOptionsNew(), CBlastRPSOptionsHandle::SetInitialWordOptionsDefaults(), and CBlastProteinOptionsHandle::SetInitialWordOptionsDefaults().

#define BLAST_WINDOW_SIZE_DISC   40

default window size (discontiguous megablast)

Definition at line 62 of file blast_options.h.

Referenced by BOOST_AUTO_TEST_CASE(), and CDiscNucleotideOptionsHandle::SetMBInitialWordOptionsDefaults().

#define BLAST_WINDOW_SIZE_MEGABLAST   0

default window size (contiguous megablast)

Definition at line 59 of file blast_options.h.

#define BLAST_WINDOW_SIZE_NUCL   0
#define BLAST_WINDOW_SIZE_PROT   40

Some default values (used when creating blast options block and for command-line program defaults.

When changing these defaults, please remember to update the defaults in the command-line programs "window" between hits to trigger an extension. default window (all protein searches)

Definition at line 57 of file blast_options.h.

Referenced by BlastInitialWordOptionsNew(), CBlastRPSOptionsHandle::SetInitialWordOptionsDefaults(), and CBlastProteinOptionsHandle::SetInitialWordOptionsDefaults().

#define BLAST_WORD_THRESHOLD_BLASTN   0
#define BLAST_WORD_THRESHOLD_BLASTP   11

neighboring word score thresholds; a threshold of zero means that only query and subject words that match exactly will go into the BLAST lookup table when it is generated

default neighboring threshold (blastp and for rpsblast at RPS-BLAST database creation time)

Definition at line 114 of file blast_options.h.

Referenced by AascanTestFixture::AascanTestFixture(), BOOST_AUTO_TEST_CASE(), LookupTableOptionsNew(), s_IsDefaultWordThreshold(), and CBlastProteinOptionsHandle::SetLookupTableDefaults().

#define BLAST_WORD_THRESHOLD_BLASTX   12

default threshold (blastx)

Definition at line 120 of file blast_options.h.

Referenced by LookupTableOptionsNew(), s_IsDefaultWordThreshold(), and CBlastxOptionsHandle::SetLookupTableDefaults().

#define BLAST_WORD_THRESHOLD_MEGABLAST   0

default threshold (megablast)

Definition at line 125 of file blast_options.h.

Referenced by CBlastNucleotideOptionsHandle::SetMBLookupTableDefaults().

#define BLAST_WORD_THRESHOLD_TBLASTN   13

default neighboring threshold (tblastn/rpstblastn)

Definition at line 121 of file blast_options.h.

Referenced by LookupTableOptionsNew(), s_IsDefaultWordThreshold(), CTBlastnOptionsHandle::SetLookupTableDefaults(), and CPSIBlastOptionsHandle::SetPSITblastnDefaults().

#define BLAST_WORD_THRESHOLD_TBLASTX   13

default threshold (tblastx)

Definition at line 124 of file blast_options.h.

Referenced by LookupTableOptionsNew(), and CTBlastxOptionsHandle::SetLookupTableDefaults().

#define BLAST_WORDSIZE_MAPPER   16

default word size for mapping rna-seq to a genome

Definition at line 78 of file blast_options.h.

Referenced by BLAST_FillLookupTableOptions(), LookupTableOptionsValidate(), and CMagicBlastOptionsHandle::SetLookupTableDefaults().

#define BLAST_WORDSIZE_MEGABLAST   28

default word size (contiguous megablast; for discontig megablast the word size is explicitly overridden)

Definition at line 70 of file blast_options.h.

Referenced by BLAST_FillLookupTableOptions(), LookupTableOptionsNew(), CBlastOptionsLocal::SetLookupTableType(), and CBlastNucleotideOptionsHandle::SetMBLookupTableDefaults().

#define BLAST_WORDSIZE_NUCL   11
#define BLAST_WORDSIZE_PROT   3

length of word to trigger an extension.

default word size (all protein searches)

Definition at line 68 of file blast_options.h.

Referenced by LookupTableOptionsNew(), RPSLookupTableNew(), CBlastProteinOptionsHandle::SetLookupTableDefaults(), CMakeProfileDBApp::x_RPS_DbClose(), and CMakeProfileDBApp::x_RPSAddFirstSequence().

#define DELTA_INCLUSION_ETHRESH   0.05

Inclusion threshold for DELTA-BLAST.

Definition at line 186 of file blast_options.h.

Referenced by CPssmEngineArgs::SetArgumentDescriptions(), and CDeltaBlastOptionsHandle::SetDeltaBlastDefaults().

#define kDefaultRepeatFilterDb   "repeat/repeat_9606"

Default value for repeats database filtering.

Definition at line 256 of file blast_options.h.

Referenced by BOOST_AUTO_TEST_CASE(), and SRepeatFilterOptionsNew().

#define PSI_INCLUSION_ETHRESH   0.002

Defaults for PSI-BLAST and DELTA-BLAST options.

Inclusion threshold for PSI BLAST

Definition at line 184 of file blast_options.h.

Referenced by Blast_RedoAlignmentCore_MT(), PSIBlastOptionsNew(), CPssmEngineArgs::SetArgumentDescriptions(), CPSIBlastOptionsHandle::SetPSIBlastDefaults(), and CBlastAppArgs::x_IssueWarningsForIgnoredOptions().

#define PSI_PSEUDO_COUNT_CONST   0

Typedef Documentation

Options used to create the ReadDBFILE structure Include database name and various information for restricting the database to a subset.

Options for setting up effective lengths and search spaces.

The values are those the user has specified to override the real sizes.

Options used for gapped extension These include: a.

Penalties for various types of gapping; b. Drop-off values for the extension algorithms tree exploration; c. Parameters identifying what kind of extension algorithm(s) should be used.

Options used when evaluating and saving hits These include: a.

Restrictions on the number of hits to be saved; b. Restrictions on the quality and positions of hits to be saved; c. Parameters used to evaluate the quality of hits.

Options for the Best Hit HSP collection algorithm.

Options for the HSP culling algorithm.

Structure containing the HSP filtering/writing options.

Options needed for initial word finding and processing.

Scoring options block Used to produce the BlastScoreBlk structure This structure may be needed for lookup table construction (proteins only), and for evaluating alignments.

The algorithm to be used for preliminary gapped extensions.

The algorithm to be used for final gapped extensions with traceback.

Types of filtering options.

Options needed to construct a lookup table Also needed: query sequence and query length.

Options used in protein BLAST only (PSI, PHI, RPS and translated BLAST) Some of these possibly should be transfered elsewhere.

Options required for setting up the query sequence.

All filtering options.

typedef struct SDustOptions SDustOptions

Options for dust algorithm, applies only to nucl.

-nucl. comparisons. value of less than zero means default value will be applied.

Filtering options for organsim specific repeats filtering.

Currently this consist of only the db name but could be expanded in the future to include other types of filtering or other options.

typedef struct SSegOptions SSegOptions

Options for SEG algorithm, applies only to protein-protein comparisons.

value of less than zero means default value will be applied.

Filtering options for organism-specific filtering with Window Masker.

The taxid and filename are alternative means of choosing which Window Masker database to use.

Enumeration Type Documentation

The algorithm to be used for preliminary gapped extensions.

Enumerator
eDynProgScoreOnly 

standard affine gapping

eGreedyScoreOnly 

Greedy extension (megaBlast)

eJumperWithTraceback 

Jumper extension (mapping)

eSmithWatermanScoreOnly 

Score-only smith-waterman.

Definition at line 312 of file blast_options.h.

The algorithm to be used for final gapped extensions with traceback.

Enumerator
eDynProgTbck 

standard affine gapping

eGreedyTbck 

Greedy extension (megaBlast)

eSmithWatermanTbck 

Smith-waterman finds optimal scores, then ALIGN_EX to find alignment.

eSmithWatermanTbckFull 

Smith-waterman to find all alignments.

Definition at line 322 of file blast_options.h.

Types of filtering options.

Enumerator
eSeg 

low-complexity for proteins.

eDust 

low-complexity for nucleotides.

eRepeats 

Repeat filtering for nucleotides.

eDustRepeats 

Repeat and dust filtering for nucleotides.

eEmpty 

no filtering at all.

Definition at line 652 of file blast_options.h.

Types of the lookup table.

Enumerator
eMBLookupTable 

megablast lookup table (includes both contiguous and discontiguous megablast)

eSmallNaLookupTable 

lookup table for blastn with small query

eNaLookupTable 

blastn lookup table

eAaLookupTable 

standard protein (blastp) lookup table

eCompressedAaLookupTable 

compressed alphabet (blastp) lookup table

ePhiLookupTable 

protein lookup table specialized for phi-blast

ePhiNaLookupTable 

nucleotide lookup table for phi-blast

eRPSLookupTable 

RPS lookup table (rpsblast and rpstblastn)

eIndexedMBLookupTable 

use database index as a lookup structure

eMixedMBLookupTable 

use when some volumes are searched with index and some are not

eNaHashLookupTable 

used for 16-base words

Definition at line 200 of file blast_options.h.

Function Documentation

Int2 BLAST_FillEffectiveLengthsOptions ( BlastEffectiveLengthsOptions options,
Int4  dbseq_num,
Int8  db_length,
Int8 searchsp_eff,
Int4  num_searchsp 
)

Fill the non-default values in the BlastEffectiveLengthsOptions structure.

Parameters
optionsThe options [in] [out]
dbseq_numNumber of sequences in the database (if zero real value will be used) [in]
db_lengthTotal length of the database (if zero real value will be used) [in]
*searchsp_effArray of effective search spaces (the real value will be used for elements that are 0). If array contains one element, all contexts use this value. If array has multiple elements, the number must match the number of contexts in the search [in]
num_searchspThe number of elements in searchsp_eff [in]

Definition at line 1009 of file blast_options.c.

References BLASTERR_INVALIDPARAM, BLASTERR_MEMORY, BlastEffectiveLengthsOptions::db_length, BlastEffectiveLengthsOptions::dbseq_num, NULL, BlastEffectiveLengthsOptions::num_searchspaces, and BlastEffectiveLengthsOptions::searchsp_eff.

Referenced by BOOST_AUTO_TEST_CASE(), and CRedoAlignmentTestFixture::runRedoAlignmentCoreUnitTest().

Int2 BLAST_FillExtensionOptions ( BlastExtensionOptions options,
EBlastProgramType  program,
Int4  greedy,
double  x_dropoff,
double  x_dropoff_final 
)

Fill non-default values in the BlastExtensionOptions structure.

Parameters
optionsThe options structure [in] [out]
programProgram number (blastn, blastp, etc.) [in]
greedyIn how many stages of the search greedy alignment is used (values 0, 1, 2)? FIXME [in]
x_dropoffX-dropoff parameter value for preliminary gapped extensions [in]
x_dropoff_finalX-dropoff parameter value for final gapped extensions with traceback [in]

Definition at line 670 of file blast_options.c.

References BLAST_GAP_X_DROPOFF_FINAL_NUCL, BLAST_GAP_X_DROPOFF_GREEDY, BLAST_GAP_X_DROPOFF_NUCL, Blast_ProgramIsNucleotide(), Blast_QueryIsPssm(), Blast_SubjectIsTranslated(), BLASTERR_INVALIDPARAM, BlastExtensionOptions::compositionBasedStats, eCompositionBasedStats, eDynProgScoreOnly, eDynProgTbck, eGreedyScoreOnly, eGreedyTbck, BlastExtensionOptions::ePrelimGapExt, BlastExtensionOptions::eTbackExt, BlastExtensionOptions::gap_x_dropoff, BlastExtensionOptions::gap_x_dropoff_final, and MAX.

Int2 BLAST_FillHitSavingOptions ( BlastHitSavingOptions options,
double  evalue,
Int4  hitlist_size,
Boolean  is_gapped,
Int4  culling_limit,
Int4  min_diag_separation 
)

Allocate memory for BlastHitSavingOptions.

Parameters
optionsThe options [in] [out]
evalueThe expected value threshold [in]
hitlist_sizeHow many database sequences to save per query? [in]
is_gappedis this a gapped alignment? [in]
culling_limitNumber of higher-scoring HSPs that must contain the query range of an HSP before that HSP is declared to be redundant (ignored if zero) [in]
min_diag_separationDelete HSPs whose endpoints are at most this many diagonals from a higher-scoring HSP. If zero, delete HSPs whose query and subject ranges are enveloped by those of a higher-scoring HSP [in]

Definition at line 1432 of file blast_options.c.

References BLASTERR_INVALIDPARAM, BlastHitSavingOptions::culling_limit, BlastHitSavingOptions::expect_value, BlastHitSavingOptions::hitlist_size, BlastHitSavingOptions::hsp_filt_opt, BlastHitSavingOptions::min_diag_separation, and NULL.

Int2 BLAST_FillInitialWordOptions ( BlastInitialWordOptions options,
EBlastProgramType  program,
Int4  window_size,
double  xdrop_ungapped 
)

Fill non-default values in the BlastInitialWordOptions structure.

Parameters
optionsThe options structure [in] [out]
programProgram number (blastn, blastp, etc.) [in]
window_sizeSize of a largest window between 2 words for the two-hit version [in]
xdrop_ungappedThe value of the X-dropoff for ungapped extensions [in]

Definition at line 605 of file blast_options.c.

References BLASTERR_INVALIDPARAM, BlastInitialWordOptions::window_size, and BlastInitialWordOptions::x_dropoff.

Int2 BLAST_FillLookupTableOptions ( LookupTableOptions options,
EBlastProgramType  program,
Boolean  is_megablast,
double  threshold,
Int4  word_size 
)

Allocate memory for lookup table options and fill with default values.

Parameters
optionsThe options [in] [out]
programProgram number (blastn, blastp, etc.) [in]
is_megablastMegablast (instead of blastn) if TRUE [in]
thresholdThreshold value for finding neighboring words (fractional values are allowed, though unless the engine scales up alignment scores a fractional threshold will be rounded down) [in]
word_sizeNumber of matched residues in an initial word [in]

Definition at line 1099 of file blast_options.c.

References Blast_ProgramIsRpsBlast(), BLAST_WORDSIZE_MAPPER, BLAST_WORDSIZE_MEGABLAST, BLAST_WORDSIZE_NUCL, BLASTERR_INVALIDPARAM, eAaLookupTable, eBlastTypeBlastn, eBlastTypeBlastp, eBlastTypeBlastx, eBlastTypeMapping, eBlastTypeTblastn, eCompressedAaLookupTable, eMBLookupTable, eNaHashLookupTable, eNaLookupTable, eRPSLookupTable, LookupTableOptions::lut_type, LookupTableOptions::threshold, and LookupTableOptions::word_size.

Referenced by AascanTestFixture::AascanTestFixture(), BOOST_AUTO_TEST_CASE(), AalookupTestFixture::FillLookupTable(), TestFixture::SetUpLookupTable(), and CMakeProfileDBApp::x_RPSAddFirstSequence().

Int2 BLAST_FillQuerySetUpOptions ( QuerySetUpOptions options,
EBlastProgramType  program,
const char *  filter_string,
Uint1  strand_option 
)

Fill non-default contents of the QuerySetUpOptions.

Parameters
optionsThe options structure [in] [out]
programProgram number (blastn, blastp, etc.) [in]
filter_stringParsable string of filtering options [in]
strand_optionwhich strand to search [in]

Definition at line 505 of file blast_options.c.

References BLASTERR_INVALIDPARAM, BlastFilteringOptionsFromString(), eBlastTypeBlastn, eBlastTypeBlastx, eBlastTypeMapping, eBlastTypePhiBlastn, eBlastTypeTblastx, QuerySetUpOptions::filter_string, QuerySetUpOptions::filtering_options, NULL, SBlastFilterOptionsFree(), sfree, and QuerySetUpOptions::strand_option.

Referenced by CMakeProfileDBApp::x_RPSAddFirstSequence().

Int2 BLAST_FillScoringOptions ( BlastScoringOptions options,
EBlastProgramType  program,
Boolean  greedy_extension,
Int4  penalty,
Int4  reward,
const char *  matrix,
Int4  gap_open,
Int4  gap_extend 
)

Fill non-default values in the BlastScoringOptions structure.

Parameters
optionsThe options structure [in] [out]
programProgram number (blastn, blastp, etc.) [in]
greedy_extensionIs greedy extension algorithm used? [in]
penaltyMismatch penalty score (blastn only) [in]
rewardMatch reward score (blastn only) [in]
matrixName of the BLAST matrix (all except blastn) [in]
gap_openExtra cost for opening a gap [in]
gap_extendCost of a gap [in]

Definition at line 794 of file blast_options.c.

References BLAST_GAP_EXTN_MEGABLAST, BLAST_GAP_EXTN_NUCL, BLAST_GAP_OPEN_MEGABLAST, BLAST_GAP_OPEN_NUCL, Blast_ProgramIsNucleotide(), BLASTERR_INVALIDPARAM, BlastScoringOptionsSetMatrix(), BlastScoringOptions::gap_extend, BlastScoringOptions::gap_open, BlastScoringOptions::penalty, BlastScoringOptions::program_number, and BlastScoringOptions::reward.

Referenced by AascanTestFixture::AascanTestFixture(), BOOST_AUTO_TEST_CASE(), AalookupTestFixture::FillLookupTable(), TestFixture::SetUpLookupTable(), and CScoreBuilder::x_Initialize().

Int2 BLAST_GetSuggestedThreshold ( EBlastProgramType  program_number,
const char *  matrixName,
double *  threshold 
)

Get thresholds for word-finding suggested by Stephen Altschul.

Parameters
program_numberType of blast program: blastn, blastp, blastx, tblastn, tblastx) [in]
matrixNamematrix, e.g., BLOSUM62 [in]
thresholdreturns suggested value [in|out]
Returns
zero on success

Definition at line 1143 of file blast_options.c.

References Blast_QueryIsTranslated(), Blast_SubjectIsTranslated(), BLASTERR_INVALIDPARAM, eBlastTypeBlastn, eBlastTypeMapping, NULL, strcasecmp, and TRUE.

Referenced by BOOST_AUTO_TEST_CASE(), and CWordThresholdArg::ExtractAlgorithmOptions().

Int2 BLAST_GetSuggestedWindowSize ( EBlastProgramType  program_number,
const char *  matrixName,
Int4 window_size 
)

Get window sizes for two hit algorithm suggested by Stephen Altschul.

Parameters
program_numberType of blast program: blastn, blastp, blastx, tblastn, tblastx) [in]
matrixNamematrix, e.g., BLOSUM62 [in]
window_sizereturns suggested value [in|out]
Returns
zero on success

Definition at line 1180 of file blast_options.c.

References BLASTERR_INVALIDPARAM, eBlastTypeBlastn, eBlastTypeMapping, NULL, and strcasecmp.

Referenced by BOOST_AUTO_TEST_CASE(), and CWindowSizeArg::ExtractAlgorithmOptions().

Int2 BLAST_InitDefaultOptions ( EBlastProgramType  blast_program,
LookupTableOptions **  lookup_options,
QuerySetUpOptions **  query_setup_options,
BlastInitialWordOptions **  word_options,
BlastExtensionOptions **  ext_options,
BlastHitSavingOptions **  hit_options,
BlastScoringOptions **  score_options,
BlastEffectiveLengthsOptions **  eff_len_options,
PSIBlastOptions **  protein_options,
BlastDatabaseOptions **  db_options 
)

Initialize all the BLAST search options structures with the default values.

Parameters
blast_programType of blast program: blastn, blastp, blastx, tblastn, tblastx) [in]
lookup_optionsLookup table options [out]
query_setup_optionsQuery options [out]
word_optionsInitial word processing options [out]
ext_optionsExtension options [out]
hit_optionsHit saving options [out]
score_optionsScoring options [out]
eff_len_optionsEffective length options [out]
protein_optionsProtein BLAST options [out]
db_optionsBLAST database options [out]

Definition at line 1587 of file blast_options.c.

References BlastDatabaseOptionsNew(), BlastEffectiveLengthsOptionsNew(), BlastExtensionOptionsNew(), BlastHitSavingOptionsNew(), BlastInitialWordOptionsNew(), BlastQuerySetUpOptionsNew(), BlastScoringOptionsNew(), LookupTableOptionsNew(), and PSIBlastOptionsNew().

Int2 BLAST_ValidateOptions ( EBlastProgramType  program_number,
const BlastExtensionOptions ext_options,
const BlastScoringOptions score_options,
const LookupTableOptions lookup_options,
const BlastInitialWordOptions word_options,
const BlastHitSavingOptions hit_options,
Blast_Message **  blast_msg 
)
BlastDatabaseOptions* BlastDatabaseOptionsFree ( BlastDatabaseOptions db_options)

Deallocate database options.

Definition at line 1577 of file blast_options.c.

References NULL, and sfree.

Referenced by BOOST_AUTO_TEST_CASE().

Int2 BlastDatabaseOptionsNew ( BlastDatabaseOptions **  db_options)

Allocates the BlastDatabase options structure and sets the default database genetic code value (BLAST_GENETIC_CODE).

Genetic code string in ncbistdaa must be populated by client code

Definition at line 1557 of file blast_options.c.

References BLAST_GENETIC_CODE, BLASTERR_INVALIDPARAM, BLASTERR_MEMORY, BlastDatabaseOptions::genetic_code, and NULL.

Referenced by BLAST_InitDefaultOptions(), and CBlastOptionsLocal::CBlastOptionsLocal().

Boolean BlastEffectiveLengthsOptions_IsSearchSpaceSet ( const BlastEffectiveLengthsOptions options)

Return true if the search spaces is set for any of the queries in the search.

Parameters
optionsThe options to examine [in]

Definition at line 991 of file blast_options.c.

References FALSE, i, NULL, BlastEffectiveLengthsOptions::num_searchspaces, BlastEffectiveLengthsOptions::searchsp_eff, and TRUE.

Referenced by BLAST_CalcEffLengths().

BlastEffectiveLengthsOptions* BlastEffectiveLengthsOptionsFree ( BlastEffectiveLengthsOptions options)

Deallocate memory for BlastEffectiveLengthsOptions*.

Parameters
optionsStructure to free [in]

Definition at line 961 of file blast_options.c.

References NULL, BlastEffectiveLengthsOptions::searchsp_eff, and sfree.

Referenced by BOOST_AUTO_TEST_CASE(), CBlastExtendTestFixture::fillEffectiveLengths(), LinkHspTestFixture::fillEffectiveLengths(), and CRedoAlignmentTestFixture::runRedoAlignmentCoreUnitTest().

Int2 BlastEffectiveLengthsOptionsNew ( BlastEffectiveLengthsOptions **  options)
BlastExtensionOptions* BlastExtensionOptionsFree ( BlastExtensionOptions options)
Int2 BlastExtensionOptionsNew ( EBlastProgramType  program,
BlastExtensionOptions **  options,
Boolean  gapped 
)
Int2 BlastExtensionOptionsValidate ( EBlastProgramType  program_number,
const BlastExtensionOptions options,
Blast_Message **  blast_msg 
)

Validate contents of BlastExtensionOptions.

Parameters
program_numberType of BLAST program [in]
optionsOptions to be validated [in]
blast_msgDescribes any validation problems found [out]

Definition at line 711 of file blast_options.c.

References Blast_MessageWrite(), BLASTERR_INVALIDPARAM, BLASTERR_OPTION_PROGRAM_INVALID, BLASTERR_OPTION_VALUE_INVALID, eBlastSevWarning, eBlastTypeBlastn, eBlastTypeMapping, eGreedyScoreOnly, eGreedyTbck, BlastExtensionOptions::ePrelimGapExt, eSmithWatermanScoreOnly, eSmithWatermanTbckFull, BlastExtensionOptions::eTbackExt, kBlastMessageNoContext, and NULL.

Referenced by BLAST_ValidateOptions().

BlastHitSavingOptions* BlastHitSavingOptionsFree ( BlastHitSavingOptions options)
Int2 BlastHitSavingOptionsNew ( EBlastProgramType  program,
BlastHitSavingOptions **  options,
Boolean  gapped_calculation 
)
Int2 BlastHitSavingOptionsValidate ( EBlastProgramType  program_number,
const BlastHitSavingOptions options,
Blast_Message **  blast_msg 
)
BlastHSPBestHitOptions* BlastHSPBestHitOptionsFree ( BlastHSPBestHitOptions opt)

Deallocate a BlastHSPBestHitOptions structure.

Parameters
optobject to be deallocated. [in]

Definition at line 1785 of file blast_options.c.

References NULL, and sfree.

Referenced by BlastHSPFilteringOptionsFree(), and s_GetBestHitParams().

BlastHSPBestHitOptions* BlastHSPBestHitOptionsNew ( double  overhang,
double  score_edge 
)
Int2 BlastHSPBestHitOptionsValidate ( const BlastHSPFilteringOptions opts)

Validate the best hit algorithm parameters (if any) in the.

Parameters
optsBlastHSPFilteringOptions structure
Returns
0 on success, else non-zero

Definition at line 1763 of file blast_options.c.

References BlastHSPFilteringOptions::best_hit, kBestHit_OverhangMax, kBestHit_OverhangMin, kBestHit_ScoreEdgeMax, kBestHit_ScoreEdgeMin, BlastHSPBestHitOptions::overhang, and BlastHSPBestHitOptions::score_edge.

Referenced by BlastHSPFilteringOptionsValidate().

BlastHSPCullingOptions* BlastHSPCullingOptionsFree ( BlastHSPCullingOptions culling_opts)

Deallocates culling options structure.

Parameters
culling_optsobject to be deallocated. [in]

Definition at line 1817 of file blast_options.c.

References NULL, and sfree.

Referenced by BlastHSPFilteringOptionsFree(), and s_GetCullingParams().

BlastHSPCullingOptions* BlastHSPCullingOptionsNew ( int  max)

Allocate a new object for culling options.

Parameters
maxnumber of HSPs that may be aligned to one part of query [in]

Definition at line 1794 of file blast_options.c.

References max(), and BlastHSPCullingOptions::max_hits.

Referenced by s_GetCullingParams(), and CBlastOptionsLocal::SetCullingLimit().

Int2 BlastHSPCullingOptionsValidate ( const BlastHSPFilteringOptions opts)

Validate culling options.

Parameters
optsBlastHSPFilteringOptions structure
Returns
0 on success, else non-zero

Definition at line 1803 of file blast_options.c.

References BlastHSPFilteringOptions::culling_opts, and BlastHSPCullingOptions::max_hits.

Referenced by BlastHSPFilteringOptionsValidate().

Int2 BlastHSPFilteringOptions_AddBestHit ( BlastHSPFilteringOptions filt_opts,
BlastHSPBestHitOptions **  opts,
EBlastStage  stage 
)

Add the best hit options.

Responsibility for best_hit is taken over by the BlastHSPFilteringOptions

Parameters
filt_optsHSP filtering options [in]
best_hitBest Hit algorithm options. Ownership of this is taken by the BlastHSPFilteringOptions structure [in|out]

Definition at line 1834 of file blast_options.c.

References BlastHSPFilteringOptions::best_hit, BlastHSPFilteringOptions::best_hit_stage, and NULL.

Referenced by CBlastOptionsLocal::SetBestHitOverhang(), and CBlastOptionsLocal::SetBestHitScoreEdge().

Int2 BlastHSPFilteringOptions_AddCulling ( BlastHSPFilteringOptions filt_opts,
BlastHSPCullingOptions **  opts,
EBlastStage  stage 
)
BlastHSPFilteringOptions* BlastHSPFilteringOptionsFree ( BlastHSPFilteringOptions opts)
BlastHSPFilteringOptions* BlastHSPFilteringOptionsNew ( )
Int2 BlastHSPFilteringOptionsValidate ( const BlastHSPFilteringOptions opts)
BlastInitialWordOptions* BlastInitialWordOptionsFree ( BlastInitialWordOptions options)

Deallocate memory for BlastInitialWordOptions.

Parameters
optionsStructure to free [in]

Definition at line 533 of file blast_options.c.

References NULL, and sfree.

Referenced by BOOST_AUTO_TEST_CASE(), LinkHspTestFixture::setupCutoffScores(), TestFixture::TearDownLookupTable(), and NuclWordFinderTextFixture::~NuclWordFinderTextFixture().

Int2 BlastInitialWordOptionsNew ( EBlastProgramType  program,
BlastInitialWordOptions **  options 
)
Int2 BlastInitialWordOptionsValidate ( EBlastProgramType  program_number,
const BlastInitialWordOptions options,
Blast_Message **  blast_msg 
)

Validate correctness of the initial word options.

Parameters
program_numberType of BLAST program [in]
optionsInitial word options [in]
blast_msgDescribes any validation problems found [out]
Returns
Validation status

Definition at line 572 of file blast_options.c.

References ASSERT, Blast_MessageWrite(), Blast_ProgramIsPhiBlast(), BLASTERR_OPTION_VALUE_INVALID, eBlastSevError, eBlastTypeBlastn, eBlastTypeMapping, kBlastMessageNoContext, BlastInitialWordOptions::scan_range, BlastInitialWordOptions::window_size, and BlastInitialWordOptions::x_dropoff.

Referenced by BLAST_ValidateOptions().

QuerySetUpOptions* BlastQuerySetUpOptionsFree ( QuerySetUpOptions options)
Int2 BlastQuerySetUpOptionsNew ( QuerySetUpOptions **  options)
Int2 BlastScoringOptionsDup ( BlastScoringOptions **  new_opt,
const BlastScoringOptions old_opt 
)

Produces copy of "old" options, with new memory allocated.

Parameters
new_optContains copied BlastScoringOptions upon return [out]
old_optBlastScoringOptions to be copied [in]

Definition at line 927 of file blast_options.c.

References BLASTERR_INVALIDPARAM, BLASTERR_MEMORY, BlastMemDup(), BlastScoringOptions::matrix, BlastScoringOptions::matrix_path, NULL, and strdup.

Referenced by CBlastOptionsLocal::x_Copy_CBlastScoringOptions().

BlastScoringOptions* BlastScoringOptionsFree ( BlastScoringOptions options)
Int2 BlastScoringOptionsNew ( EBlastProgramType  program,
BlastScoringOptions **  options 
)
Int2 BlastScoringOptionsSetMatrix ( BlastScoringOptions opts,
const char *  matrix_name 
)

Resets matrix name option.

Automatically converts the name to upper case.

Parameters
optsOptions structure to update. [in] [out]
matrix_nameNew matrix name. If NULL, old matrix name is left as is. [in]

Definition at line 945 of file blast_options.c.

References i, BlastScoringOptions::matrix, sfree, strdup, and toupper().

Referenced by BLAST_FillScoringOptions(), and CPssmEngine::x_InitializeScoreBlock().

Int2 BlastScoringOptionsValidate ( EBlastProgramType  program_number,
const BlastScoringOptions options,
Blast_Message **  blast_msg 
)
LookupTableOptions* LookupTableOptionsFree ( LookupTableOptions options)
Int2 LookupTableOptionsNew ( EBlastProgramType  program,
LookupTableOptions **  options 
)
Int2 LookupTableOptionsValidate ( EBlastProgramType  program_number,
const LookupTableOptions options,
Blast_Message **  blast_msg 
)
PSIBlastOptions* PSIBlastOptionsFree ( PSIBlastOptions psi_options)
Int2 PSIBlastOptionsNew ( PSIBlastOptions **  psi_options)
Int2 PSIBlastOptionsValidate ( const PSIBlastOptions psi_options,
Blast_Message **  blast_msg 
)

Validates the PSI BLAST options so that they have sane values.

Parameters
psi_optionsstructure to validate [in]
blast_msgDescribes any validation problems found [out]
Returns
0 on success 1 on failure

Definition at line 1526 of file blast_options.c.

References Blast_MessageWrite(), eBlastSevError, PSIBlastOptions::inclusion_ethresh, kBlastMessageNoContext, and PSIBlastOptions::pseudo_count.

Referenced by s_Validate().

SBlastFilterOptions* SBlastFilterOptionsFree ( SBlastFilterOptions filter_options)
Boolean SBlastFilterOptionsMaskAtHash ( const SBlastFilterOptions filter_options)

Queries whether masking should be done only for the lookup table or for the entire search.

Parameters
filter_optionsthe object to be queried [in]
Returns
TRUE or FALSE, FALSE if filter_options is NULL.

Definition at line 404 of file blast_options.c.

References FALSE, SBlastFilterOptions::mask_at_hash, and NULL.

Referenced by BLAST_MainSetUp(), BlastFilteringOptionsToString(), and s_HasMaskAtHashEnabled().

Int2 SBlastFilterOptionsMerge ( SBlastFilterOptions **  combined,
const SBlastFilterOptions opt1,
const SBlastFilterOptions opt2 
)

Merges two sets of options together, taking the non-default one as preferred.

if both are non-default then one or the other is taken.

Parameters
combinedobject that is returned [in|out]
opt1first set of options [in]
opt2second set of options [in]
Returns
zero on success.

Definition at line 361 of file blast_options.c.

References SBlastFilterOptions::dustOptions, eEmpty, SBlastFilterOptions::mask_at_hash, NULL, SBlastFilterOptions::repeatFilterOptions, s_MergeDustOptions(), s_MergeRepeatOptions(), s_MergeSegOptions(), s_MergeWindowMaskerOptions(), SBlastFilterOptionsNew(), SBlastFilterOptions::segOptions, TRUE, and SBlastFilterOptions::windowMaskerOptions.

Referenced by BOOST_AUTO_TEST_CASE(), and CBlastOptionsLocal::SetFilterString().

Int2 SBlastFilterOptionsNew ( SBlastFilterOptions **  filter_options,
EFilterOptions  type 
)

Allocates memory for SBlastFilterOptions and.

Parameters
filter_optionsoptions that are being returned [in|out]
typespecify either dust or seg (now) with EFilterOptions [in]
Returns
zero on sucess

Definition at line 195 of file blast_options.c.

References eDust, eDustRepeats, eRepeats, eSeg, FALSE, SBlastFilterOptions::mask_at_hash, SDustOptionsNew(), SRepeatFilterOptionsNew(), and SSegOptionsNew().

Referenced by BlastFilteringOptionsFromString(), BlastQuerySetUpOptionsNew(), BOOST_AUTO_TEST_CASE(), CFilteringMemento::CFilteringMemento(), and SBlastFilterOptionsMerge().

Boolean SBlastFilterOptionsNoFiltering ( const SBlastFilterOptions filter_options)

Queries whether no masking is required.

Parameters
filter_optionsthe object to be queried [in]
Returns
TRUE if no filtering is required or argument is NULL, FALSE otherwise

Definition at line 393 of file blast_options.c.

References SBlastFilterOptions::dustOptions, NULL, SBlastFilterOptions::repeatFilterOptions, SBlastFilterOptions::segOptions, TRUE, and SBlastFilterOptions::windowMaskerOptions.

Int2 SBlastFilterOptionsValidate ( EBlastProgramType  program_number,
const SBlastFilterOptions filter_options,
Blast_Message **  blast_message 
)

Validates filter options to ensure that program and options are consistent and that options have valid values.

Parameters
program_numberProgram number (blastn, blastp, etc.) [in]
filter_optionsoptions to add to [in]
blast_messageerror or warning (optional) [out]
Returns
zero on success

Definition at line 412 of file blast_options.c.

References Blast_MessageWrite(), BLASTERR_INVALIDPARAM, BLASTERR_OPTION_PROGRAM_INVALID, SRepeatFilterOptions::database, SBlastFilterOptions::dustOptions, eBlastSevError, eBlastSevWarning, eBlastTypeBlastn, eBlastTypeMapping, kBlastMessageNoContext, NULL, SBlastFilterOptions::repeatFilterOptions, and SBlastFilterOptions::segOptions.

Referenced by BlastSetUp_Filter().

SDustOptions* SDustOptionsFree ( SDustOptions dust_options)

Frees SDustOptions.

Parameters
dust_optionsobject to free
Returns
NULL pointer

Definition at line 50 of file blast_options.c.

References NULL, and sfree.

Referenced by BlastFilteringOptionsFromString(), BOOST_AUTO_TEST_CASE(), SBlastFilterOptionsFree(), and CBlastOptionsLocal::SetDustFiltering().

Int2 SDustOptionsNew ( SDustOptions **  dust_options)
SRepeatFilterOptions* SRepeatFilterOptionsFree ( SRepeatFilterOptions repeat_options)
Int2 SRepeatFilterOptionsNew ( SRepeatFilterOptions **  repeat_options)

Allocates memory for SRepeatFilterOptions, fills in defaults.

Parameters
repeat_optionsoptions that are being returned [in|out]
Returns
zero on sucess

Definition at line 127 of file blast_options.c.

References BLASTERR_MEMORY, kDefaultRepeatFilterDb, NULL, and strdup.

Referenced by BlastFilteringOptionsFromString(), s_MergeRepeatOptions(), SBlastFilterOptionsNew(), CBlastOptionsLocal::SetRepeatFiltering(), and SRepeatFilterOptionsResetDB().

Int2 SRepeatFilterOptionsResetDB ( SRepeatFilterOptions **  repeat_options,
const char *  dbname 
)

Resets name of db for repeat filtering.

Parameters
repeat_optionsalready allocated options constaining field to be reset [in|out]
dbnamename of the database(s) [in]
Returns
zero on sucess

Definition at line 142 of file blast_options.c.

References NULL, sfree, SRepeatFilterOptionsNew(), and strdup.

Referenced by BOOST_AUTO_TEST_CASE(), s_MergeRepeatOptions(), and CBlastOptionsLocal::SetRepeatFilteringDB().

SSegOptions* SSegOptionsFree ( SSegOptions seg_options)

Frees SSegOptions.

Parameters
seg_optionsobject to free [in]
Returns
NULL pointer

Definition at line 70 of file blast_options.c.

References NULL, and sfree.

Referenced by BlastFilteringOptionsFromString(), SBlastFilterOptionsFree(), and CBlastOptionsLocal::SetSegFiltering().

Int2 SSegOptionsNew ( SSegOptions **  seg_options)

Allocates memory for SSegOptions, fills in defaults.

[in|out]

Parameters
seg_optionsoptions that are being returned [in|out]
Returns
zero on sucess

Definition at line 77 of file blast_options.c.

References kSegHicut, kSegLocut, kSegWindow, NULL, and SSegOptions::window.

Referenced by BlastFilteringOptionsFromString(), s_MergeSegOptions(), SBlastFilterOptionsNew(), CBlastOptionsLocal::SetSegFiltering(), CBlastOptionsLocal::SetSegFilteringHicut(), CBlastOptionsLocal::SetSegFilteringLocut(), and CBlastOptionsLocal::SetSegFilteringWindow().

SWindowMaskerOptions* SWindowMaskerOptionsFree ( SWindowMaskerOptions winmask_options)

Frees SWindowMaskerOptions.

Parameters
winmask_optionsobject to free [in]
Returns
NULL pointer

Definition at line 104 of file blast_options.c.

References SWindowMaskerOptions::database, NULL, and sfree.

Referenced by BlastFilteringOptionsFromString(), and SBlastFilterOptionsFree().

Int2 SWindowMaskerOptionsNew ( SWindowMaskerOptions **  winmask_options)

Allocates memory for SWindowMaskerOptions, fills in defaults.

Parameters
winmask_optionsoptions that are being returned [in|out]
Returns
zero on sucess

Definition at line 90 of file blast_options.c.

References BLASTERR_MEMORY, and NULL.

Referenced by BlastFilteringOptionsFromString(), s_MergeWindowMaskerOptions(), CBlastOptionsLocal::SetWindowMaskerDatabase(), CBlastOptionsLocal::SetWindowMaskerTaxId(), and SWindowMaskerOptionsResetDB().

Int2 SWindowMaskerOptionsResetDB ( SWindowMaskerOptions **  winmask_options,
const char *  dbname 
)

Resets name of db for window masker filtering.

Parameters
winmask_optionsoptions block constaining field to be reset [in|out]
dbnamename of the database(s) [in]
Returns
zero on sucess

Definition at line 158 of file blast_options.c.

References NULL, sfree, strdup, and SWindowMaskerOptionsNew().

Referenced by s_MergeWindowMaskerOptions(), and CBlastOptionsLocal::SetWindowMaskerDatabase().

Variable Documentation

const double kPSSM_NoImpalaScaling

Value used to indicate that no IMPALA-style scaling should be performed when scaling a PSSM.

Definition at line 43 of file blast_options.c.

Referenced by _PSICreateAndScalePssmFromFrequencyRatios(), IPssmInputFreqRatios::GetImpalaScaleFactor(), PSIBlastOptionsNew(), and CPssmEngine::x_PSIMatrix2Asn1().

Modified on Mon Jan 23 17:04:51 2017 by modify_doxy.py rev. 506947