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/composition__adjustment_8c_source.html below:

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

45

{1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,22};

53

{(-1), 0, (-1), 4, 3, 6, 13, 7, 8, 9, 11, 10, 12, 2, 14, 5, 1, 15,

54

16, 19, 17, (-1), 18, (-1), (-1), (-1), (-1), (-1)};

84

{{4, -1, -2, -2, 0, -1, -1, 0, -2, -1, -1, -1, -1, -2, -1, 1, 0, -3, -2, 0},

85

{-1, 5, 0, -2, -3, 1, 0, -2, 0, -3, -2, 2, -1, -3, -2, -1, -1, -3, -2, -3},

86

{-2, 0, 6, 1, -3, 0, 0, 0, 1, -3, -3, 0, -2, -3, -2, 1, 0, -4, -2, -3},

87

{-2, -2, 1, 6, -3, 0, 2, -1, -1, -3, -4, -1, -3, -3, -1, 0, -1, -4, -3, -3},

88

{0,-3,-3,-3, 9, -3, -4, -3, -3, -1, -1, -3, -1, -2, -3, -1, -1, -2, -2, -1},

89

{-1, 1, 0, 0, -3, 5, 2, -2, 0, -3, -2, 1, 0, -3, -1, 0, -1, -2, -1, -2},

90

{-1, 0, 0, 2, -4, 2, 5, -2, 0, -3, -3, 1, -2, -3, -1, 0, -1, -3, -2, -2},

91

{0, -2, 0, -1, -3, -2, -2, 6, -2, -4, -4, -2, -3, -3, -2, 0, -2, -2, -3, -3},

92

{-2, 0, 1, -1, -3, 0, 0, -2, 8, -3, -3, -1, -2, -1, -2, -1, -2, -2, 2, -3},

93

{-1, -3, -3, -3, -1, -3, -3, -4, -3, 4, 2, -3, 1, 0, -3, -2, -1, -3, -1, 3},

94

{-1, -2, -3, -4, -1, -2, -3, -4, -3, 2, 4, -2, 2, 0, -3, -2, -1, -2, -1, 1},

95

{-1, 2, 0, -1, -3, 1, 1, -2, -1, -3, -2, 5, -1, -3, -1, 0, -1, -3, -2, -2},

96

{-1, -1, -2, -3, -1, 0, -2, -3, -2, 1, 2, -1, 5, 0, -2, -1, -1, -1, -1, 1},

97

{-2, -3, -3, -3, -2, -3, -3, -3, -1, 0, 0, -3, 0, 6, -4, -2, -2, 1, 3, -1},

98

{-1,-2,-2,-1, -3, -1, -1, -2, -2, -3, -3, -1, -2, -4, 7, -1, -1, -4, -3, -2},

99

{1, -1, 1, 0, -1, 0, 0, 0, -1, -2, -2, 0, -1, -2, -1, 4, 1, -3, -2, -2},

100

{0, -1, 0, -1, -1, -1, -1, -2, -2, -1, -1, -1, -1, -2, -1, 1, 5, -2, -2, 0},

101

{-3,-3,-4,-4, -2, -2, -3, -2, -2, -3, -2, -3, -1, 1, -4, -3, -2, 11, 2, -3},

102

{-2, -2, -2, -3, -2, -1, -2, -3, 2, -1, -1, -2, -1, 3, -3, -2, -2, 2, 7, -1},

103

{0, -3, -3, -3, -1, -2, -2, -3, -3, 3, 1, -2, 1, -1, -2, -2, 0, -3, -1, 4}};

108  int

number_of_observations,

109  const double

* background_probs20,

116  double

dpseudocounts = pseudocounts;

126  weight

= dpseudocounts / (number_of_observations + dpseudocounts);

128

probs20[

i

] = (1.0 -

weight

) * probs20[

i

] / sum

129

+

weight

* background_probs20[

i

];

143

temp = (

A

[

i

] +

B

[

i

]) / 2;

156  return

sqrt(

value

);

221  double

**score,

int

alphsize,

222  const double

row_prob[],

223  const double

col_prob[],

224  double

lambda_tolerance,

225  double

