NCBI C++ ToolKit
|
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>
Go to the source code of this file.
Go to the SVN repository for this file.
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... | |
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.
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.
options | The options [in] [out] |
dbseq_num | Number of sequences in the database (if zero real value will be used) [in] |
db_length | Total length of the database (if zero real value will be used) [in] |
*searchsp_eff | Array 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_searchsp | The 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().
Int2 BLAST_FillExtensionOptions | ( | BlastExtensionOptions * | options, |
EBlastProgramType | program, | ||
Int4 | greedy, | ||
double | x_dropoff, | ||
double | x_dropoff_final | ||
) |
Fill non-default values in the BlastExtensionOptions structure.
options | The options structure [in] [out] |
program | Program number (blastn, blastp, etc.) [in] |
greedy | In how many stages of the search greedy alignment is used (values 0, 1, 2)? FIXME [in] |
x_dropoff | X-dropoff parameter value for preliminary gapped extensions [in] |
x_dropoff_final | X-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.
Int2 BLAST_FillHitSavingOptions | ( | BlastHitSavingOptions * | options, |
double | evalue, | ||
Int4 | hitlist_size, | ||
Boolean | is_gapped, | ||
Int4 | culling_limit, | ||
Int4 | min_diag_separation | ||
) |
Allocate memory for BlastHitSavingOptions.
options | The options [in] [out] |
evalue | The expected value threshold [in] |
hitlist_size | How many database sequences to save per query? [in] |
is_gapped | is this a gapped alignment? [in] |
culling_limit | Number 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_separation | Delete 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.
Int2 BLAST_FillInitialWordOptions | ( | BlastInitialWordOptions * | options, |
EBlastProgramType | program, | ||
Int4 | window_size, | ||
double | xdrop_ungapped | ||
) |
Fill non-default values in the BlastInitialWordOptions structure.
options | The options structure [in] [out] |
program | Program number (blastn, blastp, etc.) [in] |
window_size | Size of a largest window between 2 words for the two-hit version [in] |
xdrop_ungapped | The 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.
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.
options | The options [in] [out] |
program | Program number (blastn, blastp, etc.) [in] |
is_megablast | Megablast (instead of blastn) if TRUE [in] |
threshold | Threshold 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_size | Number 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().
Int2 BLAST_FillQuerySetUpOptions | ( | QuerySetUpOptions * | options, |
EBlastProgramType | program, | ||
const char * | filter_string, | ||
Uint1 | strand_option | ||
) |
Fill non-default contents of the QuerySetUpOptions.
options | The options structure [in] [out] |
program | Program number (blastn, blastp, etc.) [in] |
filter_string | Parsable string of filtering options [in] |
strand_option | which 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().
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.
options | The options structure [in] [out] |
program | Program number (blastn, blastp, etc.) [in] |
greedy_extension | Is greedy extension algorithm used? [in] |
penalty | Mismatch penalty score (blastn only) [in] |
reward | Match reward score (blastn only) [in] |
matrix | Name of the BLAST matrix (all except blastn) [in] |
gap_open | Extra cost for opening a gap [in] |
gap_extend | Cost 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().
Int2 BLAST_GetSuggestedThreshold | ( | EBlastProgramType | program_number, |
const char * | matrixName, | ||
double * | threshold | ||
) |
Get thresholds for word-finding suggested by Stephen Altschul.
program_number | Type of blast program: blastn, blastp, blastx, tblastn, tblastx) [in] |
matrixName | matrix, e.g., BLOSUM62 [in] |
threshold | returns suggested value [in|out] |
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().
Int2 BLAST_GetSuggestedWindowSize | ( | EBlastProgramType | program_number, |
const char * | matrixName, | ||
Int4 * | window_size | ||
) |
Get window sizes for two hit algorithm suggested by Stephen Altschul.
program_number | Type of blast program: blastn, blastp, blastx, tblastn, tblastx) [in] |
matrixName | matrix, e.g., BLOSUM62 [in] |
window_size | returns suggested value [in|out] |
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().
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.
blast_program | Type of blast program: blastn, blastp, blastx, tblastn, tblastx) [in] |
lookup_options | Lookup table options [out] |
query_setup_options | Query options [out] |
word_options | Initial word processing options [out] |
ext_options | Extension options [out] |
hit_options | Hit saving options [out] |
score_options | Scoring options [out] |
eff_len_options | Effective length options [out] |
protein_options | Protein BLAST options [out] |
db_options | BLAST database options [out] |
Definition at line 1638 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 | ||
) |
Validate all options.
Definition at line 1749 of file blast_options.c.
References Blast_MessageWrite(), BLAST_StrToUpper(), BLASTERR_OPTION_VALUE_INVALID, BlastExtensionOptionsValidate(), BlastHitSavingOptionsValidate(), BlastInitialWordOptionsValidate(), BlastScoringOptionsValidate(), BlastHitSavingOptions::culling_limit, eBlastSevError, eBlastTypeBlastp, eBlastTypeRpsBlast, eBlastTypeRpsTblastn, eBlastTypeTblastn, free(), BlastHitSavingOptions::hsp_filt_opt, kBlastMessageNoContext, LookupTableOptionsValidate(), BlastScoringOptions::matrix, NULL, s_BlastExtensionScoringOptionsValidate(), util::strcmp(), and LookupTableOptions::word_size.
Referenced by CBlastOptionsLocal::Validate().
BlastDatabaseOptions* BlastDatabaseOptionsFree | ( | BlastDatabaseOptions * | db_options | ) |
Deallocate database options.
Definition at line 1628 of file blast_options.c.
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 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().
Boolean BlastEffectiveLengthsOptions_IsSearchSpaceSet | ( | const BlastEffectiveLengthsOptions * | options | ) |
Return true if the search spaces is set for any of the queries in the search.
options | The 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().
BlastEffectiveLengthsOptions* BlastEffectiveLengthsOptionsFree | ( | BlastEffectiveLengthsOptions * | options | ) |
Deallocate memory for BlastEffectiveLengthsOptions*.
options | Structure 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().
Int2 BlastEffectiveLengthsOptionsNew | ( | BlastEffectiveLengthsOptions ** | options | ) |
Allocate memory for BlastEffectiveLengthsOptions* and fill with default values.
options | The options that are being returned [out] |
Definition at line 1003 of file blast_options.c.
References BLASTERR_INVALIDPARAM, BLASTERR_MEMORY, calloc(), and NULL.
Referenced by BLAST_InitDefaultOptions(), BOOST_AUTO_TEST_CASE(), CBlastOptionsLocal::CBlastOptionsLocal(), CEffectiveSearchSpacesMemento::CEffectiveSearchSpacesMemento(), LinkHspTestFixture::fillEffectiveLengths(), CBlastExtendTestFixture::fillEffectiveLengths(), and CRedoAlignmentTestFixture::runRedoAlignmentCoreUnitTest().
BlastExtensionOptions* BlastExtensionOptionsFree | ( | BlastExtensionOptions * | options | ) |
Deallocate memory for BlastExtensionOptions.
options | Structure to free [in] |
Definition at line 650 of file blast_options.c.
Referenced by BOOST_AUTO_TEST_CASE(), CRedoAlignmentTestFixture::runRedoAlignmentCoreUnitTest(), LinkHspTestFixture::setupCutoffScores(), TestFixture::TearDownLookupTable(), testHSPStream(), and CBlastExtendTestFixture::~CBlastExtendTestFixture().
Int2 BlastExtensionOptionsNew | ( | EBlastProgramType | program, |
BlastExtensionOptions ** | options, | ||
Boolean | gapped | ||
) |
Allocate memory for BlastExtensionOptions and fill with default values.
program | Program number (blastn, blastp, etc.) [in] |
options | The options that are being returned [out] |
gapped | The search is gapped [in] |
Definition at line 660 of file blast_options.c.
References BLAST_GAP_X_DROPOFF_FINAL_NUCL, BLAST_GAP_X_DROPOFF_FINAL_PROT, BLAST_GAP_X_DROPOFF_NUCL, BLAST_GAP_X_DROPOFF_PROT, Blast_ProgramIsNucleotide(), Blast_QueryIsPssm(), Blast_SubjectIsTranslated(), BLASTERR_MEMORY, calloc(), eCompositionBasedStats, eDynProgScoreOnly, eDynProgTbck, eNoCompositionBasedStats, and NULL.
Referenced by BLAST_InitDefaultOptions(), BOOST_AUTO_TEST_CASE(), CRedoAlignmentTestFixture::runRedoAlignmentCoreUnitTest(), LinkHspTestFixture::setupCutoffScores(), TestFixture::SetUpLookupTable(), CBlastExtendTestFixture::setupStructures(), and testHSPStream().
Int2 BlastExtensionOptionsValidate | ( | EBlastProgramType | program_number, |
const BlastExtensionOptions * | options, | ||
Blast_Message ** | blast_msg | ||
) |
Validate contents of BlastExtensionOptions.
program_number | Type of BLAST program [in] |
options | Options to be validated [in] |
blast_msg | Describes 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().
BlastHitSavingOptions* BlastHitSavingOptionsFree | ( | BlastHitSavingOptions * | options | ) |
Deallocate memory for BlastHitSavingOptions.
options | Structure to free [in] |
Definition at line 1433 of file blast_options.c.
References BlastHSPFilteringOptionsFree(), BlastHitSavingOptions::hsp_filt_opt, NULL, and sfree.
Referenced by BOOST_AUTO_TEST_CASE(), LinkHspTestFixture::freeStructures(), s_GetBestHitParams(), s_GetCullingParams(), TestFixture::TearDownLookupTable(), testHSPStream(), and CBlastExtendTestFixture::~CBlastExtendTestFixture().
Int2 BlastHitSavingOptionsNew | ( | EBlastProgramType | program, |
BlastHitSavingOptions ** | options, | ||
Boolean | gapped_calculation | ||
) |
Allocate memory for BlastHitSavingOptions.
program | Program number (blastn, blastp, etc.) [in] |
options | The options that are being returned [out] |
gapped_calculation | is this search gapped? [in] |
Definition at line 1444 of file blast_options.c.
References BLAST_EXPECT_VALUE, BLAST_HITLIST_SIZE, Blast_QueryIsTranslated(), Blast_SubjectIsTranslated(), BLASTERR_INVALIDPARAM, calloc(), eBlastTypeRpsTblastn, FALSE, INT4_MAX, NULL, and TRUE.
Referenced by BLAST_InitDefaultOptions(), BOOST_AUTO_TEST_CASE(), CRedoAlignmentTestFixture::runRedoAlignmentCoreUnitTest(), s_GetBestHitParams(), s_GetCullingParams(), LinkHspTestFixture::setupCutoffScores(), TestFixture::SetUpLookupTable(), CBlastExtendTestFixture::setupStructures(), and testHSPStream().
Int2 BlastHitSavingOptionsValidate | ( | EBlastProgramType | program_number, |
const BlastHitSavingOptions * | options, | ||
Blast_Message ** | blast_msg | ||
) |
Validate BlastHitSavingOptions.
program_number | BLAST program [in] |
options | The options that have are being returned [in] |
blast_msg | Describes any validation problems found [out] |
Definition at line 1505 of file blast_options.c.
References Blast_MessageWrite(), BLASTERR_INVALIDPARAM, BLASTERR_OPTION_PROGRAM_INVALID, BLASTERR_OPTION_VALUE_INVALID, BlastHSPFilteringOptionsValidate(), BlastHitSavingOptions::culling_limit, BlastHitSavingOptions::cutoff_score, eBlastSevError, eBlastTypeBlastx, eBlastTypeMapping, eBlastTypePsiTblastn, eBlastTypeTblastn, BlastHitSavingOptions::expect_value, BlastHitSavingOptions::hitlist_size, BlastHitSavingOptions::hsp_filt_opt, kBlastMessageNoContext, BlastHitSavingOptions::longest_intron, and NULL.
Referenced by BLAST_ValidateOptions().
BlastHSPBestHitOptions* BlastHSPBestHitOptionsFree | ( | BlastHSPBestHitOptions * | opt | ) |
Deallocate a BlastHSPBestHitOptions structure.
opt | object to be deallocated. [in] |
Definition at line 1846 of file blast_options.c.
Referenced by BlastHSPFilteringOptionsFree(), and s_GetBestHitParams().
BlastHSPBestHitOptions* BlastHSPBestHitOptionsNew | ( | double | overhang, |
double | score_edge | ||
) |
Allocate and initialize a BlastHSPBestHitOptions structure.
Definition at line 1814 of file blast_options.c.
References calloc(), BlastHSPBestHitOptions::overhang, and BlastHSPBestHitOptions::score_edge.
Referenced by s_GetBestHitParams(), CBlastOptionsLocal::SetBestHitOverhang(), and CBlastOptionsLocal::SetBestHitScoreEdge().
Int2 BlastHSPBestHitOptionsValidate | ( | const BlastHSPFilteringOptions * | opts | ) |
Validate the best hit algorithm parameters (if any) in the.
opts | BlastHSPFilteringOptions structure |
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().
BlastHSPCullingOptions* BlastHSPCullingOptionsFree | ( | BlastHSPCullingOptions * | culling_opts | ) |
Deallocates culling options structure.
culling_opts | object to be deallocated. [in] |
Definition at line 1878 of file blast_options.c.
Referenced by BlastHSPFilteringOptionsFree(), and s_GetCullingParams().
BlastHSPCullingOptions* BlastHSPCullingOptionsNew | ( | int | max | ) |
Allocate a new object for culling options.
max | number 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().
Int2 BlastHSPCullingOptionsValidate | ( | const BlastHSPFilteringOptions * | opts | ) |
Validate culling options.
opts | BlastHSPFilteringOptions structure |
Definition at line 1864 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
filt_opts | HSP filtering options [in] |
best_hit | Best 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().
Int2 BlastHSPFilteringOptions_AddCulling | ( | BlastHSPFilteringOptions * | filt_opts, |
BlastHSPCullingOptions ** | culling, | ||
EBlastStage | stage | ||
) |
Validates the BlastHSPFilteringOptions structure.
Definition at line 1911 of file blast_options.c.
References BlastHSPFilteringOptions::culling_opts, BlastHSPFilteringOptions::culling_stage, and NULL.
Referenced by CBlastOptionsLocal::SetCullingLimit().
Int2 BlastHSPFilteringOptions_AddSubjectBestHit | ( | BlastHSPFilteringOptions * | filt_opts, |
BlastHSPSubjectBestHitOptions ** | subject_besthit | ||
) |
Definition at line 1998 of file blast_options.c.
References NULL, and BlastHSPFilteringOptions::subject_besthit_opts.
Referenced by CBlastOptionsLocal::SetSubjectBestHit().
BlastHSPFilteringOptions* BlastHSPFilteringOptionsFree | ( | BlastHSPFilteringOptions * | opts | ) |
Deallocate a BlastHSPFilteringOptions structure.
Definition at line 1950 of file blast_options.c.
References BlastHSPFilteringOptions::best_hit, BlastHSPBestHitOptionsFree(), BlastHSPCullingOptionsFree(), BlastHSPSubjectBestHitOptionsFree(), BlastHSPFilteringOptions::culling_opts, NULL, sfree, and BlastHSPFilteringOptions::subject_besthit_opts.
Referenced by BlastHitSavingOptionsFree().
BlastHSPFilteringOptions* BlastHSPFilteringOptionsNew | ( | ) |
Allocate and initialize a BlastHSPFilteringOptions structure.
Definition at line 1888 of file blast_options.c.
References calloc().
Referenced by CBlastOptionsLocal::SetBestHitOverhang(), CBlastOptionsLocal::SetBestHitScoreEdge(), CBlastOptionsLocal::SetCullingLimit(), and CBlastOptionsLocal::SetSubjectBestHit().
Int2 BlastHSPFilteringOptionsValidate | ( | const BlastHSPFilteringOptions * | opts | ) |
Validates the BlastHSPFilteringOptions structure.
Definition at line 1927 of file blast_options.c.
References BlastHSPFilteringOptions::best_hit_stage, BlastHSPBestHitOptionsValidate(), BlastHSPCullingOptionsValidate(), BlastHSPFilteringOptions::culling_stage, ePrelimSearch, FALSE, and TRUE.
Referenced by BlastHitSavingOptionsValidate().
BlastHSPSubjectBestHitOptions* BlastHSPSubjectBestHitOptionsFree | ( | BlastHSPSubjectBestHitOptions * | subject_besthit_opts | ) |
Deallocates subject besthit structure.
subject_besthit | object to be deallocated. [in] |
Definition at line 1988 of file blast_options.c.
Referenced by BlastHSPFilteringOptionsFree(), and BOOST_AUTO_TEST_CASE().
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().
Int2 BlastHSPSubjectBestHitOptionsValidate | ( | const BlastHSPFilteringOptions * | opts | ) |
Validate subject besthit options.
opts | BlastHSPFilteringOptions structure |
Definition at line 1977 of file blast_options.c.
References BlastHSPFilteringOptions::subject_besthit_opts.
BlastInitialWordOptions* BlastInitialWordOptionsFree | ( | BlastInitialWordOptions * | options | ) |
Deallocate memory for BlastInitialWordOptions.
options | Structure to free [in] |
Definition at line 562 of file blast_options.c.
Referenced by BOOST_AUTO_TEST_CASE(), LinkHspTestFixture::setupCutoffScores(), TestFixture::TearDownLookupTable(), CBlastExtendTestFixture::~CBlastExtendTestFixture(), and NuclWordFinderTextFixture::~NuclWordFinderTextFixture().
Int2 BlastInitialWordOptionsNew | ( | EBlastProgramType | program, |
BlastInitialWordOptions ** | options | ||
) |
Allocate memory for BlastInitialWordOptions and fill with default values.
program | Program number (blastn, blastp, etc.) [in] |
options | The options that have are being returned [out] |
Definition at line 573 of file blast_options.c.
References BLAST_GAP_TRIGGER_NUCL, BLAST_GAP_TRIGGER_PROT, Blast_ProgramIsNucleotide(), BLAST_SCAN_RANGE_NUCL, BLAST_UNGAPPED_X_DROPOFF_NUCL, BLAST_UNGAPPED_X_DROPOFF_PROT, BLAST_WINDOW_SIZE_NUCL, BLAST_WINDOW_SIZE_PROT, BLASTERR_MEMORY, calloc(), and NULL.
Referenced by BLAST_InitDefaultOptions(), BOOST_AUTO_TEST_CASE(), LinkHspTestFixture::setupCutoffScores(), NuclWordFinderTextFixture::setupExtendWord(), TestFixture::SetUpLookupTable(), and CBlastExtendTestFixture::setupStructures().
Int2 BlastInitialWordOptionsValidate | ( | EBlastProgramType | program_number, |
const BlastInitialWordOptions * | options, | ||
Blast_Message ** | blast_msg | ||
) |
Validate correctness of the initial word options.
program_number | Type of BLAST program [in] |
options | Initial word options [in] |
blast_msg | Describes any validation problems found [out] |
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().
QuerySetUpOptions* BlastQuerySetUpOptionsFree | ( | QuerySetUpOptions * | options | ) |
Deallocate memory for QuerySetUpOptions.
options | Structure to free [in] |
Definition at line 501 of file blast_options.c.
References QuerySetUpOptions::filter_string, QuerySetUpOptions::filtering_options, NULL, SBlastFilterOptionsFree(), and sfree.
Referenced by BOOST_AUTO_TEST_CASE(), s_GetInitialWordParameters(), LinkHspTestFixture::setupCutoffScores(), TestFixture::SetUpLookupTable(), CMakeProfileDBApp::x_RPS_DbClose(), and CMakeProfileDBApp::CRPS_DbInfo::~CRPS_DbInfo().
Int2 BlastQuerySetUpOptionsNew | ( | QuerySetUpOptions ** | options | ) |
Allocate memory for QuerySetUpOptions and fill with default values.
options | The options that have are being returned [out] |
Definition at line 514 of file blast_options.c.
References BLAST_GENETIC_CODE, BLASTERR_INVALIDPARAM, BLASTERR_MEMORY, calloc(), eEmpty, NULL, and SBlastFilterOptionsNew().
Referenced by BLAST_InitDefaultOptions(), BOOST_AUTO_TEST_CASE(), CBlastOptionsLocal::CBlastOptionsLocal(), s_GetInitialWordParameters(), LinkHspTestFixture::setupCutoffScores(), TestFixture::SetUpLookupTable(), and CMakeProfileDBApp::x_RPSAddFirstSequence().
Int2 BlastScoringOptionsDup | ( | BlastScoringOptions ** | new_opt, |
const BlastScoringOptions * | old_opt | ||
) |
Produces copy of "old" options, with new memory allocated.
new_opt | Contains copied BlastScoringOptions upon return [out] |
old_opt | BlastScoringOptions 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().
BlastScoringOptions* BlastScoringOptionsFree | ( | BlastScoringOptions * | options | ) |
Deallocate memory for BlastScoringOptions.
options | Structure to free [in] |
Definition at line 774 of file blast_options.c.
References BlastScoringOptions::matrix, BlastScoringOptions::matrix_path, NULL, and sfree.
Referenced by BOOST_AUTO_TEST_CASE(), CompressedAalookupTestFixture::FillLookupTable(), AalookupTestFixture::FillLookupTable(), LinkHspTestFixture::setupCutoffScores(), LinkHspTestFixture::setupLinkHspInputBlastn(), LinkHspTestFixture::setupLinkHspInputTblastn(), TestFixture::SetUpLookupTable(), NuclWordFinderTextFixture::setupScoreBlk(), LinkHspTestFixture::setupScoreBlk(), testHSPStream(), CScoreBuilder::x_Initialize(), AascanTestFixture::~AascanTestFixture(), CBlastExtendTestFixture::~CBlastExtendTestFixture(), and CompressedAascanTestFixture::~CompressedAascanTestFixture().
Int2 BlastScoringOptionsNew | ( | EBlastProgramType | program, |
BlastScoringOptions ** | options | ||
) |
Allocate memory for BlastScoringOptions and fill with default values.
program | Program number (blastn, blastp, etc.) [in] |
options | The options that are being returned [out] |
Definition at line 788 of file blast_options.c.
References BLAST_DEFAULT_MATRIX, BLAST_GAP_EXTN_NUCL, BLAST_GAP_EXTN_PROT, BLAST_GAP_OPEN_NUCL, BLAST_GAP_OPEN_PROT, BLAST_PENALTY, Blast_ProgramIsNucleotide(), BLAST_REWARD, BLASTERR_INVALIDPARAM, calloc(), eBlastTypeTblastx, FALSE, INT2_MAX, NULL, strdup, and TRUE.
Referenced by AascanTestFixture::AascanTestFixture(), BLAST_InitDefaultOptions(), BOOST_AUTO_TEST_CASE(), CompressedAascanTestFixture::CompressedAascanTestFixture(), CPhiblastTestFixture::CPhiblastTestFixture(), CompressedAalookupTestFixture::FillLookupTable(), AalookupTestFixture::FillLookupTable(), InitializeBlastScoreBlk(), CRedoAlignmentTestFixture::runRedoAlignmentCoreUnitTest(), TestFixture::SetUpLookupTable(), NuclWordFinderTextFixture::setupScoreBlk(), LinkHspTestFixture::setupScoreBlk(), CBlastExtendTestFixture::setupStructures(), testHSPStream(), CScoreBuilder::x_Initialize(), CPssmEngine::x_InitializeScoreBlock(), and CSeedTop::x_MakeScoreBlk().
Int2 BlastScoringOptionsSetMatrix | ( | BlastScoringOptions * | opts, |
const char * | matrix_name | ||
) |
Resets matrix name option.
Automatically converts the name to upper case.
opts | Options structure to update. [in] [out] |
matrix_name | New 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().
Int2 BlastScoringOptionsValidate | ( | EBlastProgramType | program_number, |
const BlastScoringOptions * | options, | ||
Blast_Message ** | blast_msg | ||
) |
Validate contents of BlastScoringOptions.
program_number | Type of BLAST program [in] |
options | Options to be validated [in] |
blast_msg | Describes any validation problems found [out] |
Definition at line 862 of file blast_options.c.
References BLAST_CheckRewardPenaltyScores(), Blast_KarlinBlkGappedLoadFromTables(), Blast_MessageWrite(), BLAST_PrintAllowedValues(), BLAST_PrintMatrixMessage(), Blast_ProgramIsMapping(), Blast_ProgramIsNucleotide(), Blast_ProgramIsRpsBlast(), BLASTERR_INVALIDPARAM, BLASTERR_OPTION_PROGRAM_INVALID, BLASTERR_OPTION_VALUE_INVALID, buffer, eBlastSevError, eBlastSevWarning, eBlastTypeBlastp, eBlastTypeBlastx, eBlastTypeTblastn, eBlastTypeTblastx, BlastScoringOptions::gap_extend, BlastScoringOptions::gap_open, BlastScoringOptions::gapped_calculation, BlastScoringOptions::is_ooframe, kBlastMessageNoContext, BlastScoringOptions::matrix, NULL, BlastScoringOptions::penalty, BlastScoringOptions::reward, and sfree.
Referenced by BLAST_ValidateOptions().
LookupTableOptions* LookupTableOptionsFree | ( | LookupTableOptions * | options | ) |
Deallocates memory for LookupTableOptions*.
options | Structure to free [in] |
Definition at line 1063 of file blast_options.c.
References NULL, LookupTableOptions::phi_pattern, and sfree.
Referenced by BOOST_AUTO_TEST_CASE(), s_GetInitialWordParameters(), LinkHspTestFixture::setupCutoffScores(), TestFixture::SetUpLookupTable(), AalookupTestFixture::~AalookupTestFixture(), AascanTestFixture::~AascanTestFixture(), CompressedAalookupTestFixture::~CompressedAalookupTestFixture(), CompressedAascanTestFixture::~CompressedAascanTestFixture(), and CMakeProfileDBApp::CRPS_DbInfo::~CRPS_DbInfo().
Int2 LookupTableOptionsNew | ( | EBlastProgramType | program, |
LookupTableOptions ** | options | ||
) |
Allocate memory for lookup table options and fill with default values.
program | Program number (blastn, blastp, etc.) [in] |
options | The options that are being returned [out] |
Definition at line 1077 of file blast_options.c.
References BLAST_WORD_THRESHOLD_BLASTP, BLAST_WORD_THRESHOLD_BLASTX, BLAST_WORD_THRESHOLD_TBLASTN, BLAST_WORD_THRESHOLD_TBLASTX, BLAST_WORDSIZE_MEGABLAST, BLAST_WORDSIZE_PROT, BLASTERR_INVALIDPARAM, calloc(), eAaLookupTable, eBlastTypeBlastn, eBlastTypeBlastp, eBlastTypeBlastx, eBlastTypeMapping, eBlastTypePhiBlastn, eBlastTypePhiBlastp, eBlastTypeRpsBlast, eBlastTypeRpsTblastn, eBlastTypeTblastn, eBlastTypeTblastx, eMBLookupTable, ePhiLookupTable, ePhiNaLookupTable, eRPSLookupTable, if(), MAX_DB_WORD_COUNT_MAPPER, and NULL.
Referenced by AascanTestFixture::AascanTestFixture(), BLAST_InitDefaultOptions(), BOOST_AUTO_TEST_CASE(), CompressedAascanTestFixture::CompressedAascanTestFixture(), CompressedAalookupTestFixture::FillLookupTable(), AalookupTestFixture::FillLookupTable(), s_GetInitialWordParameters(), LinkHspTestFixture::setupCutoffScores(), TestFixture::SetUpLookupTable(), CPhiblastTestFixture::setUpLookupTable(), CSeedTop::x_MakeLookupTable(), and CMakeProfileDBApp::x_RPSAddFirstSequence().
Int2 LookupTableOptionsValidate | ( | EBlastProgramType | program_number, |
const LookupTableOptions * | options, | ||
Blast_Message ** | blast_msg | ||
) |
Validate LookupTableOptions.
program_number | BLAST program [in] |
options | The options that have are being returned [in] |
blast_msg | Describes any validation problems found [out] |
Definition at line 1284 of file blast_options.c.
References ASSERT, Blast_MessageWrite(), Blast_ProgramIsNucleotide(), Blast_ProgramIsPhiBlast(), Blast_ProgramIsRpsBlast(), Blast_QueryIsPattern(), BLASTERR_INVALIDPARAM, BLASTERR_OPTION_PROGRAM_INVALID, BLASTERR_OPTION_VALUE_INVALID, buffer, LookupTableOptions::db_filter, DBSEQ_CHUNK_OVERLAP, DIM, eBlastSevError, eBlastTypeBlastn, eBlastTypeBlastp, eBlastTypeBlastx, eBlastTypeMapping, eBlastTypePsiBlast, eBlastTypeTblastn, eCompressedAaLookupTable, eMBLookupTable, kBlastMessageNoContext, LookupTableOptions::lut_type, LookupTableOptions::mb_template_length, LookupTableOptions::mb_template_type, NULL, LookupTableOptions::phi_pattern, s_DiscWordOptionsValidate(), LookupTableOptions::threshold, and LookupTableOptions::word_size.
Referenced by BLAST_ValidateOptions().
PSIBlastOptions* PSIBlastOptionsFree | ( | PSIBlastOptions * | psi_options | ) |
Deallocate PSI BLAST options.
Definition at line 1602 of file blast_options.c.
Referenced by BOOST_AUTO_TEST_CASE(), CPssmInputTestData::CPssmInputTestData(), CRedoAlignmentTestFixture::runRedoAlignmentCoreUnitTest(), CdPssmInput::~CdPssmInput(), CPssmInputFlankingGaps::~CPssmInputFlankingGaps(), CPssmInputTestData::~CPssmInputTestData(), and SU_PSSMInput::~SU_PSSMInput().
Int2 PSIBlastOptionsNew | ( | PSIBlastOptions ** | psi_options | ) |
Initialize default options for PSI BLAST.
psi_options | pointer to pointer where structure will be allocated [in] |
Definition at line 1554 of file blast_options.c.
References BLASTERR_INVALIDPARAM, BLASTERR_MEMORY, calloc(), FALSE, PSIBlastOptions::ignore_unaligned_positions, PSIBlastOptions::impala_scaling_factor, PSIBlastOptions::inclusion_ethresh, kPSSM_NoImpalaScaling, PSIBlastOptions::nsg_compatibility_mode, NULL, PSIBlastOptions::pseudo_count, PSI_INCLUSION_ETHRESH, PSI_PSEUDO_COUNT_CONST, TRUE, and PSIBlastOptions::use_best_alignment.
Referenced by BLAST_InitDefaultOptions(), BOOST_AUTO_TEST_CASE(), CBlastOptionsLocal::CBlastOptionsLocal(), CdPssmInput::CdPssmInput(), CPssmInputFlankingGaps::CPssmInputFlankingGaps(), CPssmInputTestData::CPssmInputTestData(), CPssmInputWithNoCDs::CPssmInputWithNoCDs(), CPssmCddInputTest::CreatePssmInput(), PsiBlastComputePssmFromAlignment(), CDeltaBlast::Run(), CRedoAlignmentTestFixture::runRedoAlignmentCoreUnitTest(), SU_PSSMInput::SU_PSSMInput(), and CPsiBlastArgs::x_CreatePssmFromMsa().
Int2 PSIBlastOptionsValidate | ( | const PSIBlastOptions * | psi_options, |
Blast_Message ** | blast_msg | ||
) |
Validates the PSI BLAST options so that they have sane values.
psi_options | structure to validate [in] |
blast_msg | Describes any validation problems found [out] |
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().
|
static |
Checks that the extension and scoring options are consistent with each other.
program_number | identifies the program [in] |
ext_options | the extension options [in] |
score_options | the scoring options [in] |
blast_msg | returns a message on errors. [in|out] |
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().
|
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.
word_size | Word size option [in] |
template_length | Discontiguous template length [in] |
template_type | Discontiguous template type [in] |
blast_msg | Used for storing error messages [in][out] |
Definition at line 1248 of file blast_options.c.
References Blast_MessageWrite(), eBlastSevError, FALSE, kBlastMessageNoContext, and TRUE.
Referenced by LookupTableOptionsValidate().
|
static |
Merges together two sets of dust options, choosing the most non-default one.
opt1 | first set to be merged [in] |
opt2 | second set to be merged [in] |
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().
|
static |
Merges together two sets of repeat filter options, choosing the most non-default one.
opt1 | first set to be merged [in] |
opt2 | second set to be merged [in] |
Definition at line 326 of file blast_options.c.
References SRepeatFilterOptions::database, NULL, SRepeatFilterOptionsNew(), and SRepeatFilterOptionsResetDB().
Referenced by SBlastFilterOptionsMerge().
|
static |
Merges together two sets of SEG options, choosing the most non-default one.
opt1 | first set to be merged [in] |
opt2 | second set to be merged [in] |
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().
|
static |
Merges together two sets of window masker options, choosing the most non-default one.
opt1 | first set to be merged [in] |
opt2 | second set to be merged [in] |
Definition at line 357 of file blast_options.c.
References ASSERT, SWindowMaskerOptions::database, FALSE, NULL, SWindowMaskerOptionsNew(), SWindowMaskerOptionsResetDB(), and SWindowMaskerOptions::taxid.
Referenced by SBlastFilterOptionsMerge().
SBlastFilterOptions* SBlastFilterOptionsFree | ( | SBlastFilterOptions * | filter_options | ) |
Frees SBlastFilterOptions and all subservient structures.
filter_options | object to free |
Definition at line 204 of file blast_options.c.
References SBlastFilterOptions::dustOptions, NULL, SBlastFilterOptions::readQualityOptions, SBlastFilterOptions::repeatFilterOptions, SDustOptionsFree(), SBlastFilterOptions::segOptions, sfree, SReadQualityOptionsFree(), SRepeatFilterOptionsFree(), SSegOptionsFree(), SWindowMaskerOptionsFree(), and SBlastFilterOptions::windowMaskerOptions.
Referenced by BLAST_FillQuerySetUpOptions(), BLAST_MainSetUp(), BlastQuerySetUpOptionsFree(), BOOST_AUTO_TEST_CASE(), s_DoSegSequenceData(), CBlastOptionsLocal::SetFilterString(), and CFilteringMemento::~CFilteringMemento().
Boolean SBlastFilterOptionsMaskAtHash | ( | const SBlastFilterOptions * | filter_options | ) |
Queries whether masking should be done only for the lookup table or for the entire search.
filter_options | the object to be queried [in] |
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().
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.
combined | object that is returned [in|out] |
opt1 | first set of options [in] |
opt2 | second set of options [in] |
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().
Int2 SBlastFilterOptionsNew | ( | SBlastFilterOptions ** | filter_options, |
EFilterOptions | type | ||
) |
Allocates memory for SBlastFilterOptions and.
filter_options | options that are being returned [in|out] |
type | specify either dust or seg (now) with EFilterOptions [in] |
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().
Boolean SBlastFilterOptionsNoFiltering | ( | const SBlastFilterOptions * | filter_options | ) |
Queries whether no masking is required.
filter_options | the object to be queried [in] |
Definition at line 422 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.
program_number | Program number (blastn, blastp, etc.) [in] |
filter_options | options to add to [in] |
blast_message | error or warning (optional) [out] |
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().
SDustOptions* SDustOptionsFree | ( | SDustOptions * | dust_options | ) |
Frees SDustOptions.
dust_options | object to free |
Definition at line 50 of file blast_options.c.
Referenced by BlastFilteringOptionsFromString(), BOOST_AUTO_TEST_CASE(), SBlastFilterOptionsFree(), and CBlastOptionsLocal::SetDustFiltering().
Int2 SDustOptionsNew | ( | SDustOptions ** | dust_options | ) |
Allocates memory for SDustOptions, fills in defaults.
dust_options | options that are being returned [in|out] |
Definition at line 57 of file blast_options.c.
References kDustLevel, kDustLinker, kDustWindow, malloc(), and NULL.
Referenced by BlastFilteringOptionsFromString(), BOOST_AUTO_TEST_CASE(), s_MergeDustOptions(), SBlastFilterOptionsNew(), CBlastOptionsLocal::SetDustFiltering(), CBlastOptionsLocal::SetDustFilteringLevel(), CBlastOptionsLocal::SetDustFilteringLinker(), and CBlastOptionsLocal::SetDustFilteringWindow().
SReadQualityOptions* SReadQualityOptionsFree | ( | SReadQualityOptions * | read_quality_options | ) |
Frees memory for SReadQualityOptions.
Definition at line 177 of file blast_options.c.
Referenced by SBlastFilterOptionsFree(), and CBlastOptionsLocal::SetReadQualityFiltering().
Int2 SReadQualityOptionsNew | ( | SReadQualityOptions ** | read_quality_options | ) |
Allocates memory for SReadQualityOptions, fills in defaults.
read_quality_ptions | options that are being returned [in|out] |
Definition at line 187 of file blast_options.c.
References calloc().
Referenced by CBlastOptionsLocal::SetReadMaxFractionAmbiguous(), CBlastOptionsLocal::SetReadMinDimerEntropy(), and CBlastOptionsLocal::SetReadQualityFiltering().
SRepeatFilterOptions* SRepeatFilterOptionsFree | ( | SRepeatFilterOptions * | repeat_options | ) |
Frees SRepeatFilterOptions.
repeat_options | object to free [in] |
Definition at line 117 of file blast_options.c.
References SRepeatFilterOptions::database, NULL, and sfree.
Referenced by BlastFilteringOptionsFromString(), BOOST_AUTO_TEST_CASE(), SBlastFilterOptionsFree(), CBlastOptionsLocal::SetFilterString(), and CBlastOptionsLocal::SetRepeatFiltering().
Int2 SRepeatFilterOptionsNew | ( | SRepeatFilterOptions ** | repeat_options | ) |
Allocates memory for SRepeatFilterOptions, fills in defaults.
repeat_options | options that are being returned [in|out] |
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().
Int2 SRepeatFilterOptionsResetDB | ( | SRepeatFilterOptions ** | repeat_options, |
const char * | dbname | ||
) |
Resets name of db for repeat filtering.
repeat_options | already allocated options constaining field to be reset [in|out] |
dbname | name of the database(s) [in] |
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.
seg_options | object to free [in] |
Definition at line 70 of file blast_options.c.
Referenced by BlastFilteringOptionsFromString(), SBlastFilterOptionsFree(), and CBlastOptionsLocal::SetSegFiltering().
Int2 SSegOptionsNew | ( | SSegOptions ** | seg_options | ) |
Allocates memory for SSegOptions, fills in defaults.
[in|out]
seg_options | options that are being returned [in|out] |
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().
SWindowMaskerOptions* SWindowMaskerOptionsFree | ( | SWindowMaskerOptions * | winmask_options | ) |
Frees SWindowMaskerOptions.
winmask_options | object to free [in] |
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.
winmask_options | options that are being returned [in|out] |
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().
Int2 SWindowMaskerOptionsResetDB | ( | SWindowMaskerOptions ** | winmask_options, |
const char * | dbname | ||
) |
Resets name of db for window masker filtering.
winmask_options | options block constaining field to be reset [in|out] |
dbname | name of the database(s) [in] |
Definition at line 158 of file blast_options.c.
References NULL, sfree, strdup, and SWindowMaskerOptionsNew().
Referenced by s_MergeWindowMaskerOptions(), and CBlastOptionsLocal::SetWindowMaskerDatabase().
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().
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().
Window parameter used by dust.
Definition at line 47 of file blast_options.c.
Referenced by BlastFilteringOptionsToString(), s_MergeDustOptions(), and SDustOptionsNew().
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().