📄 matrix_freq_ratios.c
字号:
{0.000, 1.075, 1.825, 0.295, 2.197, 2.414, 0.287, 1.044, 1.165, 0.626, 0.988, 0.464, 0.614, 1.393, 0.880, 1.771, 0.782, 0.999, 0.914, 0.660, 0.201, 0.750, 0.372, 2.134, 0.000, 0.170},{0.000, 0.446, 0.354, 0.371, 0.274, 0.287, 8.028, 0.332, 0.659, 1.262, 0.298, 1.518, 1.043, 0.447, 0.351, 0.343, 0.359, 0.478, 0.488, 0.766, 1.077, 0.750, 4.975, 0.311, 0.000, 0.170},{0.000, 1.339, 1.119, 0.459, 1.147, 1.044, 0.332, 2.991, 0.616, 0.557, 0.678, 0.395, 0.525, 1.087, 0.894, 0.757, 0.555, 1.278, 0.999, 0.735, 0.200, 0.750, 0.300, 0.919, 0.000, 0.170},{0.000, 0.732, 1.297, 0.452, 1.173, 1.165, 0.660, 0.616, 4.475, 0.571, 0.990, 0.620, 0.610, 1.440, 0.947, 1.962, 1.431, 0.830, 0.741, 0.597, 0.544, 0.750, 0.979, 1.512, 0.000, 0.170},{0.000, 0.889, 0.617, 0.588, 0.580, 0.626, 1.262, 0.557, 0.571, 2.830, 0.641, 1.749, 1.650, 0.660, 0.627, 0.625, 0.629, 0.723, 1.017, 2.338, 0.303, 0.750, 0.800, 0.626, 0.000, 0.170},{0.000, 0.766, 1.130, 0.286, 1.020, 0.988, 0.298, 0.678, 0.990, 0.641, 2.926, 0.519, 1.100, 1.258, 0.770, 1.184, 2.182, 0.962, 0.996, 0.570, 0.451, 0.750, 0.360, 1.073, 0.000, 0.170},{0.000, 0.646, 0.453, 0.248, 0.398, 0.464, 1.518, 0.395, 0.620, 1.749, 0.519, 3.930, 2.338, 0.516, 0.556, 0.665, 0.501, 0.524, 0.677, 1.532, 0.647, 0.750, 0.815, 0.551, 0.000, 0.170},{0.000, 0.770, 0.605, 0.299, 0.548, 0.614, 1.043, 0.525, 0.609, 1.650, 1.100, 2.338, 4.404, 0.670, 0.621, 0.796, 0.905, 0.699, 0.873, 1.510, 0.375, 0.750, 0.568, 0.693, 0.000, 0.170},{0.000, 1.040, 1.600, 0.433, 1.610, 1.393, 0.447, 1.087, 1.440, 0.660, 1.258, 0.516, 0.671, 1.588, 0.893, 1.197, 1.000, 1.173, 1.107, 0.668, 0.394, 0.750, 0.621, 1.307, 0.000, 0.170},{0.000, 1.294, 0.846, 0.527, 0.806, 0.880, 0.351, 0.894, 0.946, 0.627, 0.770, 0.556, 0.621, 0.893, 3.841, 1.055, 0.960, 1.243, 1.076, 0.758, 0.275, 0.750, 0.321, 0.956, 0.000, 0.170},{0.000, 0.903, 1.339, 0.290, 1.462, 1.772, 0.343, 0.757, 1.962, 0.625, 1.184, 0.665, 0.796, 1.197, 1.056, 2.541, 1.335, 0.890, 0.833, 0.649, 0.335, 0.750, 0.395, 2.107, 0.000, 0.170},{0.000, 0.701, 0.862, 0.430, 0.743, 0.782, 0.359, 0.555, 1.430, 0.629, 2.182, 0.501, 0.905, 1.000, 0.960, 1.335, 4.078, 0.928, 0.820, 0.561, 1.652, 0.750, 0.379, 1.023, 0.000, 0.170},{0.000, 1.290, 1.117, 0.990, 1.069, 0.999, 0.478, 1.278, 0.830, 0.722, 0.962, 0.524, 0.699, 1.173, 1.244, 0.890, 0.928, 1.441, 1.362, 0.799, 0.566, 0.750, 0.520, 0.951, 0.000, 0.170},{0.000, 1.317, 1.032, 0.601, 0.968, 0.914, 0.488, 0.999, 0.741, 1.016, 0.996, 0.677, 0.873, 1.107, 1.075, 0.833, 0.820, 1.362, 1.806, 1.068, 0.306, 0.750, 0.530, 0.879, 0.000, 0.170},{0.000, 1.045, 0.638, 0.639, 0.612, 0.660, 0.766, 0.735, 0.597, 2.338, 0.570, 1.532, 1.511, 0.668, 0.758, 0.649, 0.561, 0.799, 1.068, 2.698, 0.237, 0.750, 0.566, 0.656, 0.000, 0.170},{0.000, 0.264, 0.297, 0.169, 0.213, 0.201, 1.077, 0.200, 0.544, 0.303, 0.450, 0.647, 0.375, 0.394, 0.275, 0.335, 1.651, 0.566, 0.306, 0.237, 52.679, 0.750, 0.970, 0.259, 0.000, 0.170},{0.000, 0.750, 0.750, 0.750, 0.750, 0.750, 0.750, 0.750, 0.750, 0.750, 0.750, 0.750, 0.750, 0.750, 0.750, 0.750, 0.750, 0.750, 0.750, 0.750, 0.750, 0.750, 0.750, 0.750, 0.000, 0.170},{0.000, 0.450, 0.486, 1.078, 0.369, 0.372, 4.976, 0.300, 0.979, 0.800, 0.360, 0.815, 0.568, 0.621, 0.321, 0.395, 0.379, 0.520, 0.530, 0.566, 0.970, 0.750, 10.338, 0.382, 0.000, 0.170},{0.000, 1.000, 1.613, 0.293, 1.877, 2.134, 0.311, 0.919, 1.512, 0.626, 1.073, 0.551, 0.693, 1.307, 0.956, 2.107, 1.023, 0.951, 0.879, 0.656, 0.259, 0.750, 0.382, 2.122, 0.000, 0.170},{0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.170},{0.170, 0.170, 0.170, 0.170, 0.170, 0.170, 0.170, 0.170, 0.170, 0.170, 0.170, 0.170, 0.170, 0.170, 0.170, 0.170, 0.170, 0.170, 0.170, 0.170, 0.170, 0.170, 0.170, 0.170, 0.170, 1.333}, };#define BLOSUM62_20A_SCALE_MULTIPLIER 0.9666#define BLOSUM62_20B_SCALE_MULTIPLIER 0.9344SFreqRatios*_PSIMatrixFrequencyRatiosNew(const char* matrix_name){ unsigned int i, j; /* loop indices */ SFreqRatios* retval = NULL; /* the return value */ ASSERT(matrix_name); if ( !(retval = (SFreqRatios*) malloc(sizeof(SFreqRatios)))) { return NULL; } retval->data = (double**) _PSIAllocateMatrix(BLASTAA_SIZE, BLASTAA_SIZE, sizeof(double)); if ( !retval->data ) { return _PSIMatrixFrequencyRatiosFree(retval); } if ( !strcmp(matrix_name, "BLOSUM62") || !strcmp(matrix_name, "BLOSUM62_20")) { for (i = 0; i < BLASTAA_SIZE; i++) { for (j = 0; j < BLASTAA_SIZE; j++) { retval->data[i][j] = BLOSUM62_FREQRATIOS[i][j]; } } retval->bit_scale_factor = 2; } else if ( !strcmp(matrix_name, "BLOSUM62_20A")) { for (i = 0; i < BLASTAA_SIZE; i++) { for (j = 0; j < BLASTAA_SIZE; j++) { retval->data[i][j] = BLOSUM62_20A_SCALE_MULTIPLIER * BLOSUM62_FREQRATIOS[i][j]; } } retval->bit_scale_factor = 2; } else if ( !strcmp(matrix_name, "BLOSUM62_20B")) { for (i = 0; i < BLASTAA_SIZE; i++) { for (j = 0; j < BLASTAA_SIZE; j++) { retval->data[i][j] = BLOSUM62_20B_SCALE_MULTIPLIER * BLOSUM62_FREQRATIOS[i][j]; } } retval->bit_scale_factor = 2; } else if ( !strcmp(matrix_name, "BLOSUM45") ) { for (i = 0; i < BLASTAA_SIZE; i++) { for (j = 0; j < BLASTAA_SIZE; j++) { retval->data[i][j] = BLOSUM45_FREQRATIOS[i][j]; } } retval->bit_scale_factor = 3; } else if ( !strcmp(matrix_name, "BLOSUM80") ) { for (i = 0; i < BLASTAA_SIZE; i++) { for (j = 0; j < BLASTAA_SIZE; j++) { retval->data[i][j] = BLOSUM80_FREQRATIOS[i][j]; } } retval->bit_scale_factor = 2; } else if ( !strcmp(matrix_name, "BLOSUM50") ) { for (i = 0; i < BLASTAA_SIZE; i++) { for (j = 0; j < BLASTAA_SIZE; j++) { retval->data[i][j] = BLOSUM50_FREQRATIOS[i][j]; } } retval->bit_scale_factor = 2; } else if ( !strcmp(matrix_name, "BLOSUM90") ) { for (i = 0; i < BLASTAA_SIZE; i++) { for (j = 0; j < BLASTAA_SIZE; j++) { retval->data[i][j] = BLOSUM90_FREQRATIOS[i][j]; } } retval->bit_scale_factor = 2; } else if ( !strcmp(matrix_name, "PAM30") ) { for (i = 0; i < BLASTAA_SIZE; i++) { for (j = 0; j < BLASTAA_SIZE; j++) { retval->data[i][j] = PAM30_FREQRATIOS[i][j]; } } retval->bit_scale_factor = 2; } else if ( !strcmp(matrix_name, "PAM70") ) { for (i = 0; i < BLASTAA_SIZE; i++) { for (j = 0; j < BLASTAA_SIZE; j++) { retval->data[i][j] = PAM70_FREQRATIOS[i][j]; } } retval->bit_scale_factor = 2; } else if ( !strcmp(matrix_name, "PAM250") ) { for (i = 0; i < BLASTAA_SIZE; i++) { for (j = 0; j < BLASTAA_SIZE; j++) { retval->data[i][j] = PAM250_FREQRATIOS[i][j]; } } retval->bit_scale_factor = 2; } else { retval = _PSIMatrixFrequencyRatiosFree(retval); } return retval;}SFreqRatios*_PSIMatrixFrequencyRatiosFree(SFreqRatios* freq_ratios){ if ( !freq_ratios ) return NULL; if (freq_ratios->data) { _PSIDeallocateMatrix((void**) freq_ratios->data, BLASTAA_SIZE); } sfree(freq_ratios); return NULL;}/* * =========================================================================== * * $Log: matrix_freq_ratios.c,v $ * Revision 1000.0 2004/06/01 18:13:58 gouriano * PRODUCTION: IMPORTED [GCC34_MSVC7] Dev-tree R1.2 * * Revision 1.2 2004/05/13 14:56:05 camacho * Fix for retrieving frequency ratios matrices * * Revision 1.1 2004/05/06 15:26:54 camacho * Initial revision * * * =========================================================================== */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -