NCBI C++ ToolKit
Functions | Variables
blast_options.c File Reference

The structures and functions in blast_options. More...

#include <algo/blast/core/blast_options.h>
#include <algo/blast/core/blast_filter.h>
#include <algo/blast/core/blast_stat.h>
#include <algo/blast/composition_adjustment/composition_constants.h>
#include <algo/blast/core/hspfilter_collector.h>
#include <algo/blast/core/hspfilter_besthit.h>
#include <algo/blast/core/blast_util.h>
+ Include dependency graph for blast_options.c:

Go to the source code of this file.

Go to the SVN repository for this file.

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 SWindowMaskerOptionsNew (SWindowMaskerOptions **winmask_options)
 Allocates memory for SWindowMaskerOptions, fills in defaults. More...
 
SWindowMaskerOptionsSWindowMaskerOptionsFree (SWindowMaskerOptions *winmask_options)
 Frees SWindowMaskerOptions. More...
 
SRepeatFilterOptionsSRepeatFilterOptionsFree (SRepeatFilterOptions *repeat_options)
 Frees SRepeatFilterOptions. More...
 
Int2 SRepeatFilterOptionsNew (SRepeatFilterOptions **repeat_options)
 Allocates memory for SRepeatFilterOptions, fills in defaults. More...
 
Int2 SRepeatFilterOptionsResetDB (SRepeatFilterOptions **repeat_options, const char *db)
 Resets name of db for repeat filtering. More...
 
Int2 SWindowMaskerOptionsResetDB (SWindowMaskerOptions **winmask_options, const char *db)
 Resets name of db for window masker filtering. More...
 
SReadQualityOptionsSReadQualityOptionsFree (SReadQualityOptions *read_quality_options)
 Frees memory for SReadQualityOptions. More...
 
Int2 SReadQualityOptionsNew (SReadQualityOptions **read_quality_options)
 Allocates memory for SReadQualityOptions, fills in defaults. More...
 
SBlastFilterOptionsSBlastFilterOptionsFree (SBlastFilterOptions *filter_options)
 Frees SBlastFilterOptions and all subservient structures. More...
 
Int2 SBlastFilterOptionsNew (SBlastFilterOptions **filter_options, EFilterOptions type)
 Allocates memory for SBlastFilterOptions and. More...
 
static SDustOptionss_MergeDustOptions (const SDustOptions *opt1, const SDustOptions *opt2)
 Merges together two sets of dust options, choosing the most non-default one. More...
 
static SSegOptionss_MergeSegOptions (const SSegOptions *opt1, const SSegOptions *opt2)
 Merges together two sets of SEG options, choosing the most non-default one. More...
 
static SRepeatFilterOptionss_MergeRepeatOptions (const SRepeatFilterOptions *opt1, const SRepeatFilterOptions *opt2)
 Merges together two sets of repeat filter options, choosing the most non-default one. More...
 
static SWindowMaskerOptionss_MergeWindowMaskerOptions (const SWindowMaskerOptions *opt1, const SWindowMaskerOptions *opt2)
 Merges together two sets of window masker options, choosing the most non-default one. 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...
 
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_number, BlastScoringOptions **options)
 Allocate memory for BlastScoringOptions and fill with default values. More...
 
