56 lookup_segments, sbp, lookup_wrap_ptr,
57 rps_info, error_msg, seqsrc, 1);
78 *lookup_wrap_ptr = lookup_wrap =
82 switch ( lookup_options->
lut_type ) {
97 query, lookup_segments, 0);
107 lookup_options, sbp);
124 Int4 num_table_entries;
129 lookup_options, num_table_entries,
130 max_q_off, &lut_width);
135 lookup_options, query_options,
136 num_table_entries, lut_width,
142 lookup_options, query_options, lut_width);
147 lookup_options, query_options, lut_width);
153 lookup_options, query_options, seqsrc,
160 lookup_options, query_options, lut_width);
182 (&lookup_wrap->
lut));
187 alphabet_size =
lookup->alphabet_size;
202 switch(
lookup->lut_type) {
257 Int4 offset_array_size;
259 switch (
lookup->lut_type) {
288 return offset_array_size;
Routines for creating protein BLAST lookup tables.
Int2 RPSLookupTableNew(const BlastRPSInfo *rps_info, BlastRPSLookupTable **lut)
Create a new RPS blast lookup table.
Int4 BlastCompressedAaLookupTableNew(BLAST_SequenceBlk *query, BlastSeqLoc *locations, BlastCompressedAaLookupTable **lut, const LookupTableOptions *opt, BlastScoreBlk *sbp)
Create a new compressed protein lookup table.
BlastCompressedAaLookupTable * BlastCompressedAaLookupTableDestruct(BlastCompressedAaLookupTable *lookup)
Free the compressed lookup table.
BlastAaLookupTable * BlastAaLookupTableDestruct(BlastAaLookupTable *lookup)
Free the lookup table.
BlastRPSLookupTable * RPSLookupTableDestruct(BlastRPSLookupTable *lookup)
Free the lookup table.
void BlastAaLookupIndexQuery(BlastAaLookupTable *lookup, Int4 **matrix, BLAST_SequenceBlk *query, BlastSeqLoc *unmasked_regions, Int4 query_bias)
Index a protein query.
Int4 BlastAaLookupFinalize(BlastAaLookupTable *lookup, EBoneType bone_type)
Pack the data structures comprising a protein lookup table into their final form.
Int4 BlastAaLookupTableNew(const LookupTableOptions *opt, BlastAaLookupTable **lut)
Create a new protein lookup table.
#define sfree(x)
Safe free a pointer: belongs to a higher level header.
Declarations of static arrays used to define some NCBI encodings to be used in a toolkit independent ...
BLAST filtering functions.
void Blast_MaskUnsupportedAA(BLAST_SequenceBlk *seq, Uint1 min_invalid)
Mask protein letters that are currently unsupported.
Routines for creating nucleotide BLAST lookup tables.
BlastSmallNaLookupTable * BlastSmallNaLookupTableDestruct(BlastSmallNaLookupTable *lookup)
Free a small nucleotide lookup table.
Int4 BlastNaLookupTableNew(BLAST_SequenceBlk *query, BlastSeqLoc *locations, BlastNaLookupTable **lut, const LookupTableOptions *opt, const QuerySetUpOptions *query_options, Int4 lut_width)
Create a new nucleotide lookup table.
ELookupTableType BlastChooseNaLookupTable(const LookupTableOptions *lookup_options, Int4 approx_table_entries, Int4 query_length, Int4 *lut_width)
choose the type of nucleotide lookup table to be used for a blast search
BlastMBLookupTable * BlastMBLookupTableDestruct(BlastMBLookupTable *mb_lt)
Deallocate memory used by the Mega BLAST lookup table.
BlastNaHashLookupTable * BlastNaHashLookupTableDestruct(BlastNaHashLookupTable *lookup)
Free a nucleotide lookup table.
Int2 BlastMBLookupTableNew(BLAST_SequenceBlk *query, BlastSeqLoc *location, BlastMBLookupTable **mb_lt_ptr, const LookupTableOptions *lookup_options, const QuerySetUpOptions *query_options, Int4 approx_table_entries, Int4 lut_width, BlastSeqSrc *seqsrc)
Create the lookup table for Mega BLAST.
Int4 BlastNaHashLookupTableNew(BLAST_SequenceBlk *query, BlastSeqLoc *locations, BlastNaHashLookupTable **lut, const LookupTableOptions *opt, const QuerySetUpOptions *query_options, BlastSeqSrc *seqsrc, Uint4 num_threads)
Int4 BlastSmallNaLookupTableNew(BLAST_SequenceBlk *query, BlastSeqLoc *locations, BlastSmallNaLookupTable **lut, const LookupTableOptions *opt, const QuerySetUpOptions *query_options, Int4 lut_width)
Create a new small nucleotide lookup table.
BlastNaLookupTable * BlastNaLookupTableDestruct(BlastNaLookupTable *lookup)
Free a nucleotide lookup table.
@ eSmallNaLookupTable
lookup table for blastn with small query
@ eMixedMBLookupTable
use when some volumes are searched with index and some are not
@ eNaLookupTable
blastn lookup table
@ eMBLookupTable
megablast lookup table (includes both contiguous and discontiguous megablast)
@ eIndexedMBLookupTable
use database index as a lookup structure
@ ePhiNaLookupTable
nucleotide lookup table for phi-blast
@ eAaLookupTable
standard protein (blastp) lookup table
@ eCompressedAaLookupTable
compressed alphabet (blastp) lookup table
@ ePhiLookupTable
protein lookup table specialized for phi-blast
@ eRPSLookupTable
RPS lookup table (rpsblast and rpstblastn)
@ eNaHashLookupTable
used for 16-base words
RPS BLAST structure definitions.
static int lookup(const char *name, const struct lookup_int *table)
#define BLASTAA_SIZE
Size of aminoacid alphabet.
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
Utility functions for lookup table generation.
Int4 EstimateNumTableEntries(BlastSeqLoc *location, Int4 *max_off)
Given a list of query locations, estimate the number of words that would need to be added to a lookup...
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).
Int4 GetOffsetArraySize(LookupTableWrap *lookup)
Determine the size of the offsets arrays to be filled by the ScanSubject function.
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.
Wrapper for all lookup tables used in BLAST.
#define OFFSET_ARRAY_SIZE
Default size of offset arrays filled in a single ScanSubject call.
Uint1 Boolean
bool replacment for C
#define TRUE
bool replacment for C indicating true.
#define FALSE
bool replacment for C indicating false.
#define INT2_MAX
largest number represented by signed (two byte) short
#define ASSERT
macro for assert.
Pseudo lookup table structure and database scanning functions used in PHI-BLAST.
SPHIPatternSearchBlk * SPHIPatternSearchBlkFree(SPHIPatternSearchBlk *pattern_blk)
Deallocate memory for the PHI BLAST lookup table.
Int2 SPHIPatternSearchBlkNew(char *pattern, Boolean is_dna, BlastScoreBlk *sbp, SPHIPatternSearchBlk **pattern_blk, Blast_Message **error_msg)
Initialize the pattern items structure, serving as a "pseudo" lookup table in a PHI BLAST search.
Structure to hold a sequence.
The basic lookup table structure for blastp searches.
The lookup table structure for protein searches using a compressed alphabet.
The lookup table structure used for Mega BLAST.
The basic lookup table structure for blastn searches.
The RPS engine uses this structure to access all of the RPS blast related data (assumed to be collect...
The basic lookup table structure for RPS blast searches.
Structure used for scoring calculations.
SPsiBlastScoreMatrix * psi_matrix
PSSM and associated data.
SBlastScoreMatrix * matrix
scoring matrix data
Used to hold a set of positions, mostly used for filtering.
Complete type definition of Blast Sequence Source ADT.
Lookup table structure for blastn searches with small queries.
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.
char * phi_pattern
PHI-BLAST pattern.
ELookupTableType lut_type
What kind of lookup table to construct?
Wrapper structure for different types of BLAST lookup tables.
void * lut
Pointer to the actual lookup table structure.
ELookupTableType lut_type
What kind of a lookup table it is?
Options required for setting up the query sequence.
int ** data
actual scoring matrix data, stored in row-major form
Structure containing all auxiliary information needed in a pattern search.
SBlastScoreMatrix * pssm
position-specific score matrix
voidp calloc(uInt items, uInt size)