hits_in_chain = 0;
49 if(backbone[index] ==
NULL) {
54chain[0] = chain_size;
55chain[1] = hits_in_chain;
56backbone[index] = chain;
59chain = backbone[index];
60chain_size = chain[0];
61hits_in_chain = chain[1];
65 if((hits_in_chain + 2) == chain_size) {
66chain_size = chain_size * 2;
67chain = (
Int4*) realloc(chain, chain_size *
sizeof(
Int4));
70backbone[index] = chain;
71chain[0] = chain_size;
75chain[chain[1] + 2] = query_offset;
90 Uint1invalid_mask = 0xff << charsize;
92 for(loc = locations; loc; loc = loc->
next) {
99 if(word_length > to - from + 1)
105seq =
query->sequence + from;
106word_target = seq + lut_word_length;
110 if(seq >= word_target) {
112lut_word_length, charsize,
113seq - lut_word_length,
114 offset- lut_word_length);
119 if(*seq & invalid_mask)
120word_target = seq + lut_word_length + 1;
124 if(seq >= word_target) {
126lut_word_length, charsize,
127seq - lut_word_length,
128 offset- lut_word_length);
185 for(
i= 0;
i< wordsize;
i++) {
186large_index = (large_index << charsize) | seq[
i];
202 if(backbone[index].num_offsets == 0) {
208 while(
b->next &&
b->word != large_index) {
213 if(
b->word == large_index) {
241 Int4lut_word_length,
252 Uint1invalid_mask = 0xff << charsize;
254 for(loc = locations; loc; loc = loc->
next) {
261 if(word_length > to - from + 1)
267seq =
query->sequence + from;
268word_target = seq + lut_word_length;
272 if(seq >= word_target) {
275lut_word_length, charsize,
276seq - lut_word_length,
284 if(*seq & invalid_mask)
285word_target = seq + lut_word_length + 1;
289 if(seq >= word_target) {
292lut_word_length, charsize,
293seq - lut_word_length,
#define sfree(x)
Safe free a pointer: belongs to a higher level header.
void BlastLookupAddWordHit(Int4 **backbone, Int4 wordsize, Int4 charsize, Uint1 *seq, Int4 query_offset)
Add a single query offset to a generic lookup table.
static Int2 s_AddWordHit(BackboneCell *backbone, Int4 *offsets, Int4 wordsize, Int4 charsize, Uint1 *seq, Int4 offset, TNaLookupHashFunction hash_func, Uint4 mask, PV_ARRAY_TYPE *pv_array)
BackboneCell * BackboneCellFree(BackboneCell *cell)
void BlastHashLookupIndexQueryExactMatches(BackboneCell *backbone, Int4 *offsets, Int4 word_length, Int4 charsize, Int4 lut_word_length, BLAST_SequenceBlk *query, BlastSeqLoc *locations, TNaLookupHashFunction hash_func, Uint4 mask, PV_ARRAY_TYPE *pv_array)
BackboneCell * BackboneCellNew(Uint4 word, Int4 offset)
Create a new cell for a given word and offset.
void BlastLookupIndexQueryExactMatches(Int4 **backbone, Int4 word_length, Int4 charsize, Int4 lut_word_length, BLAST_SequenceBlk *query, BlastSeqLoc *locations)
Add all applicable query offsets to a generic lookup table.
Int4 BackboneCellInit(BackboneCell *cell, Uint4 word, Int4 offset)
Initialize an olready allocated cell for a given word and offset.
Common definitions for protein and nucleotide lookup tables.
#define PV_ARRAY_BTS
bits-to-shift from lookup_index to pv_array index.
#define PV_TEST(lookup, index, shift)
Test the bit at position 'index' in the PV array bitfield within 'lookup'.
static NCBI_INLINE Int4 ComputeTableIndex(Int4 wordsize, Int4 charsize, const Uint1 *word)
Given a word, compute its index value from scratch.
Uint4(* TNaLookupHashFunction)(Uint1 *, Uint4)
Hash function type for the lookup table.
#define PV_ARRAY_TYPE
The pv_array 'native' type.
ncbi::TMaskedQueryRegions mask
static DLIST_TYPE *DLIST_NAME() next(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
uint8_t Uint1
1-byte (8-bit) unsigned integer
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
#define ASSERT
macro for assert.
static PCRE2_SIZE * offsets
Structure to hold a sequence.
Thin backbone cell for nucleotide lookup table with hashed words.
Used to hold a set of positions, mostly used for filtering.
SSeqRange * ssr
location data on the sequence.
struct BlastSeqLoc * next
next in linked list
Int4 left
left endpoint of range (zero based)
Int4 right
right endpoint of range (zero based)
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