function_tolerance,

231  double

left = 0, right = 1;

233  double

x = 0.367879441171;

240  double

avg_score = 0.0;

243  for

(

i

= 0;

i

< alphsize;

i

++) {

244  if

(row_prob[

i

] == 0.0) {

247  for

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

248  if

(col_prob[j] == 0.0) {

251  if

(max_score < score[

i

][j]) {

252

max_score = score[

i

][j];

254

avg_score += row_prob[

i

] * col_prob[j] * score[

i

][j];

257  if

(max_score <= 0.0 || avg_score >= 0) {

260

*piterations = max_iterations;

264  for

(k = 0; k < max_iterations; k++) {

267  double

x_pow_max_score;

269  int

was_newton = is_newton;

273

x_pow_max_score = exp(-max_score *

lambda

);

274  f

= -x_pow_max_score;

275

slope = max_score *

f

/ x;

276  for

(

i

= 0;

i

< alphsize;

i

++) {

277  if

(row_prob[

i

] == 0.0) {

280  for

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

283  if

(col_prob[j] == 0.0) {

286  if

(max_score != score[

i

][j]) {

287  double

diff_score = max_score - score[

i

][j];

289

ff = row_prob[

i

] * col_prob[j] * exp(-

lambda

* diff_score);

290

slope += diff_score * ff / x;

292

ff = row_prob[

i

] * col_prob[j];

305  if

(right - left <= 2 * left * (1 - right) * lambda_tolerance &&

306  fabs

(

f

/x_pow_max_score) <= function_tolerance) {

308

x = (left + right) / 2;

311  if

((was_newton &&

fabs

(

f

) > .9 *

fabs

(fold))

317

x = (left + right)/2;

319  double

p = -

f

/slope;

321  if

(y <= left || y >= right) {

323

x = (left + right)/2;

327  if

(

fabs

(p) <= lambda_tolerance * x * (1-x) &&

328  fabs

(

f

/x_pow_max_score) <= function_tolerance)

break

;

332

*plambda = (k < max_iterations) ? -

log

(x) : -1.0;

340  const double

col_prob[],

double

Lambda)

343  double

entropy = 0.0;

344  for

(

i

= 0;

i

< alphsize;

i

++) {

345  for

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

347  double

nat_score = Lambda * matrix[

i

][j];

348

entropy += nat_score * exp(nat_score) * row_prob[

i

] * col_prob[j];

368

row_prob[

i

] += target_freq[

i

][j];

369

col_prob[j] += target_freq[

i

][j];

375  double

freq = target_freq[

i

][j];

376

entropy += freq *

log

(freq / row_prob[

i

] / col_prob[j]);

386  double

row_prob[],

double

col_prob[])

389  for

(

i

= 0;

i

< alphsize;

i

++) {

390  if

(row_prob[

i

] > 0) {

391  for

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

392  if

(col_prob[j] > 0) {

393

ratios[

i

][j] /= (row_prob[

i

] * col_prob[j]);

406  for

(

i

= 0;

i

< rows;

i

++) {

408  for

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

409  if

(0.0 == matrix[

i

][j]) {

412

matrix[

i

][j] =

log

(matrix[

i

][j])/Lambda;

429  const double

* inputLetterProbs,

int

alphsize)

433  for

(c = 0; c < alphsize; c++) {

435

outputLetterProbs[

alphaConvert

[c]] = inputLetterProbs[c];

454  for

(c = 0; c < alphsize; c++) {

488  double

** target_freq,

489  const double

row_prob[],

490  const double

col_prob[])

509  if

(scores ==

NULL

) {

514

old_row_prob[

i

] += target_freq[

i

][j];

515

old_col_prob[j] += target_freq[

i

][j];

522

old_row_prob, old_col_prob);

533

row_prob, col_prob, *Lambda);

557  for

(

a

= 0;

a

< small_alphsize;

a

++) {

558  for

(

b

= 0;

b

< small_alphsize;

b

++) {

559

sum += freq[

a

][

b

];

562  for

(

A

= 0;

A

< StdAlphsize;

A

++) {

566  for

(

B

= 0;

B

< StdAlphsize;

B

++) {

567

StdFreq[

A

][

B

] = 0.0;

573  for

(

B

= 0;

B

< StdAlphsize;

B

++) {

577

StdFreq[

A

][

B

] = 0.0;

581

StdFreq[

A

][

B

] = freq[

a

][

b

] / sum;

587  if

(StdAlphsize >

eJchar

) {

593

memcpy(StdFreq[

eBchar

], StdFreq[

eDchar

], StdAlphsize *

sizeof

(

double

));

596

memcpy(StdFreq[

eZchar

], StdFreq[

eEchar

], StdAlphsize *

sizeof

(

double

));

599  if

(StdAlphsize >

eJchar

) {

600

memcpy(StdFreq[

eJchar

],StdFreq[

eIchar

], StdAlphsize *

sizeof

(

double

));

620  double

score_iX = 0.0;

622  for

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

625

score_iX +=

M

[j * incM] * probs[j];

662  const double

row_probs[],

const double

col_probs[])

665  double

score_XX = 0.0;

668  const int

cols = alphsize;

670  for

(

i

= 0;

i

< alphsize;

i

++) {

674

score_XX += avg_iX * row_probs[

i

];

687  if

( alphsize >

eJchar

) {

694  for

(

i

= 0;

i

< alphsize;

i

++) {

699

memcpy(

M

[

eOchar

],

M

[

eXchar

], alphsize *

sizeof

(

double

));

700  for

(

i

= 0;

i

< alphsize;

i

++) {

710

x += (x >= 0. ? 0.5 : -0.5);

727  double

**floatScoreMatrix)

731  for

(p = 0; p < rows; p++) {

732  for

(c = 0; c < cols; c++) {

733  if

(floatScoreMatrix[p][c] < INT_MIN) {

734

matrix[p][c] = INT_MIN;

736

matrix[p][c] =

Nint

(floatScoreMatrix[p][c]);

761  double

** target_freq,

int

** StartMatrix,

762  const double

row_prob[],

const double

col_prob[],

776  if

(Scores ==

NULL

) {

793  for

(

i

= 0;

i

< Alphsize;

i

++) {

809  int

** matrix,

int

rows)

814  int

minScore, maxScore;

816

minScore = maxScore = 0;

817  for

(irow = 0; irow < rows; irow++) {

820  if

(matrix[irow][jcol] < minScore &&

822

minScore = matrix[irow][jcol];

823  if

(matrix[irow][jcol] > maxScore)

824

maxScore = matrix[irow][jcol];

854  int

**matrix,

int

alphsize,

855  const double

*subjectProbArray,

856  const double

*queryProbArray)

870

range = *obs_max - *obs_min + 1;

871

*scoreProb =

calloc

(range,

sizeof

(

double

));

872  if

(*scoreProb ==

NULL

) {

875

sprob = &((*scoreProb)[-(*obs_min)]);

876  for

(irow = 0; irow < alphsize; irow++) {

879  if

(matrix[irow][jcol] >= minScore) {

880

sprob[matrix[irow][jcol]] +=

881

(queryProbArray[irow] * subjectProbArray[jcol]);

907  int

**matrix,

int

rows,

908  const double

*subjectProbArray)

923

range = *obs_max - *obs_min + 1;

924

*scoreProb =

calloc

(range,

sizeof

(

double

));

925  if

(*scoreProb ==

NULL

) {

928

sprob = &((*scoreProb)[-(*obs_min)]);

929

onePosFrac = 1.0/ ((double) rows);

930  for

(irow = 0; irow < rows; irow++) {

933  if

(matrix[irow][jcol] >= minScore) {

934

sprob[matrix[irow][jcol]] +=

935

onePosFrac * subjectProbArray[jcol];

946  double

** freq,

double

Lambda)

953

dMatrix[0] = dMatrixStore;

955  for

(

i

= 0;

i

< alphsize;

i

++) {

956

memcpy(dMatrix[0], freq[

i

], alphsize *

sizeof

(

double

));

967  free

((*ss)->matrixName);

998  for

(

i

= 0;

i

< cols;

i

++) {

1025 s_ScalePSSM

(

int

**matrix,

int

rows,

int

cols,

double

** freq_ratios,

1026  int

** start_matrix,

const double

col_prob[],

double

Lambda)

1032  double

* row_matrix[1];

1034

row_matrix[0] =

row

;

1036  for

(p = 0; p < rows; p++) {

1038

memcpy(

row

, freq_ratios[p], cols *

sizeof

(

double

));

1071  double

** freq_ratios,

int

** start_matrix,

1072  const double

row_prob[],

const double

col_prob[],

1079  if

(scores == 0)

return

-1;

1081  for

(

i

= 0;

i

< alphsize;

i

++) {

1082

memcpy(scores[

i

], freq_ratios[

i

], alphsize *

sizeof

(

double

));

1087  for

(

i

= 0;

i

< alphsize;

i

++) {

1100 #define LambdaRatioLowerBound 0.5 1107  const double

queryProb[],

const double

resProb[],

1108  double

(*calc_lambda)(

double

*,

int

,

int

,

double

),

1109  int

pValueAdjustment)

1111  double

correctUngappedLambda;

1112  int

obs_min, obs_max;

1125

resProb, queryProb);

1129

correctUngappedLambda =

1139  if

(0 == pValueAdjustment)

1140

*LambdaRatio =

MIN

(1, *LambdaRatio);

1143  if

(*LambdaRatio > 0) {

1151

queryProb, resProb, scaledLambda);

1164  const Uint1

* sequence,

int

length)

1169  int

numTrueAminoAcids = 0;

1170  double

*

prob

= composition->

prob

;

1172  for

(

i

= 0;

i

< alphsize;

i

++) {

1175  for

(

i

= 0;

i

< length;

i

++) {

1177  prob

[sequence[

i

]]++;

1178

numTrueAminoAcids++;

1194  if

(numTrueAminoAcids > 0) {

1195  for

(

i

= 0;

i

< alphsize;

i

++) {

1196  prob

[

i

] /= numTrueAminoAcids;

1205  const Uint1

* subject_data,

int

length,

1206  int

start,

int

finish)

1213  for

(

i

= left;

i

> 0;

i

--) {

1231  for

(

i

= right;

i

< length;

i

++) {

1247

*pleft = left; *pright = right;

1257  if

(NRrecord !=

NULL

) {

1279  if

(NRrecord ==

NULL

)

goto

error_return;

1300  if

(NRrecord->

mat_b

==

NULL

)

goto

error_return;

1318  const char

*matrixName)

1327  "Matrix %s not currently supported for RE based adjustment\n"

,

1341  const double

* stdaa_row_probs,

1342  const double

* stdaa_col_probs,

1348  int

iteration_count, status;

1352  double dummy

, desired_re = 0.0;

1357  switch

(matrix_adjust_rule) {

1367

row_probs, col_probs);

1370  else if

(status > 0)

1378

desired_re = specifiedRE;

1381

fprintf(stderr,

"Unknown flag for setting relative entropy" 1382  "in composition matrix adjustment"

);

1394

&NRrecord->

mat_b

[0][0],

1395

row_probs, col_probs,

1407

row_probs, col_probs,

1421  int

RE_pseudocounts,

1424  double

calc_lambda(

double

*,

int

,

int

,

double

),

1425  double

*pvalueForThisPair,

1426  int

compositionTestIndex,

1427  double

*ratioToPassBack)

1429  const int

alphsize = matrixInfo->

cols

;

1431  double

lambdaForPair;

1447  if

((compositionTestIndex > 0) ||

1451

query_composition->

prob

, alphsize);

1453

subject_composition->

prob

, alphsize);

1456  if

(compositionTestIndex > 0) {

1461  if

(scores ==

NULL

) {

1493

*matrix_adjust_rule =

1498

composition_adjust_mode);

1507

*matrix_adjust_rule,

1510

subject_composition->

1512

query_composition->

prob

,

1513

subject_composition->

prob

,

1519

*ratioToPassBack = 1.0;

1527

query_composition->

prob

,

1528

subject_composition->

prob

,

1530

(compositionTestIndex > 0));

EMatrixAdjustRule Blast_ChooseMatrixAdjustRule(int length1, int length2, const double *probArray1, const double *probArray2, const char *matrixName, ECompoAdjustModes composition_adjust_mode)

Choose how the relative entropy should be constrained based on properties of the two sequences to be ...

Blast_CompositionWorkspace * Blast_CompositionWorkspaceNew(void)

Create a new Blast_CompositionWorkspace object, allocating memory for all its component arrays.

void Blast_ApplyPseudocounts(double *probs20, int number_of_observations, const double *background_probs20, int pseudocounts)

Find the weighted average of a set of observed probabilities with a set of "background" probabilities...

static double s_CalcXScore(double *M, int alphsize, int incM, const double probs[])

Calculate values for the X ambiguity score, give an vector of scores and a set of character probabili...

static void s_UnpackLetterProbs(double std_probs[], int alphsize, const double probs[])

Convert letter probabilities from a a 20 letter ARND...

int Blast_AdjustScores(int **matrix, const Blast_AminoAcidComposition *query_composition, int queryLength, const Blast_AminoAcidComposition *subject_composition, int subjectLength, const Blast_MatrixInfo *matrixInfo, ECompoAdjustModes composition_adjust_mode, int RE_pseudocounts, Blast_CompositionWorkspace *NRrecord, EMatrixAdjustRule *matrix_adjust_rule, double calc_lambda(double *, int, int, double), double *pvalueForThisPair, int compositionTestIndex, double *ratioToPassBack)

Compute a compositionally adjusted scoring matrix.

static int alphaConvert[COMPO_LARGEST_ALPHABET]

conversion from 26 letter NCBIstdaa alphabet to 20 letter order for true amino acids: ARNDCQEGHILKMFP...

static void s_ScalePSSM(int **matrix, int rows, int cols, double **freq_ratios, int **start_matrix, const double col_prob[], double Lambda)

Fill in all scores for a PSSM at a given scale Lambda.

static void s_SetXUOScores(double **M, int alphsize, const double row_probs[], const double col_probs[])

Given a standard matrix with the scores for true amino acid, and pairwise ambiguity scores set,...

static double s_CalcAvgScore(double *M, int alphsize, int incM, const double probs[])

Calculate the average score of a row or column of a matrix.

int Blast_CompositionWorkspaceInit(Blast_CompositionWorkspace *NRrecord, const char *matrixName)

Initialize the fields of a Blast_CompositionWorkspace for a specific underlying scoring matrix.

static const double kCompoAdjustErrTolerance

bound on error for Newton's method

static const int kCompositionMargin

Desired margin between an end of region used for computing a composition, and the nearest StopChar; t...

int Blast_EntropyOldFreqNewContext(double *entropy, double *Lambda, int *iter_count, double **target_freq, const double row_prob[], const double col_prob[])

Compute the relative entropy of the scoring matrix that is consistent with a set of target frequencie...

static int trueCharPositions[COMPO_NUM_TRUE_AA]

positions of true characters in protein alphabet

static void s_GetScoreRange(int *obs_min, int *obs_max, int **matrix, int rows)

Find the range of scores contained in an scoring matrix.

void Blast_Int4MatrixFromFreq(int **matrix, int alphsize, double **freq, double Lambda)

Compute an integer-valued amino-acid score matrix from a set of score frequencies.

static const double kLambdaFunctionTolerance

bound on the difference between the expected value of exp(lambda x S) and 1

void Blast_FreqRatioToScore(double **matrix, int rows, int cols, double Lambda)

Convert a matrix of frequency ratios to a matrix of scores.

static void s_SetPairAmbigProbsToSum(double probs[], int alphsize)

Set the probabilities for the two-character ambiguity characters.

static int s_GetMatrixScoreProbs(double **scoreProb, int *obs_min, int *obs_max, int **matrix, int alphsize, const double *subjectProbArray, const double *queryProbArray)

Compute the score probabilities for a given amino acid substitution matrix in the context of given qu...

static const double kFixedReBlosum62

relative entropy of BLOSUM62

static void s_RoundScoreMatrix(int **matrix, int rows, int cols, double **floatScoreMatrix)

Round a floating point matrix of scores to produce an integer matrix of scores.

static int s_GetPssmScoreProbs(double **scoreProb, int *obs_min, int *obs_max, int **matrix, int rows, const double *subjectProbArray)

Compute the score probabilities for a given amino acid position-specific substitution matrix in the c...

Blast_MatrixInfo * Blast_MatrixInfoNew(int rows, int cols, int positionBased)

Create a Blast_MatrixInfo object.

double Blast_GetRelativeEntropy(const double A[], const double B[])

Compute the symmetric form of the relative entropy of two probability vectors.

double Blast_TargetFreqEntropy(double **target_freq)

Compute the entropy of the scoring matrix implicit in a set of target substitution frequencies.

static void s_GatherLetterProbs(double *outputLetterProbs, const double *inputLetterProbs, int alphsize)

Convert letter probabilities from the NCBIstdaa alphabet to a 20 letter ARND...

static const double kLambdaErrorTolerance

bound on error for estimating lambda

int Blast_CompositionMatrixAdj(int **matrix, int alphsize, EMatrixAdjustRule matrix_adjust_rule, int length1, int length2, const double *stdaa_row_probs, const double *stdaa_col_probs, int pseudocounts, double specifiedRE, Blast_CompositionWorkspace *NRrecord, const Blast_MatrixInfo *matrixInfo)

Use compositional score matrix adjustment, as described in.

void Blast_MatrixInfoFree(Blast_MatrixInfo **ss)

Free memory associated with a Blast_MatrixInfo object.

int Blast_CompositionBasedStats(int **matrix, double *LambdaRatio, const Blast_MatrixInfo *ss, const double queryProb[], const double resProb[], double(*calc_lambda)(double *, int, int, double), int pValueAdjustment)

Use composition-based statistics to adjust the scoring matrix, as described in.

static const int kLambdaIterationLimit

iteration limit for Newton's method for computing Lambda

static int s_ScaleSquareMatrix(int **matrix, int alphsize, double **freq_ratios, int **start_matrix, const double row_prob[], const double col_prob[], double Lambda)

Fill in all scores for a scoring matrix for the NCBIstdaa alphabet at a given scale Lambda.

static int s_ScoresStdAlphabet(int **Matrix, int Alphsize, double **target_freq, int **StartMatrix, const double row_prob[], const double col_prob[], double Lambda)

Given a set of target frequencies and two sets of character probabilities for the true amino acids in...

#define LambdaRatioLowerBound

LambdaRatioLowerBound is used when the expected score is too large causing impalaKarlinLambdaNR to gi...

void Blast_TrueAaToStdTargetFreqs(double **StdFreq, int StdAlphsize, double **freq)

Convert a matrix of target frequencies for the ARND alphabet of true amino acids to a set of target f...

void Blast_GetCompositionRange(int *pleft, int *pright, const Uint1 *subject_data, int length, int start, int finish)

Get the range of a sequence to be included when computing a composition.

static double BLOS62[COMPO_NUM_TRUE_AA][COMPO_NUM_TRUE_AA]

The BLOSUM62 matrix for the ARND...

void Blast_CalcLambdaFullPrecision(double *plambda, int *piterations, double **score, int alphsize, const double row_prob[], const double col_prob[], double lambda_tolerance, double function_tolerance, int max_iterations)

Given a score matrix the character frequencies in two sequences, compute the ungapped statistical par...

double Blast_MatrixEntropy(double **matrix, int alphsize, const double row_prob[], const double col_prob[], double Lambda)

Calculate the entropy of a matrix relative to background probabilities for two sequences.

void Blast_CalcFreqRatios(double **ratios, int alphsize, double row_prob[], double col_prob[])

Given a matrix of target frequencies, divide all elements by the character probabilities to get a mat...

static const int kCompoAdjustIterationLimit

iteration limit for Newton's method

static long Nint(double x)

Return the nearest integer to x.

static const double kMaximumXscore

largest permitted value of score(i,X), when scores are computed using composition adjustment

void Blast_CompositionWorkspaceFree(Blast_CompositionWorkspace **pNRrecord)

Free memory associated with a record of type Blast_CompositionWorkspace.

void Blast_ReadAaComposition(Blast_AminoAcidComposition *composition, int alphsize, const Uint1 *sequence, int length)

Compute the true amino acid composition of a sequence, ignoring ambiguity characters and other nonsta...

Definitions used in compositional score matrix adjustment.

Constants used in compositional score matrix adjustment.

ECompoAdjustModes

An collection of constants that specify all permissible modes of composition adjustment.

@ eCompositionBasedStats

Composition-based statistics as in NAR 29:2994-3005, 2001.

#define COMPO_NUM_TRUE_AA

Number of standard amino acids.

EMatrixAdjustRule

An collection of constants that specify all rules that may be used to generate a compositionally adju...

@ eRelEntropyOldMatrixOldContext

@ eRelEntropyOldMatrixNewContext

@ eUserSpecifiedRelEntropy

@ eUnconstrainedRelEntropy

#define COMPO_LARGEST_ALPHABET

The largest alphabet supported by this code (the code supports 26 or 28 character amino acid alphabet...

#define COMPO_SCORE_MIN

Minimum score in a matrix.

uint8_t Uint1

1-byte (8-bit) unsigned integer

Definitions used to get joint probabilities for a scoring matrix.

int Blast_GetJointProbsForMatrix(double **probs, double row_sums[], double col_sums[], const char *matrixName)

Get joint probabilities for the named matrix.

const GenericPointer< typename T::ValueType > T2 value

Type and macro definitions from C toolkit that are not defined in C++ toolkit.

#define MIN(a, b)

returns smaller of a and b.

#define MAX(a, b)

returns larger of a and b.

double lambda(size_t dimMatrix_, const Int4 *const *scoreMatrix_, const double *q_)

Declarations for several linear algebra routines.

double ** Nlm_DenseMatrixNew(int nrows, int ncols)

Create and return a new, dense matrix.

void Nlm_DenseMatrixFree(double ***mat)

Free a matrix created by Nlm_DenseMatrixNew or Nlm_LtriangMatrixNew.

void Nlm_AddVectors(double y[], int n, double alpha, const double x[])

Let y = y + alpha * x.

void Nlm_Int4MatrixFree(int ***mat)

Free a matrix created by Nlm_DenseMatrixNew or Nlm_LtriangMatrixNew.

int ** Nlm_Int4MatrixNew(int nrows, int ncols)

Create and return a new Int4 matrix.

Routines for finding an optimal set of target frequencies for the purpose of generating a composition...

int Blast_OptimizeTargetFrequencies(double x[], int alphsize, int *iterations, const double q[], const double row_sums[], const double col_sums[], int constrain_rel_entropy, double relative_entropy, double tol, int maxits)

Find an optimal set of target frequencies for the purpose of generating a compositionally adjusted sc...

#define row(bind, expected)

Represents the composition of an amino-acid sequence, in the ncbistdaa alphabet.

int numTrueAminoAcids

number of true amino acids in the sequence, omitting nonstandard amino acids

double prob[COMPO_LARGEST_ALPHABET]

probabilities of each amino acid

Work arrays used to perform composition-based matrix adjustment.

double * first_standard_freq

background frequency vector of the first sequence

double ** mat_final

optimized target frequencies

double * second_standard_freq

background frequency vector of the second sequence

double ** mat_b

joint probabilities for the matrix in standard context

Information about a amino-acid substitution matrix.

double ** startFreqRatios

frequency ratios used to calculate matrix scores

int cols

the number of columns in the scoring matrix, i.e.

char * matrixName

name of the matrix

int positionBased

is the matrix position-based

int rows

the number of rows in the scoring matrix.

double ungappedLambda

ungapped Lambda value for this matrix in standard context

int ** startMatrix

Rescaled values of the original matrix.

Headers for computing a "composition" p-value of a match, and for computing a unified p-value combini...

#define COMPO_MIN_LAMBDA

the smallest value of lambda in the table of lambda's empirical distribution function.

double Blast_CompositionPvalue(double lambda)

Conditionally compute a compositional p-value.

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