Int2 BLAST_FillScoringOptions (BlastScoringOptions *options, EBlastProgramType program_number, 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...
 
LookupTableOptionsLookupTableOptionsFree (LookupTableOptions *options)
 Deallocates memory for LookupTableOptions*. More...
 
Int2 LookupTableOptionsNew (EBlastProgramType program_number, LookupTableOptions **options)
 Allocate memory for lookup table options and fill with default values. More...
 
Int2 BLAST_FillLookupTableOptions (LookupTableOptions *options, EBlastProgramType program_number, Boolean is_megablast, double threshold, Int4 word_size)
 Allocate memory for lookup table options and fill with default values. 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...
 
static Boolean s_DiscWordOptionsValidate (Int4 word_size, Uint1 template_length, Uint1 template_type, Blast_Message **blast_msg)
 Validate options for the discontiguous word megablast Word size must be 11 or 12; template length 16, 18 or 21; template type 0, 1 or 2. 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 BlastHitSavingOptionsNew (EBlastProgramType program_number, 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 BlastHitSavingOptionsValidate (EBlastProgramType program_number, const BlastHitSavingOptions *options, Blast_Message **blast_msg)
 Validate 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...
 
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 program_number, LookupTableOptions **lookup_options, QuerySetUpOptions **query_setup_options, BlastInitialWordOptions **word_options, BlastExtensionOptions **ext_options, BlastHitSavingOptions **hit_options, BlastScoringOptions **score_options, BlastEffectiveLengthsOptions **eff_len_options, PSIBlastOptions **psi_options, BlastDatabaseOptions **db_options)
 Initialize all the BLAST search options structures with the default values. More...
 
static Int2 s_BlastExtensionScoringOptionsValidate (EBlastProgramType program_number, const BlastExtensionOptions *ext_options, const BlastScoringOptions *score_options, Blast_Message **blast_msg)
 Checks that the extension and scoring options are consistent with each other. 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...
 
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 **best_hit, EBlastStage stage)
 Add the best hit options. More...
 
Int2 BlastHSPFilteringOptions_AddCulling (BlastHSPFilteringOptions *filt_opts, BlastHSPCullingOptions **culling, 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...
 
BlastHSPSubjectBestHitOptionsBlastHSPSubjectBestHitOptionsNew (Boolean isProtein)
 Allocate a new object for subject besthit options. More...
 
Int2 BlastHSPSubjectBestHitOptionsValidate (const BlastHSPFilteringOptions *opts)
 Validate subject besthit options. More...
 
BlastHSPSubjectBestHitOptionsBlastHSPSubjectBestHitOptionsFree (BlastHSPSubjectBestHitOptions *subject_besthit_opts)
 Deallocates subject besthit structure. More...
 
Int2 BlastHSPFilteringOptions_AddSubjectBestHit (BlastHSPFilteringOptions *filt_opts, BlastHSPSubjectBestHitOptions **subject_besthit)
 

Variables

const double kPSSM_NoImpalaScaling = 1.0
 Value used to indicate that no IMPALA-style scaling should be performed when scaling a PSSM. More...
 
const int kDustLevel = 20
 Declared in blast_def.h as extern const. More...
 
const int kDustWindow = 64
 Window parameter used by dust. More...
 
const int kDustLinker = 1
 Parameter used by dust to link together close low-complexity segments. 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.c.

Function Documentation

◆ BLAST_FillEffectiveLengthsOptions()

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 1038 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().

◆ BLAST_FillExtensionOptions()

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 699 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.

◆ BLAST_FillHitSavingOptions()

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 1482 of file blast_options.c.

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

◆ BLAST_FillInitialWordOptions()

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 634 of file blast_options.c.

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

◆ BLAST_FillLookupTableOptions()

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 1129 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::max_db_word_count, MAX_DB_WORD_COUNT_MAPPER, LookupTableOptions::threshold, and LookupTableOptions::word_size.

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

◆ BLAST_FillQuerySetUpOptions()

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 534 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().

◆ BLAST_FillScoringOptions()

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 823 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(), CompressedAascanTestFixture::CompressedAascanTestFixture(), CompressedAalookupTestFixture::FillLookupTable(), AalookupTestFixture::FillLookupTable(), TestFixture::SetUpLookupTable(), and CScoreBuilder::x_Initialize().

◆ BLAST_GetSuggestedThreshold()

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 1174 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().

◆ BLAST_GetSuggestedWindowSize()

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 1211 of file blast_options.c.

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

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

◆ BLAST_InitDefaultOptions()

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 1638 of file blast_options.c.

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

◆ BLAST_ValidateOptions()

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 
)

◆ BlastDatabaseOptionsFree()

BlastDatabaseOptions* BlastDatabaseOptionsFree ( BlastDatabaseOptions db_options)

Deallocate database options.

Definition at line 1628 of file blast_options.c.

References NULL, and sfree.

Referenced by BOOST_AUTO_TEST_CASE().

◆ BlastDatabaseOptionsNew()

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 1608 of file blast_options.c.

