<
classBC,
classT>
61 void(BC::*mutator)(
T),
62 T(BC::*accessor)(
void)
const,
65 # define CALL_MEMBER_FUNCTION(obj, membFnPtr) ((obj).*(membFnPtr)) 69BOOST_REQUIRE_EQUAL(expected_value, actual_value);
73 using namespace ncbi;
95VerifyMutatorAccessor<CBlastOptionsHandle, bool>
105VerifyMutatorAccessor<CBlastOptionsHandle, double>
115VerifyMutatorAccessor<CBlastOptionsHandle, double>
125VerifyMutatorAccessor<CBlastOptionsHandle, int>
135VerifyMutatorAccessor<CBlastOptionsHandle, int>
143 double value= -10.5;
145VerifyMutatorAccessor<CBlastOptionsHandle, double>
155VerifyMutatorAccessor<CBlastOptionsHandle, int>
165VerifyMutatorAccessor<CBlastOptionsHandle, double>
175VerifyMutatorAccessor<CBlastOptionsHandle, bool>
185VerifyMutatorAccessor<CBlastOptionsHandle, int>
199BOOST_REQUIRE(opts !=
NULL);
208BOOST_REQUIRE(opts !=
NULL);
218BOOST_REQUIRE(opts !=
NULL);
227BOOST_REQUIRE(opts !=
NULL);
237BOOST_REQUIRE(opts !=
NULL);
247BOOST_REQUIRE(opts ==
NULL);
255BOOST_REQUIRE(opts !=
NULL);
265BOOST_REQUIRE(opts !=
NULL);
301BOOST_REQUIRE(opts !=
NULL);
311BOOST_REQUIRE(opts !=
NULL);
321BOOST_REQUIRE(opts !=
NULL);
331BOOST_REQUIRE(opts !=
NULL);
341BOOST_REQUIRE(opts !=
NULL);
364VerifyMutatorAccessor<CBlastProteinOptionsHandle, double>
374VerifyMutatorAccessor<CBlastProteinOptionsHandle, int>
384VerifyMutatorAccessor<CBlastProteinOptionsHandle, int>
394VerifyMutatorAccessor<CBlastProteinOptionsHandle, double>
404VerifyMutatorAccessor<CBlastProteinOptionsHandle, double>
414VerifyMutatorAccessor<CBlastProteinOptionsHandle, Int8>
422 unsigned int value= 0x1<<16;
424VerifyMutatorAccessor<CBlastProteinOptionsHandle, unsigned int>
434VerifyMutatorAccessor<CBlastProteinOptionsHandle, Int8>
444VerifyMutatorAccessor<CBlastProteinOptionsHandle, bool>
454VerifyMutatorAccessor<CBlastProteinOptionsHandle, int>
463m_OptsHandle->SetSegFiltering(
false);
465 int value= m_OptsHandle->GetSegFilteringWindow();
466BOOST_REQUIRE(
value< 0);
472VerifyMutatorAccessor<CBlastProteinOptionsHandle, double>
481m_OptsHandle->SetSegFiltering(
false);
483 double value= m_OptsHandle->GetSegFilteringLocut();
484BOOST_REQUIRE(
value< 0);
490VerifyMutatorAccessor<CBlastProteinOptionsHandle, double>
499m_OptsHandle->SetSegFiltering(
false);
501 double value= m_OptsHandle->GetSegFilteringHicut();
502BOOST_REQUIRE(
value< 0);
506 const char*
value=
"dummy matrix";
508VerifyMutatorAccessor<CBlastProteinOptionsHandle, const char*>
518VerifyMutatorAccessor<CBlastProteinOptionsHandle, int>
528VerifyMutatorAccessor<CBlastProteinOptionsHandle, int>
551VerifyMutatorAccessor<CPSIBlastOptionsHandle, double>
561VerifyMutatorAccessor<CPSIBlastOptionsHandle, double>
571VerifyMutatorAccessor<CPSIBlastOptionsHandle, bool>
581VerifyMutatorAccessor<CPSIBlastOptionsHandle, int>
613VerifyMutatorAccessor<CBlastAdvancedProteinOptionsHandle, bool>
635VerifyMutatorAccessor<CBlastNucleotideOptionsHandle, ELookupTableType>
645VerifyMutatorAccessor<CBlastNucleotideOptionsHandle, int>
654m_OptsHandle->SetStrandOption(
value);
656BOOST_REQUIRE_EQUAL((
int)
value, (
int)actual_value);
662VerifyMutatorAccessor<CBlastNucleotideOptionsHandle, int>
672VerifyMutatorAccessor<CBlastNucleotideOptionsHandle, double>
682VerifyMutatorAccessor<CBlastNucleotideOptionsHandle, double>
691 const intkGapOpen = 7;
692 const intkGapExtend = 3;
694m_OptsHandle->SetGapOpeningCost(kGapOpen);
695m_OptsHandle->SetGapExtensionCost(kGapExtend);
697VerifyMutatorAccessor<CBlastNucleotideOptionsHandle, EBlastPrelimGapExt>
703BOOST_REQUIRE_EQUAL(kGapOpen, m_OptsHandle->GetGapOpeningCost());
704BOOST_REQUIRE_EQUAL(kGapExtend, m_OptsHandle->GetGapExtensionCost());
707VerifyMutatorAccessor<CBlastNucleotideOptionsHandle, EBlastPrelimGapExt>
713BOOST_REQUIRE_EQUAL(kGapOpen, m_OptsHandle->GetGapOpeningCost());
714BOOST_REQUIRE_EQUAL(kGapExtend, m_OptsHandle->GetGapExtensionCost());
720 const intkGapOpen = 7;
721 const intkGapExtend = 3;
723m_OptsHandle->SetGapOpeningCost(kGapOpen);
724m_OptsHandle->SetGapExtensionCost(kGapExtend);
726VerifyMutatorAccessor<CBlastNucleotideOptionsHandle, EBlastTbackExt>
732BOOST_REQUIRE_EQUAL(kGapOpen, m_OptsHandle->GetGapOpeningCost());
733BOOST_REQUIRE_EQUAL(kGapExtend, m_OptsHandle->GetGapExtensionCost());
740VerifyMutatorAccessor<CBlastNucleotideOptionsHandle, int>
750VerifyMutatorAccessor<CBlastNucleotideOptionsHandle, int>
758 const char*
value=
"MYNAMATRIX";
760VerifyMutatorAccessor<CBlastNucleotideOptionsHandle, const char*>
770VerifyMutatorAccessor<CBlastNucleotideOptionsHandle, int>
780VerifyMutatorAccessor<CBlastNucleotideOptionsHandle, int>
790VerifyMutatorAccessor<CBlastNucleotideOptionsHandle, Int8>
800VerifyMutatorAccessor<CBlastNucleotideOptionsHandle, bool>
810VerifyMutatorAccessor<CBlastNucleotideOptionsHandle, int>
819m_OptsHandle->SetDustFiltering(
false);
821 int value= m_OptsHandle->GetDustFilteringLevel();
822BOOST_REQUIRE(
value< 0);
828VerifyMutatorAccessor<CBlastNucleotideOptionsHandle, int>
837m_OptsHandle->SetDustFiltering(
false);
839 int value= m_OptsHandle->GetDustFilteringWindow();
840BOOST_REQUIRE(
value< 0);
846VerifyMutatorAccessor<CBlastNucleotideOptionsHandle, int>
855m_OptsHandle->SetDustFiltering(
false);
857 int value= m_OptsHandle->GetDustFilteringLinker();
858BOOST_REQUIRE(
value< 0);
864VerifyMutatorAccessor<CBlastNucleotideOptionsHandle, bool>
872 const char* db =
"my_repeat_db";
874VerifyMutatorAccessor<CBlastNucleotideOptionsHandle, const char*>
894 unsigned char value= 18;
896VerifyMutatorAccessor<CDiscNucleotideOptionsHandle, unsigned char>
904 unsigned char value= 1;
906VerifyMutatorAccessor<CDiscNucleotideOptionsHandle, unsigned char>
916VerifyMutatorAccessor<CDiscNucleotideOptionsHandle, int>
923m_OptsHandle->SetWordSize(
value);
925BOOST_REQUIRE(!
strcmp(
"Word size must be 11 or 12 only", exptn.
GetMsg().c_str()));
931 int value= m_OptsHandle->GetQueryCovHspPerc();
933BOOST_REQUIRE(
value== 0);
934m_OptsHandle->SetQueryCovHspPerc(52);
935 value= m_OptsHandle->GetQueryCovHspPerc();
936BOOST_REQUIRE(
value== 52);
Declares the CBlastAdvancedProteinOptionsHandle class.
Definitions used throughout BLAST.
Declares the CBlastNucleotideOptionsHandle class.
EBlastPrelimGapExt
The algorithm to be used for preliminary gapped extensions.
@ eDynProgScoreOnly
standard affine gapping
@ eGreedyScoreOnly
Greedy extension (megaBlast)
#define BLAST_WORD_THRESHOLD_BLASTP_WD_SZ_6
#define BLAST_WORD_THRESHOLD_BLASTP_FAST
#define BLAST_WORD_THRESHOLD_BLASTP_WD_SZ_7
#define BLAST_WORD_THRESHOLD_BLASTP
neighboring word score thresholds; a threshold of zero means that only query and subject words that m...
EBlastTbackExt
The algorithm to be used for final gapped extensions with traceback.
@ eDynProgTbck
standard affine gapping
ELookupTableType
Types of the lookup table.
@ eNaLookupTable
blastn lookup table
@ eAaLookupTable
standard protein (blastp) lookup table
@ eCompressedAaLookupTable
compressed alphabet (blastp) lookup table
Declares the CBlastOptionsHandle and CBlastOptionsFactory classes.
Declares the CBlastProteinOptionsHandle class.
EProgram
This enumeration is to evolve into a task/program specific list that specifies sets of default parame...
@ eBlastProgramMax
Undefined program.
Declares the CBlastpKmerOptionsHandle class.
Declares the CBlastxOptionsHandle class.
Handle to the Advanced BLASTP options.
Defines BLAST error codes (user errors included)
Handle to the nucleotide-nucleotide options to the BLAST algorithm.
Handle to the options to the BLAST algorithm.
Encapsulates ALL the BLAST algorithm's options.
Handle to the protein-protein options to the BLAST algorithm.
Handle to the KMER BLASTP options.
Handle to the translated nucleotide-protein options to the BLAST algorithm.
Handle to the nucleotide-nucleotide options to the discontiguous BLAST algorithm.
Handle to the protein-protein options to the BLAST algorithm.
Handle to the protein-translated nucleotide options to the BLAST algorithm.
Handle to the translated nucleotide-translated nucleotide options to the BLAST algorithm.
ECompoAdjustModes
An collection of constants that specify all permissible modes of composition adjustment.
@ eNoCompositionBasedStats
Don't use composition based statistics.
Declares the CDiscNucleotideOptionsHandle class.
int GetDustFilteringLinker() const
Get linker parameter for dust.
void SetGapExtensionCost(int e)
Sets GapExtensionCost.
double GetXDropoff() const
Returns XDropoff.
void SetLookupTableType(ELookupTableType type)
Sets LookupTableType.
void SetEvalueThreshold(double eval)
Sets EvalueThreshold.
int GetGapExtensionCost() const
Returns GapExtensionCost.
Int8 GetEffectiveSearchSpace() const
Returns EffectiveSearchSpace.
EBlastPrelimGapExt GetGapExtnAlgorithm() const
Returns GapExtnAlgorithm.
void SetWordThreshold(double wt)
Sets WordThreshold.
void SetDustFilteringWindow(int window)
Set window parameter for dust.
double GetGapTrigger() const
Returns GapTrigger.
bool GetSegFiltering() const
Is SEG filtering enabled?
EBlastTbackExt GetGapTracebackAlgorithm() const
Returns GapTracebackAlgorithm.
bool GetDustFiltering() const
Is dust filtering enabled?
void SetDbLength(Int8 len)
Sets DbLength.
bool GetSmithWatermanMode() const
Returns this mode, specifying that smith waterman rather than the normal blast heuristic should be us...
void SetWordSize(int ws)
Sets WordSize.
int GetWordSize() const
Returns WordSize.
void SetMatchReward(int r)
Sets MatchReward.
unsigned char GetTemplateType() const
Returns TemplateType.
void SetDbSeqNum(unsigned int num)
Sets DbSeqNum.
void SetGapTrigger(double g)
Sets GapTrigger.
int GetCandidateSeqs() const
Gets the max number of candidate matches to process with BLAST.
void SetSmithWatermanMode(bool m=false)
Sets this mode, specifying that smith waterman rather than the normal blast heuristic should be used ...
double GetInclusionThreshold() const
Returns InclusionThreshold.
double GetGapXDropoffFinal() const
Returns GapXDropoffFinal.
Int8 GetDbLength() const
Returns DbLength.
int GetMatchReward() const
Returns MatchReward.
void SetGapExtnAlgorithm(EBlastPrelimGapExt algo)
Sets GapExtnAlgorithm.
void SetDustFilteringLinker(int linker)
Set linker parameter for dust.
int GetSegFilteringWindow() const
Get window parameter for seg.
int GetMinHits() const
Returns the number of hits to initiate calculation of Jaccard distance.
void SetEffectiveSearchSpace(Int8 eff)
Sets EffectiveSearchSpace.
void SetGapOpeningCost(int g)
Sets GapOpeningCost.
const char * GetMatrixName() const
Returns MatrixName.
void SetCompositionBasedStats(ECompoAdjustModes mode)
Sets this mode, which mostly specifies whether composition of db sequence is taken into account when ...
double GetXDropoff() const
Returns XDropoff.
unsigned int GetDbSeqNum() const
Returns DbSeqNum.
static CBlastOptionsHandle * Create(EProgram program, EAPILocality locality=CBlastOptions::eLocal)
Creates an options handle object configured with default options for the requested program,...
int GetDustFilteringLevel() const
Get level parameter for dust.
void SetGapTracebackAlgorithm(EBlastTbackExt algo)
Sets GapTracebackAlgorithm.
double GetWordThreshold() const
Returns WordThreshold.
bool GetGappedMode() const
Returns GappedMode.
double GetSegFilteringHicut() const
Get hicut parameter for seg.
void SetMismatchPenalty(int p)
Sets MismatchPenalty.
double GetPercentIdentity() const
Returns PercentIdentity.
void SetMatrixName(const char *matrix)
Sets MatrixName.
void SetRepeatFilteringDB(const char *db)
Enable repeat filtering.
void SetHitlistSize(int s)
Sets HitlistSize.
const char * GetMatrixName() const
Returns MatrixName.
int GetGapExtensionCost() const
Returns GapExtensionCost.
int GetWordSize() const
Returns WordSize.
ECompoAdjustModes GetCompositionBasedStats() const
Returns this mode, which mostly specifies whether composition of db sequence is taken into account wh...
const CBlastOptions & GetOptions() const
Return the object which this object is a handle for.
void SetXDropoff(double x)
Sets XDropoff.
void SetWindowSize(int ws)
Sets WindowSize.
int GetMaxNumHspPerSequence() const
Returns MaxNumHspPerSequence.
bool GetMaskAtHash() const
Returns whether masking should only be done for lookup table creation.
void SetMatrixName(const char *matrix)
Sets MatrixName.
void SetRepeatFiltering(bool val)
Enable repeat filtering.
bool GetRepeatFiltering() const
Is repeat filtering enabled?
double GetWordThreshold() const
Returns WordThreshold.
void SetWordSize(int ws)
Sets WordSize.
void SetTemplateType(unsigned char type)
Sets TemplateType.
void SetGapXDropoffFinal(double x)
Sets GapXDropoffFinal.
int GetCutoffScore() const
Returns CutoffScore.
int GetDustFilteringWindow() const
Get window parameter for dust.
void SetXDropoff(double x)
Sets XDropoff.
void SetCullingLimit(int s)
Sets Culling limit.
void SetGapExtensionCost(int e)
Sets GapExtensionCost.
int GetGapOpeningCost() const
Returns GapOpeningCost.
void SetGapXDropoff(double x)
Sets GapXDropoff.
void SetMaskAtHash(bool m=true)
Sets MaskAtHash.
double GetGapXDropoff() const
Returns GapXDropoff.
const char * GetRepeatFilteringDB() const
Get the repeat filtering database.
ELookupTableType GetLookupTableType() const
Returns LookupTableType.
unsigned char GetTemplateLength() const
Returns TemplateLength.
void SetWordSize(int ws)
Sets WordSize.
ELookupTableType GetLookupTableType() const
int GetGapOpeningCost() const
Returns GapOpeningCost.
void SetSegFilteringWindow(int window)
Set window parameter for seg.
void SetDustFiltering(bool val)
Enable dust filtering.
int GetWindowSize() const
Returns WindowSize.
int GetMismatchPenalty() const
Returns MismatchPenalty.
int GetHitlistSize() const
Returns HitlistSize.
void SetMaxNumHspPerSequence(int m)
Sets MaxNumHspPerSequence.
void SetGappedMode(bool m=true)
Sets GappedMode.
void SetSegFiltering(bool val)
Enable SEG filtering.
void SetTemplateLength(unsigned char length)
Sets TemplateLength.
void SetPercentIdentity(double p)
Sets PercentIdentity.
double GetSegFilteringLocut() const
Get locut parameter for seg.
void SetCutoffScore(int s)
Sets CutoffScore.
void SetDustFilteringLevel(int level)
Set level parameter for dust.
const char * GetMatrixName() const
void SetGapOpeningCost(int g)
Sets GapOpeningCost.
void SetSegFilteringLocut(double locut)
Set locut parameter for seg.
void SetInclusionThreshold(double incthr)
Sets InclusionThreshold.
static CBlastOptionsHandle * CreateTask(string task, EAPILocality locality=CBlastOptions::eLocal)
Creates an options handle object configured with default options for the requested task,...
void SetSegFilteringHicut(double hicut)
Set hicut parameter for seg.
double GetEvalueThreshold() const
Returns EvalueThreshold.
int GetCullingLimit() const
Returns Culling limit.
const string & GetMsg(void) const
Get message string.
int64_t Int8
8-byte (64-bit) signed integer
ENa_strand
strand of nucleic acid
unsigned int
A callback function used to compare two keys in a database.
Magic spell ;-) needed for some weird compilers... very empiric.
const GenericPointer< typename T::ValueType > T2 value
int strcmp(const char *str1, const char *str2)
void VerifyMutatorAccessor(BC &obj, void(BC::*mutator)(T), T(BC::*accessor)(void) const, T &expected_value)
BOOST_FIXTURE_TEST_CASE(Set_Get_MaskAtHash_Universal, UniversalOptiosHandleFixture)
#define CALL_MEMBER_FUNCTION(obj, membFnPtr)
BOOST_AUTO_TEST_CASE(BlastnTest)
Declares the CPSIBlastOptionsHandle class.
~AdvancedProteinOptionsHandleFixture()
AdvancedProteinOptionsHandleFixture()
CBlastAdvancedProteinOptionsHandle * m_OptsHandle
BlastNuclOptionsHandleFixture()
~BlastNuclOptionsHandleFixture()
CBlastNucleotideOptionsHandle * m_OptsHandle
DiscNucleotideOptionsHandleFixture()
CDiscNucleotideOptionsHandle * m_OptsHandle
~DiscNucleotideOptionsHandleFixture()
PSIBlastOptiosHandleFixture()
CPSIBlastOptionsHandle * m_OptsHandle
~PSIBlastOptiosHandleFixture()
ProteinOptiosHandleFixture()
~ProteinOptiosHandleFixture()
CBlastProteinOptionsHandle * m_OptsHandle
UniversalOptiosHandleFixture()
CBlastOptionsHandle * m_OptsHandle
~UniversalOptiosHandleFixture()
Declares the CTBlastnOptionsHandle class.
Declares the CTBlastxOptionsHandle class.
Utility stuff for more convenient using of Boost.Test library.
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