NCBI C++ ToolKit
|
Wrapper for all lookup tables used in BLAST. More...
#include <algo/blast/core/ncbi_std.h>
#include <algo/blast/core/blast_def.h>
#include <algo/blast/core/blast_options.h>
#include <algo/blast/core/blast_rps.h>
#include <algo/blast/core/blast_stat.h>
#include <algo/blast/core/blast_seqsrc.h>
Go to the source code of this file.
Go to the SVN repository for this file.
Classes | |
struct | LookupTableWrap |
Wrapper structure for different types of BLAST lookup tables. More... | |
Macros | |
#define | OFFSET_ARRAY_SIZE 4096 |
Default size of offset arrays filled in a single ScanSubject call. More... | |
Typedefs | |
typedef struct LookupTableWrap | LookupTableWrap |
Wrapper structure for different types of BLAST lookup tables. More... | |
typedef Boolean(* | T_Lookup_Callback) (const LookupTableWrap *, Int4, Int4) |
Function pointer type to check the presence of index->q_off pair. More... | |
Functions | |
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. More... | |
Int2 | LookupTableWrapInit_MT (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, Uint4 num_threads) |
Create the lookup table for all query words (possibly multithreaded, depends on implementation). More... | |
LookupTableWrap * | LookupTableWrapFree (LookupTableWrap *lookup) |
Deallocate memory for the lookup table. More... | |
Int4 | GetOffsetArraySize (LookupTableWrap *lookup) |
Determine the size of the offsets arrays to be filled by the ScanSubject function. More... | |
Wrapper for all lookup tables used in BLAST.
Definition in file lookup_wrap.h.
#define OFFSET_ARRAY_SIZE 4096 |
Default size of offset arrays filled in a single ScanSubject call.
Definition at line 119 of file lookup_wrap.h.
typedef struct LookupTableWrap LookupTableWrap |
Wrapper structure for different types of BLAST lookup tables.
typedef Boolean(* T_Lookup_Callback) (const LookupTableWrap *, Int4, Int4) |
Function pointer type to check the presence of index->q_off pair.
Definition at line 66 of file lookup_wrap.h.
Int4 GetOffsetArraySize | ( | LookupTableWrap * | lookup | ) |
Determine the size of the offsets arrays to be filled by the ScanSubject function.
Definition at line 255 of file lookup_wrap.c.
References eAaLookupTable, eCompressedAaLookupTable, eMBLookupTable, eNaHashLookupTable, eNaLookupTable, eSmallNaLookupTable, lookup(), and OFFSET_ARRAY_SIZE.
Referenced by AascanTestFixture::AascanTestFixture(), BOOST_AUTO_TEST_CASE(), CompressedAascanTestFixture::CompressedAascanTestFixture(), CSeedTop::Run(), s_BlastSearchEngineOneContext(), s_BlastSetUpAuxStructures(), TestFixture::ScanCheckHitsCore(), TestFixture::ScanMaxHitsTestCore(), TestFixture::ScanOffsetTestCore(), TestFixture::SetUpLookupTable(), and TestFixture::SkipMaskedRangesCore().
LookupTableWrap* LookupTableWrapFree | ( | LookupTableWrap * | lookup | ) |
Deallocate memory for the lookup table.
Definition at line 197 of file lookup_wrap.c.
References BlastAaLookupTableDestruct(), BlastCompressedAaLookupTableDestruct(), BlastMBLookupTableDestruct(), BlastNaHashLookupTableDestruct(), BlastNaLookupTableDestruct(), BlastSmallNaLookupTableDestruct(), eAaLookupTable, eCompressedAaLookupTable, eIndexedMBLookupTable, eMBLookupTable, eMixedMBLookupTable, eNaHashLookupTable, eNaLookupTable, ePhiLookupTable, ePhiNaLookupTable, eRPSLookupTable, eSmallNaLookupTable, lookup(), NULL, RPSLookupTableDestruct(), sfree, and SPHIPatternSearchBlkFree().
Referenced by BlastSetupPreliminarySearchEx(), BOOST_AUTO_TEST_CASE(), s_GetInitialWordParameters(), LinkHspTestFixture::setupCutoffScores(), TestFixture::TearDownLookupTable(), CBlastTracebackSearch::x_Init(), AalookupTestFixture::~AalookupTestFixture(), AascanTestFixture::~AascanTestFixture(), CompressedAalookupTestFixture::~CompressedAalookupTestFixture(), CompressedAascanTestFixture::~CompressedAascanTestFixture(), and NuclWordFinderTextFixture::~NuclWordFinderTextFixture().
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.
query | The query sequence [in] |
lookup_options | What kind of lookup table to build? [in] |
query_options | options for query setup [in] |
lookup_segments | Locations on query to be used for lookup table construction [in] |
sbp | Scoring block containing matrix [in] |
lookup_wrap_ptr | The initialized lookup table [out] |
rps_info | Structure containing RPS blast setup information [in] |
error_msg | message with warning or errors [in|out] |
seqsrc | Database sequences [in] |
Definition at line 47 of file lookup_wrap.c.
References LookupTableWrapInit_MT(), and query.
Referenced by AascanTestFixture::AascanTestFixture(), BOOST_AUTO_TEST_CASE(), CompressedAascanTestFixture::CompressedAascanTestFixture(), CompressedAalookupTestFixture::FillLookupTable(), AalookupTestFixture::FillLookupTable(), s_GetInitialWordParameters(), LinkHspTestFixture::setupCutoffScores(), TestFixture::SetUpLookupTable(), CPhiblastTestFixture::setUpLookupTable(), and CSeedTop::x_MakeLookupTable().
Int2 LookupTableWrapInit_MT | ( | 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, | ||
Uint4 | num_threads | ||
) |
Create the lookup table for all query words (possibly multithreaded, depends on implementation).
query | The query sequence [in] |
lookup_options | What kind of lookup table to build? [in] |
query_options | options for query setup [in] |
lookup_segments | Locations on query to be used for lookup table construction [in] |
sbp | Scoring block containing matrix [in] |
lookup_wrap_ptr | The initialized lookup table [out] |
rps_info | Structure containing RPS blast setup information [in] |
error_msg | message with warning or errors [in|out] |
seqsrc | Database sequences [in] |
num_threads | Number of threads to use [in] |
Definition at line 61 of file lookup_wrap.c.
References ASSERT, Blast_MaskUnsupportedAA(), BLASTAA_SIZE, BlastAaLookupFinalize(), BlastAaLookupIndexQuery(), BlastAaLookupTableNew(), BlastChooseNaLookupTable(), BlastCompressedAaLookupTableNew(), BlastMBLookupTableNew(), BlastNaHashLookupTableNew(), BlastNaLookupTableNew(), BlastSmallNaLookupTableNew(), calloc(), SBlastScoreMatrix::data, eAaLookupTable, eBackbone, eCompressedAaLookupTable, eIndexedMBLookupTable, eMBLookupTable, eMixedMBLookupTable, eNaHashLookupTable, eNaLookupTable, ePhiLookupTable, ePhiNaLookupTable, eRPSLookupTable, eSmallbone, eSmallNaLookupTable, EstimateNumTableEntries(), FALSE, INT2_MAX, lookup(), LookupTableWrap::lut, LookupTableOptions::lut_type, LookupTableWrap::lut_type, BlastScoreBlk::matrix, NULL, LookupTableOptions::phi_pattern, BlastScoreBlk::psi_matrix, SPsiBlastScoreMatrix::pssm, query, RPSLookupTableNew(), SPHIPatternSearchBlkNew(), and TRUE.
Referenced by CSetupFactory::CreateLookupTable(), and LookupTableWrapInit().