References BLAST_GENETIC_CODE, BLASTERR_INVALIDPARAM, BLASTERR_MEMORY, calloc(), BlastDatabaseOptions::genetic_code, and NULL.

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

◆ BlastEffectiveLengthsOptions_IsSearchSpaceSet()

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 1020 of file blast_options.c.

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

Referenced by BLAST_CalcEffLengths().

◆ BlastEffectiveLengthsOptionsFree()

BlastEffectiveLengthsOptions* BlastEffectiveLengthsOptionsFree ( BlastEffectiveLengthsOptions options)

Deallocate memory for BlastEffectiveLengthsOptions*.

Parameters
optionsStructure to free [in]

Definition at line 990 of file blast_options.c.

References NULL, BlastEffectiveLengthsOptions::searchsp_eff, and sfree.

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

◆ BlastEffectiveLengthsOptionsNew()

Int2 BlastEffectiveLengthsOptionsNew ( BlastEffectiveLengthsOptions **  options)

◆ BlastExtensionOptionsFree()

BlastExtensionOptions* BlastExtensionOptionsFree ( BlastExtensionOptions options)

◆ BlastExtensionOptionsNew()

Int2 BlastExtensionOptionsNew ( EBlastProgramType  program,
BlastExtensionOptions **  options,
Boolean  gapped 
)

◆ BlastExtensionOptionsValidate()

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 740 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().

◆ BlastHitSavingOptionsFree()

BlastHitSavingOptions* BlastHitSavingOptionsFree ( BlastHitSavingOptions options)

◆ BlastHitSavingOptionsNew()

Int2 BlastHitSavingOptionsNew ( EBlastProgramType  program,
BlastHitSavingOptions **  options,
Boolean  gapped_calculation 
)

◆ BlastHitSavingOptionsValidate()

Int2 BlastHitSavingOptionsValidate ( EBlastProgramType  program_number,
const BlastHitSavingOptions options,
Blast_Message **  blast_msg 
)

◆ BlastHSPBestHitOptionsFree()

BlastHSPBestHitOptions* BlastHSPBestHitOptionsFree ( BlastHSPBestHitOptions opt)

Deallocate a BlastHSPBestHitOptions structure.

Parameters
optobject to be deallocated. [in]

Definition at line 1846 of file blast_options.c.

References NULL, and sfree.

Referenced by BlastHSPFilteringOptionsFree(), and s_GetBestHitParams().

◆ BlastHSPBestHitOptionsNew()

BlastHSPBestHitOptions* BlastHSPBestHitOptionsNew ( double  overhang,
double  score_edge 
)

◆ BlastHSPBestHitOptionsValidate()

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 1824 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().

◆ BlastHSPCullingOptionsFree()

BlastHSPCullingOptions* BlastHSPCullingOptionsFree ( BlastHSPCullingOptions culling_opts)

Deallocates culling options structure.

Parameters
culling_optsobject to be deallocated. [in]

Definition at line 1878 of file blast_options.c.

References NULL, and sfree.

Referenced by BlastHSPFilteringOptionsFree(), and s_GetCullingParams().

◆ BlastHSPCullingOptionsNew()

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 1855 of file blast_options.c.

References calloc(), max(), and BlastHSPCullingOptions::max_hits.

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

◆ BlastHSPCullingOptionsValidate()

Int2 BlastHSPCullingOptionsValidate ( const BlastHSPFilteringOptions opts)

Validate culling options.

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

Definition at line 1864 of file blast_options.c.

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

Referenced by BlastHSPFilteringOptionsValidate().

◆ BlastHSPFilteringOptions_AddBestHit()

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 1895 of file blast_options.c.

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

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

◆ BlastHSPFilteringOptions_AddCulling()

Int2 BlastHSPFilteringOptions_AddCulling ( BlastHSPFilteringOptions filt_opts,
BlastHSPCullingOptions **  culling,
EBlastStage  stage 
)

◆ BlastHSPFilteringOptions_AddSubjectBestHit()

Int2 BlastHSPFilteringOptions_AddSubjectBestHit ( BlastHSPFilteringOptions filt_opts,
BlastHSPSubjectBestHitOptions **  subject_besthit 
)

◆ BlastHSPFilteringOptionsFree()

