BOOST_CHECK(doc !=
"Unknown task");
99 const intkThresholdSentinel = -33;
101threshold = kThresholdSentinel;
103BOOST_CHECK_EQUAL(0, (
int) status);
104BOOST_CHECK_EQUAL(kThresholdSentinel, (
int) threshold);
110BOOST_CHECK_EQUAL(0, (
int) status);
111BOOST_CHECK_EQUAL(11, (
int) threshold);
114BOOST_CHECK_EQUAL(0, (
int) status);
115BOOST_CHECK_EQUAL(12, (
int) threshold);
118BOOST_CHECK_EQUAL(0, (
int) status);
119BOOST_CHECK_EQUAL(13, (
int) threshold);
122BOOST_CHECK_EQUAL(0, (
int) status);
123BOOST_CHECK_EQUAL(13, (
int) threshold);
126BOOST_CHECK_EQUAL(0, (
int) status);
127BOOST_CHECK_EQUAL(16, (
int) threshold);
130BOOST_CHECK_EQUAL(0, (
int) status);
131BOOST_CHECK_EQUAL(11, (
int) threshold);
140BOOST_CHECK_EQUAL(0, (
int) status);
146BOOST_CHECK_EQUAL(0, (
int) status);
150BOOST_CHECK_EQUAL(0, (
int) status);
154BOOST_CHECK_EQUAL(0, (
int) status);
158BOOST_CHECK_EQUAL(0, (
int) status);
165 Int4existence=0, extension=0;
168BOOST_CHECK_EQUAL(-1, (
int) status);
171BOOST_CHECK_EQUAL(0, (
int) status);
172BOOST_CHECK_EQUAL(11, existence);
173BOOST_CHECK_EQUAL(1, extension);
176BOOST_CHECK_EQUAL(0, (
int) status);
177BOOST_CHECK_EQUAL(10, existence);
178BOOST_CHECK_EQUAL(1, extension);
181BOOST_CHECK_EQUAL(0, (
int) status);
182BOOST_CHECK_EQUAL(15, existence);
183BOOST_CHECK_EQUAL(2, extension);
189 intexistence=-1, extension=-1;
190 intreward=0, penalty=0;
195BOOST_CHECK_EQUAL(-1, (
int) status);
203BOOST_CHECK_EQUAL(0, (
int) status);
204BOOST_CHECK_EQUAL(0, existence);
205BOOST_CHECK_EQUAL(0, extension);
212BOOST_CHECK_EQUAL(0, (
int) status);
213BOOST_CHECK_EQUAL(2, existence);
214BOOST_CHECK_EQUAL(2, extension);
221BOOST_CHECK_EQUAL(0, (
int) status);
222BOOST_CHECK_EQUAL(4, existence);
223BOOST_CHECK_EQUAL(4, extension);
230BOOST_CHECK_EQUAL(0, (
int) status);
231BOOST_CHECK_EQUAL(2, existence);
232BOOST_CHECK_EQUAL(2, extension);
240BOOST_CHECK_EQUAL(0, (
int) status);
241BOOST_CHECK(filter_options);
245BOOST_REQUIRE(filter_options ==
NULL);
253BOOST_CHECK_EQUAL(0, (
int) status);
254BOOST_CHECK(filter_options);
258BOOST_REQUIRE(filter_options ==
NULL);
264BOOST_CHECK_EQUAL(1, (
int) status);
286i <= query_info->last_context;
i++) {
313lookup_wrap, sbp, query_info, subject_length, &word_params);
316BOOST_REQUIRE(blast_seq_loc ==
NULL);
318BOOST_REQUIRE(lookup_wrap ==
NULL);
320BOOST_REQUIRE(lookup_options ==
NULL);
322BOOST_REQUIRE(query_options ==
NULL);
330 const Int4kAvgSubjectLength = 335;
331 const Int4kSpecificSubjectLength = 186;
332 const Int8kDbLength = 703698559;
334unique_ptr<SSeqLoc> qsl(
337unique_ptr<SSeqLoc> ssl(
351 prog, strand_opt, &query_info);
353query_info, &query_blk,
prog, strand_opt, blast_msg);
355BOOST_CHECK(m->empty());
361 "BLOSUM62", -1, -1);
367kBlastProgram, &sbp, 1.0, &blast_message,
389query_info, sbp, word_options, kAvgSubjectLength, hit_params);
392link_hsp_params, word_params,
393kDbLength, kSpecificSubjectLength);
399BOOST_REQUIRE(sbp ==
NULL);
401BOOST_REQUIRE(ext_options ==
NULL);
403BOOST_REQUIRE(scoring_options ==
NULL);
405BOOST_REQUIRE(hit_params ==
NULL);
407BOOST_REQUIRE(hit_options ==
NULL);
409BOOST_REQUIRE(word_params ==
NULL);
411BOOST_REQUIRE(word_options ==
NULL);
418BOOST_REQUIRE(query_info);
426kbp_bad->
logK= -1.0;
428sbp->
kbp[0] = kbp_bad;
434kbp_good->
logK= 0.1;
436sbp->
kbp[1] = kbp_good;
445 const Int4kAvgSubjectLength = 335;
446 const Int4kSpecificSubjectLength = 186;
447 const Int8kDbLength = 703698559;
448 const boolkIsGapped =
true;
479link_hsp_params, &word_params,
480kDbLength, kSpecificSubjectLength);
486BOOST_REQUIRE(sbp ==
NULL);
488BOOST_REQUIRE(ext_options ==
NULL);
490BOOST_REQUIRE(hit_params ==
NULL);
492BOOST_REQUIRE(hit_options ==
NULL);
499 const Int4kAvgSubjectLength = 316;
500 const Int4kSpecificSubjectLength = 21;
501 const Int8kDbLength = 1358990;
503unique_ptr<SSeqLoc> qsl(
506unique_ptr<SSeqLoc> ssl(
520 prog, strand_opt, &query_info);
522query_info, &query_blk,
prog, strand_opt, blast_msg);
524BOOST_CHECK(m->empty());
530 "BLOSUM62", -1, -1);
536kBlastProgram, &sbp, 1.0, &blast_message,
557query_info, sbp, word_options, kAvgSubjectLength, hit_params);
561link_hsp_params, word_params,
562kDbLength, kSpecificSubjectLength);
568BOOST_REQUIRE(sbp ==
NULL);
570BOOST_REQUIRE(ext_options ==
NULL);
572BOOST_REQUIRE(scoring_options ==
NULL);
574BOOST_REQUIRE(hit_params ==
NULL);
576BOOST_REQUIRE(hit_options ==
NULL);
578BOOST_REQUIRE(word_params ==
NULL);
580BOOST_REQUIRE(word_options ==
NULL);
587 const Int4kAvgSubjectLength = 335;
588 const Int4kSpecificSubjectLength = 186;
589 const Int8kDbLength = 703698559;
591unique_ptr<SSeqLoc> qsl(
594unique_ptr<SSeqLoc> ssl(
608 prog, strand_opt, &query_info);
610query_info, &query_blk,
prog, strand_opt, blast_msg);
612BOOST_CHECK(m->empty());
618 "BLOSUM62", -1, -1);
624kBlastProgram, &sbp, 1.0, &blast_message,
646query_info, sbp, word_options, kAvgSubjectLength, hit_params);
654link_hsp_params, word_params,
655kDbLength, kSpecificSubjectLength);
657BOOST_CHECK_EQUAL(5, (
int) (10*link_hsp_params->
gap_prob));
662BOOST_REQUIRE(query_blk ==
NULL);
664BOOST_REQUIRE(sbp ==
NULL);
666BOOST_REQUIRE(scoring_options ==
NULL);
668BOOST_REQUIRE(ext_options ==
NULL);
670BOOST_REQUIRE(hit_params ==
NULL);
672BOOST_REQUIRE(hit_options ==
NULL);
674BOOST_REQUIRE(word_params ==
NULL);
676BOOST_REQUIRE(word_options ==
NULL);
684 const intk_threshold = 0;
685 const intk_word_size = 100000;
692k_is_megablast, k_threshold, k_word_size);
694BOOST_CHECK_EQUAL(k_word_size, (
int) lookup_options->
word_size);
704BOOST_REQUIRE(num > good_one);
706 for(index=0; index<num; index++)
710 if(index != good_one)
727kbp_array[index] = kbp;
735 const intk_num_contexts=6;
757query_info, &ext_params);
766 for(
intindex=query_info->
first_context; index<=query_info->last_context; index++)
774BOOST_REQUIRE(ext_params ==
NULL);
776BOOST_REQUIRE(ext_options ==
NULL);
782 for(
Int4index=0; index<num; index++)
791kbp_array[index] = kbp;
799 const intk_num_contexts=6;
819query_info, &ext_params);
826BOOST_REQUIRE(ext_params ==
NULL);
832query_info, &ext_params);
838 for(
intindex=query_info->
first_context; index<=query_info->last_context; index++)
846BOOST_REQUIRE(ext_params ==
NULL);
848BOOST_REQUIRE(ext_options ==
NULL);
855unique_ptr<SSeqLoc> qsl1(
858unique_ptr<SSeqLoc> qsl2(
861unique_ptr<SSeqLoc> qsl3(
866query_v.push_back(*qsl1);
867query_v.push_back(*qsl2);
868query_v.push_back(*qsl3);
881 prog, strand_opt, blast_msg);
883BOOST_CHECK(m->empty());
889 "BLOSUM62", -1, -1);
894kBlastProgram, &sbp, 1.0, &blast_message,
923BOOST_REQUIRE(scoring_options ==
NULL);
925BOOST_REQUIRE(hit_params ==
NULL);
927BOOST_REQUIRE(hit_options ==
NULL);
929BOOST_REQUIRE(ext_options ==
NULL);
931BOOST_REQUIRE(sbp ==
NULL);
941unique_ptr<SSeqLoc> qsl1(
945query_v.push_back(*qsl1);
958 prog, strand_opt, blast_msg);
960BOOST_CHECK(m->empty());
967 "BLOSUM62", -1, -1);
972kBlastProgram, &sbp, 1.0, &blast_message,
985 const intk_avg_subject_length=128199245;
993BOOST_REQUIRE(scoring_options ==
NULL);
995BOOST_REQUIRE(hit_params ==
NULL);
997BOOST_REQUIRE(hit_options ==
NULL);
999BOOST_REQUIRE(ext_options ==
NULL);
1001BOOST_REQUIRE(sbp ==
NULL);
1012unique_ptr<SSeqLoc> qsl1(
1016query_v.push_back(*qsl1);
1029 prog, strand_opt, blast_msg);
1031BOOST_CHECK(m->empty());
1037 "BLOSUM62", -1, -1);
1042kBlastProgram, &sbp, 1.0, &blast_message,
1055 const intk_avg_subject_length=104833;
1063BOOST_REQUIRE(scoring_options ==
NULL);
1065BOOST_REQUIRE(hit_params ==
NULL);
1067BOOST_REQUIRE(hit_options ==
NULL);
1069BOOST_REQUIRE(ext_options ==
NULL);
1071BOOST_REQUIRE(sbp ==
NULL);
1080unique_ptr<SSeqLoc> qsl1(
1084query_v.push_back(*qsl1);
1097 prog, strand_opt, blast_msg);
1099BOOST_CHECK(m->empty());
1105 "BLOSUM62", -1, -1);
1110kBlastProgram, &sbp, 1.0, &blast_message,
1123 const intk_avg_subject_length=104833;
1150BOOST_REQUIRE(scoring_options ==
NULL);
1152BOOST_REQUIRE(hit_params ==
NULL);
1154BOOST_REQUIRE(hit_options ==
NULL);
1156BOOST_REQUIRE(ext_options ==
NULL);
1158BOOST_REQUIRE(sbp ==
NULL);
1167 CSeq_idqid1(
"gi|17532675");
1168unique_ptr<SSeqLoc> qsl1(
1172query_v.push_back(*qsl1);
1185 prog, strand_opt, blast_msg);
1187BOOST_CHECK(m->empty());
1193 "BLOSUM62", -1, -1);
1198kBlastProgram, &sbp, 1.0, &blast_message,
1211 const intk_avg_subject_length=523;
1220BOOST_REQUIRE(scoring_options ==
NULL);
1222BOOST_REQUIRE(hit_params ==
NULL);
1224BOOST_REQUIRE(hit_options ==
NULL);
1226BOOST_REQUIRE(ext_options ==
NULL);
1228BOOST_REQUIRE(sbp ==
NULL);
1235 const Uint4k_subject_length=10000;
1237unique_ptr<SSeqLoc> qsl1(
1240unique_ptr<SSeqLoc> qsl2(
1243unique_ptr<SSeqLoc> qsl3(
1248query_v.push_back(*qsl1);
1249query_v.push_back(*qsl2);
1250query_v.push_back(*qsl3);
1263 prog, strand_opt, blast_msg);
1265BOOST_CHECK(m->empty());
1271 "BLOSUM62", -1, -1);
1276kBlastProgram, &sbp, 1.0, &blast_message,
1303query_info, sbp, word_options, k_subject_length, hit_params);
1309BOOST_REQUIRE(scoring_options ==
NULL);
1311BOOST_REQUIRE(hit_params ==
NULL);
1313BOOST_REQUIRE(hit_options ==
NULL);
1315BOOST_REQUIRE(word_params ==
NULL);
1317BOOST_REQUIRE(word_options ==
NULL);
1319BOOST_REQUIRE(ext_options ==
NULL);
1321BOOST_REQUIRE(sbp ==
NULL);
1331BOOST_CHECK_EQUAL(
false, opts.
GetBlast4AlgoOpts()->GetParamByName(
"DustFiltering")->GetValue().GetBoolean());
1332BOOST_CHECK_EQUAL(
false, opts.
GetBlast4AlgoOpts()->GetParamByName(
"RepeatFiltering")->GetValue().GetBoolean());
1334BOOST_CHECK_EQUAL(
true, opts.
GetBlast4AlgoOpts()->GetParamByName(
"DustFiltering")->GetValue().GetBoolean());
1335BOOST_CHECK_EQUAL(
false, opts.
GetBlast4AlgoOpts()->GetParamByName(
"RepeatFiltering")->GetValue().GetBoolean());
1339BOOST_CHECK_EQUAL(
false, opts.
GetBlast4AlgoOpts()->GetParamByName(
"SegFiltering")->GetValue().GetBoolean());
1341BOOST_CHECK_EQUAL(
true, opts.
GetBlast4AlgoOpts()->GetParamByName(
"SegFiltering")->GetValue().GetBoolean());
1345BOOST_CHECK_EQUAL(
false, opts.
GetBlast4AlgoOpts()->GetParamByName(
"SegFiltering")->GetValue().GetBoolean());
1347BOOST_CHECK_EQUAL(
true, opts.
GetBlast4AlgoOpts()->GetParamByName(
"SegFiltering")->GetValue().GetBoolean());
1351BOOST_CHECK_EQUAL(
false, opts.
GetBlast4AlgoOpts()->GetParamByName(
"SegFiltering")->GetValue().GetBoolean());
1353BOOST_CHECK_EQUAL(
true, opts.
GetBlast4AlgoOpts()->GetParamByName(
"SegFiltering")->GetValue().GetBoolean());
1357BOOST_CHECK_EQUAL(
false, opts.
GetBlast4AlgoOpts()->GetParamByName(
"SegFiltering")->GetValue().GetBoolean());
1359BOOST_CHECK_EQUAL(
true, opts.
GetBlast4AlgoOpts()->GetParamByName(
"SegFiltering")->GetValue().GetBoolean());
1369BOOST_CHECK_EQUAL(
string(
"F"),
string(filter_string));
1370 sfree(filter_string);
1375BOOST_CHECK_EQUAL(
string(
"F"),
string(filter_string));
1376 sfree(filter_string);
1384BOOST_REQUIRE(optsHandle.
NotEmpty());
1393optsHandle.
Reset();
1396BOOST_CHECK_EQUAL(optsClone->
GetDbLength(), 10000);
1397BOOST_CHECK_EQUAL(
string(optsClone->
GetFilterString()),
string(
"L;m;"));
1398BOOST_CHECK_EQUAL(
string(optsClone->
GetPHIPattern()),
string(
"Y-S-[SA]-X-[LVIM]"));
1411optsClone = optsSnapshot;
User-defined methods of the data storage class.
User-defined methods of the data storage class.
Declares the CBl2Seq (BLAST 2 Sequences) class.
#define sfree(x)
Safe free a pointer: belongs to a higher level header.
BlastSeqLoc * BlastSeqLocFree(BlastSeqLoc *loc)
Deallocate all BlastSeqLoc objects in a chain.
BlastSeqLoc * BlastSeqLocNew(BlastSeqLoc **head, Int4 from, Int4 to)
Create and initialize a new sequence interval.
#define BLASTERR_INVALIDPARAM
Invalid parameter: possible programmer error or pre-condition not met.
Definitions which are dependant on the NCBI C++ Object Manager.
PSIBlastOptions * PSIBlastOptionsFree(PSIBlastOptions *psi_options)
Deallocate PSI BLAST options.
BlastHitSavingOptions * BlastHitSavingOptionsFree(BlastHitSavingOptions *options)
Deallocate memory for BlastHitSavingOptions.
Int2 BlastQuerySetUpOptionsNew(QuerySetUpOptions **options)
Allocate memory for QuerySetUpOptions and fill with default values.
Int2 BLAST_GetSuggestedThreshold(EBlastProgramType program_number, const char *matrixName, double *threshold)
Get thresholds for word-finding suggested by Stephen Altschul.
Int2 BLAST_GetSuggestedWindowSize(EBlastProgramType program_number, const char *matrixName, Int4 *window_size)
Get window sizes for two hit algorithm suggested by Stephen Altschul.
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.
BlastInitialWordOptions * BlastInitialWordOptionsFree(BlastInitialWordOptions *options)
Deallocate memory for BlastInitialWordOptions.
Int2 BlastScoringOptionsNew(EBlastProgramType program, BlastScoringOptions **options)
Allocate memory for BlastScoringOptions and fill with default values.
BlastEffectiveLengthsOptions * BlastEffectiveLengthsOptionsFree(BlastEffectiveLengthsOptions *options)
Deallocate memory for BlastEffectiveLengthsOptions*.
SBlastFilterOptions * SBlastFilterOptionsFree(SBlastFilterOptions *filter_options)
Frees SBlastFilterOptions and all subservient structures.
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.
Int2 LookupTableOptionsNew(EBlastProgramType program, LookupTableOptions **options)
Allocate memory for lookup table options and fill with default values.
BlastExtensionOptions * BlastExtensionOptionsFree(BlastExtensionOptions *options)
Deallocate memory for BlastExtensionOptions.
Int2 BlastHitSavingOptionsNew(EBlastProgramType program, BlastHitSavingOptions **options, Boolean gapped_calculation)
Allocate memory for BlastHitSavingOptions.
BlastDatabaseOptions * BlastDatabaseOptionsFree(BlastDatabaseOptions *db_options)
Deallocate database options.
@ eDust
low-complexity for nucleotides.
@ eSeg
low-complexity for proteins.
Int2 SBlastFilterOptionsNew(SBlastFilterOptions **filter_options, EFilterOptions type)
Allocates memory for SBlastFilterOptions and.
Int2 BlastInitialWordOptionsNew(EBlastProgramType program, BlastInitialWordOptions **options)
Allocate memory for BlastInitialWordOptions and fill with default values.
BlastScoringOptions * BlastScoringOptionsFree(BlastScoringOptions *options)
Deallocate memory for BlastScoringOptions.
LookupTableOptions * LookupTableOptionsFree(LookupTableOptions *options)
Deallocates memory for LookupTableOptions*.
QuerySetUpOptions * BlastQuerySetUpOptionsFree(QuerySetUpOptions *options)
Deallocate memory for QuerySetUpOptions.
Int2 BlastExtensionOptionsNew(EBlastProgramType program, BlastExtensionOptions **options, Boolean gapped)
Allocate memory for BlastExtensionOptions and fill with default values.
BlastHitSavingParameters * BlastHitSavingParametersFree(BlastHitSavingParameters *parameters)
Deallocate memory for BlastHitSavingOptions*.
Int2 BlastExtensionParametersNew(EBlastProgramType blast_program, const BlastExtensionOptions *options, BlastScoreBlk *sbp, BlastQueryInfo *query_info, BlastExtensionParameters **parameters)
Calculate the raw values for the X-dropoff parameters.
BlastInitialWordParameters * BlastInitialWordParametersFree(BlastInitialWordParameters *parameters)
Deallocate memory for BlastInitialWordParameters.
BlastExtensionParameters * BlastExtensionParametersFree(BlastExtensionParameters *parameters)
Deallocate memory for BlastExtensionParameters.
Int2 BlastInitialWordParametersNew(EBlastProgramType program_number, const BlastInitialWordOptions *word_options, const BlastHitSavingParameters *hit_params, const LookupTableWrap *lookup_wrap, const BlastScoreBlk *sbp, BlastQueryInfo *query_info, Uint4 subject_length, BlastInitialWordParameters **parameters)
Allocate memory for BlastInitialWordParameters and set x_dropoff.
Int2 BlastHitSavingParametersNew(EBlastProgramType program_number, const BlastHitSavingOptions *options, const BlastScoreBlk *sbp, const BlastQueryInfo *query_info, Int4 avg_subject_length, Int4 compositionBasedStats, BlastHitSavingParameters **parameters)
Allocate memory and initialize the BlastHitSavingParameters structure.
Int2 BlastHitSavingParametersUpdate(EBlastProgramType program_number, const BlastScoreBlk *sbp, const BlastQueryInfo *query_info, Int4 avg_subject_length, Int4 compositionBasedStats, BlastHitSavingParameters *parameters)
Updates cutoff scores in hit saving parameters.
void CalculateLinkHSPCutoffs(EBlastProgramType program, BlastQueryInfo *query_info, const BlastScoreBlk *sbp, BlastLinkHSPParameters *link_hsp_params, const BlastInitialWordParameters *word_params, Int8 db_length, Int4 subject_length)
Calculates cutoff scores and returns them.
EBlastProgramType
Defines the engine's notion of the different applications of the BLAST algorithm.
BlastQueryInfo * BlastQueryInfoNew(EBlastProgramType program, int num_queries)
Allocate memory for query information structure.
Utilities initialize/setup BLAST.
Int2 BlastSetup_ScoreBlkInit(BLAST_SequenceBlk *query_blk, const BlastQueryInfo *query_info, const BlastScoringOptions *scoring_options, EBlastProgramType program_number, BlastScoreBlk **sbpp, double scale_factor, Blast_Message **blast_message, GET_MATRIX_PATH get_path)
Initializes the score block structure.
Internal auxiliary setup classes/functions for C++ BLAST APIs.
BlastScoreBlk * BlastScoreBlkFree(BlastScoreBlk *sbp)
Deallocates BlastScoreBlk as well as all associated structures.
Int2 BLAST_GetProteinGapExistenceExtendParams(const char *matrixName, Int4 *gap_existence, Int4 *gap_extension)
Extract the recommended gap existence and extension values.
Blast_KarlinBlk * Blast_KarlinBlkNew(void)
Callocs a Blast_KarlinBlk.
Blast_KarlinBlk * Blast_KarlinBlkFree(Blast_KarlinBlk *kbp)
Deallocates the KarlinBlk.
Int2 BLAST_GetNucleotideGapExistenceExtendParams(Int4 reward, Int4 penalty, Int4 *gap_existence, Int4 *gap_extension)
Extract the recommended gap existence and extension values.
BlastScoreBlk * BlastScoreBlkNew(Uint1 alphabet, Int4 number_of_contexts)
Allocates and initializes BlastScoreBlk.
@ eBlastNotSet
Not yet set.
@ eTblastx
Translated nucl-Translated nucl.
@ eBlastn
Nucl-Nucl (traditional blastn)
@ eBlastp
Protein-Protein.
@ eTblastn
Protein-Translated nucl.
@ eBlastx
Translated nucl-Protein.
BLAST_SequenceBlk * BlastSequenceBlkFree(BLAST_SequenceBlk *seq_blk)
Deallocate memory for a sequence block.
BOOST_AUTO_TEST_SUITE_END() static int s_GetSegmentFlags(const CBioseq &bioseq)
static BlastScoreBlk * s_FillScoreBlkWithBadKbp(BlastQueryInfo *query_info)
static void MakeSomeInvalidKBP(Blast_KarlinBlk **kbp_array, Int4 num, Int4 good_one, BlastQueryInfo *query_info)
static void s_FillSearchSpace(BlastQueryInfo *query_info, Int8 searchsp)
BOOST_AUTO_TEST_CASE(TestTasksDefinitionsAndDocumentation)
static BlastInitialWordParameters * s_GetInitialWordParameters(EBlastProgramType program_number, BLAST_SequenceBlk *query_blk, BlastQueryInfo *query_info, BlastScoreBlk *sbp, const BlastInitialWordOptions *word_options, int subject_length, const BlastHitSavingParameters *hit_params)
static void MakeSomeValidKBP(Blast_KarlinBlk **kbp_array, Int4 num, BlastQueryInfo *query_info)
Wrapper class for BLAST_SequenceBlk .
Runs the BLAST algorithm between 2 sequences.
Defines BLAST error codes (user errors included)
Wrapper class for BlastInitialWordOptions .
Encapsulates ALL the BLAST algorithm's options.
@ eRemote
To be used when running BLAST remotely.
Wrapper class for BlastQueryInfo .
Wrapper class for LookupTableOptions .
static CTestObjMgr & Instance()
typedef for the messages for an entire BLAST search, which could be comprised of multiple query seque...
void SetPHIPattern(const char *pattern, bool is_dna)
BlastQueryInfo * Get() const
const CBlastOptionsHandle & GetOptionsHandle() const
Retrieve the options handle.
void SetQueryCovHspPerc(double p)
Sets QueryCovHspPerc.
void SetDbLength(Int8 len)
Sets DbLength.
void SetQueryCovHspPerc(double p)
const char * GetPHIPattern() const
static string GetDocumentation(const string &task_name)
Return the documentation for the provided task.
double GetBestHitOverhang() const
void SetupQueries(TSeqLocVector &queries, BlastQueryInfo *qinfo, BLAST_SequenceBlk **seqblk, EBlastProgramType prog, objects::ENa_strand strand_opt, TSearchMessages &messages)
Populates BLAST_SequenceBlk with sequence data for use in CORE BLAST.
objects::ENa_strand GetStrandOption() const
void SetRepeatFilteringDB(const char *db)
Sets the repeat filtering database to use.
static CBlastOptionsHandle * Create(EProgram program, EAPILocality locality=CBlastOptions::eLocal)
Creates an options handle object configured with default options for the requested program,...
double GetQueryCovHspPerc() const
CBlastOptions & SetOptions()
Returns a reference to the internal options class which this object is a handle for.
void SetUnifiedP(int u=0)
void SetProgram(EProgram p)
Sets the task this object is best suited for.
#define BLASTAA_SEQ_CODE
== Seq_code_ncbistdaa
void SetMaxHspsPerSubject(int m)
Sets MaxHspPerSubjectQueryPair.
EBlastProgramType GetProgramType() const
Returns the CORE BLAST notion of program type.
void SetBestHitOverhang(double overhang)
static set< string > GetTasks(ETaskSets choice=eAll)
Retrieve the set of supported tasks.
const CBlastOptions & GetOptions() const
Return the object which this object is a handle for.
CRef< CBlastOptions > Clone() const
Explicit deep copy of the Blast options object.
char * GetFilterString() const
Return the filtering string used.
void SetFilterString(const char *f, bool clear=true)
char * BlastFindMatrixPath(const char *matrix_name, Boolean is_prot)
Returns the path to a specified matrix.
const TSeqLocVector & GetQueries() const
Retrieve a vector of query sequences.
void SetupQueryInfo(TSeqLocVector &queries, EBlastProgramType prog, objects::ENa_strand strand_opt, BlastQueryInfo **qinfo)
Allocates the query information structure and fills the context offsets, in case of multiple queries,...
double GetQueryCovHspPerc() const
Returns QueryCovHspPerc.
void SetFilterString(const char *f, bool clear=true)
Sets FilterString.
void SetMaskAtHash(bool val=true)
void SetBestHitScoreEdge(double score_edge)
void SetDustFiltering(bool val=true)
void SetSegFiltering(bool val=true)
double GetBestHitScoreEdge() const
TBlast4Opts * GetBlast4AlgoOpts()
char * GetFilterString() const
Returns FilterString.
static CBlastOptionsHandle * CreateTask(string task, EAPILocality locality=CBlastOptions::eLocal)
Creates an options handle object configured with default options for the requested task,...
int GetMaxHspsPerSubject() const
Returns MaxHspsPerSubjectQueryPair.
void SetRepeatFiltering(bool val=true)
Turns on repeat filtering using the default repeat database, namely kDefaultRepeatFilterDb.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
void Reset(void)
Reset reference object.
bool NotEmpty(void) const THROWS_NONE
Check if CRef is not empty â pointing to an object and has a non-null value.
int16_t Int2
2-byte (16-bit) signed integer
int32_t Int4
4-byte (32-bit) signed integer
uint32_t Uint4
4-byte (32-bit) unsigned integer
int64_t Int8
8-byte (64-bit) signed integer
ENa_strand
strand of nucleic acid
@ eNa_strand_both
in forward orientation
Implementation of a number of BlastHSPWriters to save hits from a BLAST search, and subsequently retu...
#define kBestHit_ScoreEdgeDflt
Default value for score_edge.
#define kBestHit_OverhangDflt
The "best hit" writer.
LookupTableWrap * LookupTableWrapFree(LookupTableWrap *lookup)
Deallocate memory for the lookup table.
Int2 LookupTableWrapInit(BLAST_SequenceBlk *query, const LookupTableOptions *lookup_options, const QuerySetUpOptions *query_options, BlastSeqLoc *lookup_segments, BlastScoreBlk *sbp, LookupTableWrap **lookup_wrap_ptr, const BlastRPSInfo *rps_info, Blast_Message **error_msg, BlastSeqSrc *seqsrc)
Create the lookup table for all query words.
Uint1 Boolean
bool replacment for C
#define TRUE
bool replacment for C indicating true.
#define FALSE
bool replacment for C indicating false.
BOOST_AUTO_TEST_SUITE(psiblast_iteration)
vector< SSeqLoc > TSeqLocVector
Vector of sequence locations.
Structure to hold a sequence.
The context related information.
Int4 query_length
Length of this query, strand or frame.
Boolean is_valid
Determine if this context is valid or not.
Int4 query_offset
Offset of this query, strand or frame in the concatenated super-query.
Int8 eff_searchsp
Effective search space for this context.
Options used for gapped extension These include: a.
double gap_x_dropoff_final
X-dropoff value for the final gapped extension (in bits)
double gap_x_dropoff
X-dropoff value for gapped extension (in bits)
Computed values used as parameters for gapped alignments.
Int4 gap_x_dropoff_final
X-dropoff value for the final gapped extension (raw)
Int4 gap_x_dropoff
X-dropoff value for gapped extension (raw)
Int4 cutoff_score
Raw cutoff score corresponding to the e-value provided by the user if no sum stats,...
Int4 cutoff_score_max
Raw cutoff score corresponding to the e-value provided by user, cutoff_score must be <= this.
Options used when evaluating and saving hits These include: a.
Int4 max_hsps_per_subject
Queries are paired reads, for mapping.
Boolean do_sum_stats
Force sum statistics to be used to combine HSPs, TRUE by default for all ungapped searches and transl...
double query_cov_hsp_perc
Min query coverage hsp percentage.
Parameter block that contains a pointer to BlastHitSavingOptions and the values derived from it.
BlastGappedCutoffs * cutoffs
per-context gapped cutoff information
Int4 cutoff_score_min
smallest cutoff score across all contexts
double prelim_evalue
evalue for preliminary search (may be higher for CBS).
BlastLinkHSPParameters * link_hsp_params
Parameters for linking HSPs with sum statistics; linking is not done if NULL.
Options needed for initial word finding and processing.
double x_dropoff
X-dropoff value (in bits) for the ungapped extension.
Parameter block that contains a pointer to BlastInitialWordOptions and the values derived from it.
Int4 cutoff_score_min
smallest cutoff score across all contexts
Int4 x_dropoff_max
largest X-drop cutoff across all contexts
Parameter block for linking HSPs with sum statistics.
double gap_decay_rate
Decay rate for linking HSPs and calculating cutoff scores.
double gap_prob
Probability of decay for linking HSPs.
Int4 cutoff_big_gap
Cutoff sum score for linked HSPs with big gaps.
Int4 cutoff_small_gap
Cutoff sum score for linked HSPs with small gaps.
The query related information.
Int4 first_context
Index of the first element of the context array.
BlastContextInfo * contexts
Information per context.
Int4 last_context
Index of the last element of the context array.
Structure used for scoring calculations.
Blast_KarlinBlk ** kbp
Karlin-Altschul parameters.
Boolean matrix_only_scoring
Score ungapped/gapped alignment only using the matrix parameters and with raw scores.
double scale_factor
multiplier for all cutoff and dropoff scores
Blast_KarlinBlk ** kbp_gap
K-A parameters for gapped alignments.
Blast_KarlinBlk ** kbp_std
K-A parameters for ungapped alignments.
Scoring options block Used to produce the BlastScoreBlk structure This structure may be needed for lo...
Boolean gapped_calculation
gap-free search if FALSE
Used to hold a set of positions, mostly used for filtering.
Structure to hold the Karlin-Altschul parameters.
double K
K value used in statistics.
double Lambda
Lambda value used in statistics.
double H
H value used in statistics.
double logK
natural log of K value used in statistics
Structure to hold the a message from the core of the BLAST engine.
Options needed to construct a lookup table Also needed: query sequence and query length.
Int4 word_size
Determines the size of the lookup table.
Wrapper structure for different types of BLAST lookup tables.
Options required for setting up the query sequence.
SSegOptions * segOptions
low-complexity filtering for proteins sequences (includes translated nucleotides).
SDustOptions * dustOptions
low-complexity filtering for nucleotides.
Utility stuff for more convenient using of Boost.Test library.
voidp calloc(uInt items, uInt size)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4