A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/blast__tune_8c_source.html below:

NCBI C++ ToolKit: src/algo/blast/core/blast_tune.c Source File

57 #define TARGET_HIT_PROB 0.98 95  double

percent_identity)

112

num_cells *

sizeof

(

double

));

114

num_cells *

sizeof

(

double

));

139

memset(matrix, 0, matrix_dim * matrix_dim *

sizeof

(

double

));

141  for

(

i

= 0,

row

= matrix;

i

< matrix_dim - 1;

142  i

++,

row

+= matrix_dim) {

143  row

[0] = 1.0 - identity;

144  row

[

i

+1] = identity;

164  double

*prod,

Int4

dim)

169  double

comp_identity = 1.0 - identity;

174  for

(

i

= 0;

i

< dim;

i

++) {

177  for

(j = 0; j < dim - 1; j++)

180

prod_row[0] = comp_identity * accum;

188  for

(

i

= 0;

i

< dim;

i

++) {

189  for

(j = 1; j < dim; j++) {

190

prod_row[j] = identity * a_row[j-1];

198

prod_row = prod + dim - 1;

199  for

(

i

= 0;

i

< dim;

i

++) {

200

prod_row[0] += a_row[0];

214  double

*prod_row = prod;

216  Int4

full_entries = dim & ~3;

228  for

(

i

= 0;

i

< dim;

i

++, prod_row += dim, a_row += dim) {

230  for

(j = 0; j < dim; j++) {

232  double

*a_col =

a

+ j;

234  for

(k = 0; k < full_entries; k += 4, a_col += 4 * dim) {

235

accum += a_row[k] * a_col[0] +

236

a_row[k+1] * a_col[dim] +

237

a_row[k+2] * a_col[2*dim] +

238

a_row[k+3] * a_col[3*dim];

240  for

(; k < dim; k++, a_col += dim) {

241

accum += a_row[k] * a_col[0];

250 #define SWAP_MATRIX(a,b) { \ 272  double

min_percent_identity,

273  Int4

min_align_length)

276  Int4

num_squares = 0;

278  if

(min_align_length == 0)

286

min_percent_identity);

295  while

(!(min_align_length &

mask

))

301  if

(num_squares == 0)

308  if

(min_align_length &

mask

) {

331  double

min_percent_identity,

332  Int4

min_align_length)

334  const double

k_min_w = 4;

335  const double

k_max_w = 110;

352

min_percent_identity,

353

min_align_length) != 0) {

360

min_percent_identity,

361

min_align_length) != 0) {

374  while

(p1 > 0 && w1 < k_max_w) {

376

w1 =

MIN

(2 * w1, k_max_w);

378

min_percent_identity,

379

min_align_length) != 0) {

389  return

(

Int4

)(w1 + 0.5);

399

min_percent_identity,

400

min_align_length) != 0) {

407  return

(

Int4

)(w0 + 0.5);

412  while

(

fabs

(w1 - w0) > 1) {

413  double

p2, w2 = (w0 + w1) / 2;

416

min_percent_identity,

417

min_align_length) != 0) {

432  return

(

Int4

)(w0 + 0.5);

437  Int4

min_align_length)

444  if

(min_percent_identity >= 1.0 || min_percent_identity < 0.6)

447  if

(min_align_length > 10000)

448

min_align_length = 10000;

449  else if

(min_align_length < 0)

451  else if

(min_align_length < 8)

#define sfree(x)

Safe free a pointer: belongs to a higher level header.

static Int2 s_FindHitProbability(MatrixData *m, Int4 word_size, double min_percent_identity, Int4 min_align_length)

For fixed word size and alignment properties, compute the probability that blastn with that word size...

static void s_MatrixMultiply(double *a, double identity, double *prod, Int4 dim)

Multiply the current exponentiated matrix by the original state transition matrix.

static void s_SetInitialMatrix(double *matrix, Int4 matrix_dim, double identity)

Loads the initial value for matrix exponentiation.

static void s_MatrixDataFree(MatrixData *m)

Free previously allocated scratch data.

#define SWAP_MATRIX(a, b)

swap two matrices by swapping pointers to them

static Int4 s_FindWordSize(MatrixData *m, double min_percent_identity, Int4 min_align_length)

For specified alignment properties, compute the blastn word size that will cause random alignments wi...

static Int2 s_MatrixDataInit(MatrixData *m)

initialize intermediate state.

#define TARGET_HIT_PROB

the probability that a random alignment will be found.

static void s_MatrixSquare(double *a, double *prod, Int4 dim)

Multiply a square matrix by itself.

struct MatrixData MatrixData

structure containing intermediate data to be processed

static Int2 s_MatrixDataReset(MatrixData *m, Int4 new_word_size, double percent_identity)

Set up for the next calculation of hit probability.

Compute a blastn word size appropriate for finding, with high probability, alignments with specified ...

Various auxiliary BLAST utility functions.

ncbi::TMaskedQueryRegions mask

Int4 BLAST_FindBestNucleotideWordSize(double min_percent_identity, Int4 min_align_length)

Given a minimum amount of identity and the minimum desired length of nucleotide alignments,...

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

#define MIN(a, b)

returns smaller of a and b.

#define row(bind, expected)

structure containing intermediate data to be processed

Int4 matrix_dim_alloc

max matrix size

Int4 matrix_dim

current matrix size

double hit_probability

for the current Markov chain, the probability that blastn will find a hit of specified length with sp...

double * prod_matrix

scratch space for matrix multiply

double percent_identity

the target percent identity, used to choose the blastn word size

double * power_matrix

space for iterated Markov chain


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