BlastHSPFilteringOptions* BlastHSPFilteringOptionsFree ( BlastHSPFilteringOptions opts)

◆ BlastHSPFilteringOptionsNew()

BlastHSPFilteringOptions* BlastHSPFilteringOptionsNew ( )

◆ BlastHSPFilteringOptionsValidate()

Int2 BlastHSPFilteringOptionsValidate ( const BlastHSPFilteringOptions opts)

◆ BlastHSPSubjectBestHitOptionsFree()

BlastHSPSubjectBestHitOptions* BlastHSPSubjectBestHitOptionsFree ( BlastHSPSubjectBestHitOptions subject_besthit_opts)

Deallocates subject besthit structure.

Parameters
subject_besthitobject to be deallocated. [in]

Definition at line 1988 of file blast_options.c.

References NULL, and sfree.

Referenced by BlastHSPFilteringOptionsFree(), and BOOST_AUTO_TEST_CASE().

◆ BlastHSPSubjectBestHitOptionsNew()

BlastHSPSubjectBestHitOptions* BlastHSPSubjectBestHitOptionsNew ( Boolean  isProtein)

Allocate a new object for subject besthit options.

@params isProtein true if protein alignment [in]

Definition at line 1963 of file blast_options.c.

References calloc(), DEFAULT_SUBJECT_BESTHIT_NUCL_MAX_RANGE_DIFF, DEFAULT_SUBJECT_BESTHIT_PROT_MAX_RANGE_DIFF, and BlastHSPSubjectBestHitOptions::max_range_diff.

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

◆ BlastHSPSubjectBestHitOptionsValidate()

Int2 BlastHSPSubjectBestHitOptionsValidate ( const BlastHSPFilteringOptions opts)

Validate subject besthit options.

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

Definition at line 1977 of file blast_options.c.

References BlastHSPFilteringOptions::subject_besthit_opts.

◆ BlastInitialWordOptionsFree()

BlastInitialWordOptions* BlastInitialWordOptionsFree ( BlastInitialWordOptions options)

Deallocate memory for BlastInitialWordOptions.

Parameters
optionsStructure to free [in]

Definition at line 562 of file blast_options.c.

References NULL, and sfree.

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

◆ BlastInitialWordOptionsNew()

Int2 BlastInitialWordOptionsNew ( EBlastProgramType  program,
BlastInitialWordOptions **  options 
)

◆ BlastInitialWordOptionsValidate()

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 601 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().

◆ BlastQuerySetUpOptionsFree()

QuerySetUpOptions* BlastQuerySetUpOptionsFree ( QuerySetUpOptions options)

◆ BlastQuerySetUpOptionsNew()

Int2 BlastQuerySetUpOptionsNew ( QuerySetUpOptions **  options)

◆ BlastScoringOptionsDup()

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 956 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().

◆ BlastScoringOptionsFree()

BlastScoringOptions* BlastScoringOptionsFree ( BlastScoringOptions options)

◆ BlastScoringOptionsNew()

Int2 BlastScoringOptionsNew ( EBlastProgramType  program,
BlastScoringOptions **  options 
)

◆ BlastScoringOptionsSetMatrix()

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 974 of file blast_options.c.

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

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

◆ BlastScoringOptionsValidate()

Int2 BlastScoringOptionsValidate ( EBlastProgramType  program_number,
const BlastScoringOptions options,
Blast_Message **  blast_msg 
)

◆ LookupTableOptionsFree()

LookupTableOptions* LookupTableOptionsFree ( LookupTableOptions options)

◆ LookupTableOptionsNew()

Int2 LookupTableOptionsNew ( EBlastProgramType  program,
LookupTableOptions **  options 
)

◆ LookupTableOptionsValidate()

Int2 LookupTableOptionsValidate ( EBlastProgramType  program_number,
const LookupTableOptions options,
Blast_Message **  blast_msg 
)

◆ PSIBlastOptionsFree()

PSIBlastOptions* PSIBlastOptionsFree ( PSIBlastOptions psi_options)

◆ PSIBlastOptionsNew()

Int2 PSIBlastOptionsNew ( PSIBlastOptions **  psi_options)

◆ PSIBlastOptionsValidate()

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 1577 of file blast_options.c.

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

Referenced by s_Validate().

◆ s_BlastExtensionScoringOptionsValidate()

static Int2 s_BlastExtensionScoringOptionsValidate ( EBlastProgramType  program_number,
const BlastExtensionOptions ext_options,
const BlastScoringOptions score_options,
Blast_Message **  blast_msg 
)
static

Checks that the extension and scoring options are consistent with each other.

Parameters
program_numberidentifies the program [in]
ext_optionsthe extension options [in]
score_optionsthe scoring options [in]
blast_msgreturns a message on errors. [in|out]
Returns
zero on success, an error code otherwise.

Definition at line 1691 of file blast_options.c.

References Blast_MessageWrite(), Blast_QueryIsPssm(), BLASTERR_INVALIDPARAM, BLASTERR_OPTION_VALUE_INVALID, BlastExtensionOptions::compositionBasedStats, eBlastSevWarning, eBlastTypeBlastn, eBlastTypeBlastp, eBlastTypeBlastx, eBlastTypeMapping, eBlastTypePsiBlast, eBlastTypeRpsBlast, eBlastTypeRpsTblastn, eBlastTypeTblastn, eGreedyScoreOnly, eGreedyTbck, eJumperWithTraceback, eNoCompositionBasedStats, BlastExtensionOptions::ePrelimGapExt, BlastExtensionOptions::eTbackExt, BlastScoringOptions::gap_extend, BlastScoringOptions::gap_open, BlastScoringOptions::gapped_calculation, kBlastMessageNoContext, and NULL.

Referenced by BLAST_ValidateOptions().

◆ s_DiscWordOptionsValidate()

static Boolean s_DiscWordOptionsValidate ( Int4  word_size,
Uint1  template_length,
Uint1  template_type,
Blast_Message **  blast_msg 
)
static

Validate options for the discontiguous word megablast Word size must be 11 or 12; template length 16, 18 or 21; template type 0, 1 or 2.

Parameters
word_sizeWord size option [in]
template_lengthDiscontiguous template length [in]
template_typeDiscontiguous template type [in]
blast_msgUsed for storing error messages [in][out]
Returns
TRUE if options combination valid.

Definition at line 1248 of file blast_options.c.

References Blast_MessageWrite(), eBlastSevError, FALSE, kBlastMessageNoContext, and TRUE.

Referenced by LookupTableOptionsValidate().

◆ s_MergeDustOptions()

static SDustOptions* s_MergeDustOptions ( const SDustOptions opt1,
const SDustOptions opt2 
)
static

Merges together two sets of dust options, choosing the most non-default one.

Parameters
opt1first set to be merged [in]
opt2second set to be merged [in]
Returns
the merged options.

Definition at line 252 of file blast_options.c.

References kDustLevel, kDustLinker, kDustWindow, SDustOptions::level, SDustOptions::linker, NULL, SDustOptionsNew(), and SDustOptions::window.

Referenced by SBlastFilterOptionsMerge().

◆ s_MergeRepeatOptions()

static SRepeatFilterOptions* s_MergeRepeatOptions ( const SRepeatFilterOptions opt1,
const SRepeatFilterOptions opt2 
)
static

Merges together two sets of repeat filter options, choosing the most non-default one.

Parameters
opt1first set to be merged [in]
opt2second set to be merged [in]
Returns
the merged options.

Definition at line 326 of file blast_options.c.

References SRepeatFilterOptions::database, NULL, SRepeatFilterOptionsNew(), and SRepeatFilterOptionsResetDB().

Referenced by SBlastFilterOptionsMerge().

◆ s_MergeSegOptions()

static SSegOptions* s_MergeSegOptions ( const SSegOptions opt1,
const SSegOptions opt2 
)
static

Merges together two sets of SEG options, choosing the most non-default one.

Parameters
opt1first set to be merged [in]
opt2second set to be merged [in]
Returns
the merged options.

Definition at line 290 of file blast_options.c.

References SSegOptions::hicut, kSegHicut, kSegLocut, kSegWindow, SSegOptions::locut, NULL, SSegOptionsNew(), and SSegOptions::window.

Referenced by SBlastFilterOptionsMerge().

◆ s_MergeWindowMaskerOptions()

static SWindowMaskerOptions* s_MergeWindowMaskerOptions ( const SWindowMaskerOptions opt1,
const SWindowMaskerOptions opt2 
)
static

Merges together two sets of window masker options, choosing the most non-default one.

Parameters
opt1first set to be merged [in]
opt2second set to be merged [in]
Returns
the merged options.

Definition at line 357 of file blast_options.c.

References ASSERT, SWindowMaskerOptions::database, FALSE, NULL, SWindowMaskerOptionsNew(), SWindowMaskerOptionsResetDB(), and SWindowMaskerOptions::taxid.

Referenced by SBlastFilterOptionsMerge().

◆ SBlastFilterOptionsFree()

SBlastFilterOptions* SBlastFilterOptionsFree ( SBlastFilterOptions filter_options)

◆ SBlastFilterOptionsMaskAtHash()

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 433 of file blast_options.c.

References FALSE, SBlastFilterOptions::mask_at_hash, and NULL.

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

◆ SBlastFilterOptionsMerge()

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 390 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().

◆ SBlastFilterOptionsNew()

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 224 of file blast_options.c.

References calloc(), eDust, eDustRepeats, eRepeats, eSeg, FALSE, SDustOptionsNew(), SRepeatFilterOptionsNew(), and SSegOptionsNew().

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

◆ SBlastFilterOptionsNoFiltering()

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 422 of file blast_options.c.

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

◆ SBlastFilterOptionsValidate()

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 441 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().

◆ SDustOptionsFree()

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().

◆ SDustOptionsNew()

Int2 SDustOptionsNew ( SDustOptions **  dust_options)

◆ SReadQualityOptionsFree()

SReadQualityOptions* SReadQualityOptionsFree ( SReadQualityOptions read_quality_options)

Frees memory for SReadQualityOptions.

Definition at line 177 of file blast_options.c.

References free(), and NULL.

Referenced by SBlastFilterOptionsFree(), and CBlastOptionsLocal::SetReadQualityFiltering().

◆ SReadQualityOptionsNew()

Int2 SReadQualityOptionsNew ( SReadQualityOptions **  read_quality_options)

Allocates memory for SReadQualityOptions, fills in defaults.

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

Definition at line 187 of file blast_options.c.

References calloc().

Referenced by CBlastOptionsLocal::SetReadMaxFractionAmbiguous(), CBlastOptionsLocal::SetReadMinDimerEntropy(), and CBlastOptionsLocal::SetReadQualityFiltering().

◆ SRepeatFilterOptionsFree()

SRepeatFilterOptions* SRepeatFilterOptionsFree ( SRepeatFilterOptions repeat_options)

◆ SRepeatFilterOptionsNew()

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, calloc(), kDefaultRepeatFilterDb, NULL, and strdup.

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

◆ 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().

◆ SSegOptionsFree()

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().

◆ SSegOptionsNew()

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, malloc(), and NULL.

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

◆ SWindowMaskerOptionsFree()

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().

◆ SWindowMaskerOptionsNew()

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, calloc(), and NULL.

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

◆ 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

◆ kDustLevel

const int kDustLevel = 20

Declared in blast_def.h as extern const.

Level parameter used by dust.

Definition at line 46 of file blast_options.c.

Referenced by BlastFilteringOptionsToString(), s_MergeDustOptions(), and SDustOptionsNew().

◆ kDustLinker

const int kDustLinker = 1

Parameter used by dust to link together close low-complexity segments.

Definition at line 48 of file blast_options.c.

Referenced by BlastFilteringOptionsToString(), s_MergeDustOptions(), and SDustOptionsNew().

◆ kDustWindow

const int kDustWindow = 64

Window parameter used by dust.

Definition at line 47 of file blast_options.c.

Referenced by BlastFilteringOptionsToString(), s_MergeDustOptions(), and SDustOptionsNew().

◆ kPSSM_NoImpalaScaling

const double kPSSM_NoImpalaScaling = 1.0

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 May 20 05:05:06 2024 by modify_doxy.py rev. 669887