-static float singleribosumscore( int n1, int n2, char **s1, char **s2, double *eff1, double *eff2, int p1, int p2 )
+#if 0
+static double singleribosumscore( int n1, int n2, char **s1, char **s2, double *eff1, double *eff2, int p1, int p2 )
{
- float val;
+ double val;
int i, j;
int code1, code2;
code2 = amino_n[(int)s2[j][p2]];
if( code2 > 3 ) code2 = 36;
-// fprintf( stderr, "'l'%c-%c: %f\n", s1[i][p1], s2[j][p2], (float)ribosumdis[code1][code2] );
+// fprintf( stderr, "'l'%c-%c: %f\n", s1[i][p1], s2[j][p2], (double)ribosumdis[code1][code2] );
- val += (float)ribosumdis[code1][code2] * eff1[i] * eff2[j];
+ val += (double)ribosumdis[code1][code2] * eff1[i] * eff2[j];
}
return( val );
}
-static float pairedribosumscore53( int n1, int n2, char **s1, char **s2, double *eff1, double *eff2, int p1, int p2, int c1, int c2 )
+static double pairedribosumscore53( int n1, int n2, char **s1, char **s2, double *eff1, double *eff2, int p1, int p2, int c1, int c2 )
{
- float val;
+ double val;
int i, j;
int code1o, code1u, code2o, code2u, code1, code2;
else code2 = 4 + code2o * 4 + code2u;
-// fprintf( stderr, "%c%c-%c%c: %f\n", s1[i][p1], s1[i][c1], s2[j][p2], s2[j][c2], (float)ribosumdis[code1][code2] );
+// fprintf( stderr, "%c%c-%c%c: %f\n", s1[i][p1], s1[i][c1], s2[j][p2], s2[j][c2], (double)ribosumdis[code1][code2] );
if( code1 == 36 || code2 == 36 )
- val += (float)n_dis[code1o][code2o] * eff1[i] * eff2[j];
+ val += (double)n_dis[code1o][code2o] * eff1[i] * eff2[j];
else
- val += (float)ribosumdis[code1][code2] * eff1[i] * eff2[j];
+ val += (double)ribosumdis[code1][code2] * eff1[i] * eff2[j];
}
return( val );
}
-static float pairedribosumscore35( int n1, int n2, char **s1, char **s2, double *eff1, double *eff2, int p1, int p2, int c1, int c2 )
+static double pairedribosumscore35( int n1, int n2, char **s1, char **s2, double *eff1, double *eff2, int p1, int p2, int c1, int c2 )
{
- float val;
+ double val;
int i, j;
int code1o, code1u, code2o, code2u, code1, code2;
else code2 = 4 + code2u * 4 + code2o;
-// fprintf( stderr, "%c%c-%c%c: %f\n", s1[i][p1], s1[i][c1], s2[j][p2], s2[j][c2], (float)ribosumdis[code1][code2] );
+// fprintf( stderr, "%c%c-%c%c: %f\n", s1[i][p1], s1[i][c1], s2[j][p2], s2[j][c2], (double)ribosumdis[code1][code2] );
if( code1 == 36 || code2 == 36 )
- val += (float)n_dis[code1o][code2o] * eff1[i] * eff2[j];
+ val += (double)n_dis[code1o][code2o] * eff1[i] * eff2[j];
else
- val += (float)ribosumdis[code1][code2] * eff1[i] * eff2[j];
+ val += (double)ribosumdis[code1][code2] * eff1[i] * eff2[j];
}
return( val );
}
+#endif
static void mccaskillextract( char **seq, char **nogap, int nseq, RNApair **pairprob, RNApair ***single, int **sgapmap, double *eff )
int nogaplgth;
int i, j;
int left, right, adpos;
- float prob;
+ double prob;
static TLS int *pairnum;
RNApair *pt, *pt2;
{
if( pairprob[i][j].bestpos > -1 )
{
-// pairprob[i][j].bestscore /= (float)nseq;
+// pairprob[i][j].bestscore /= (double)nseq;
// fprintf( stderr, "pair of %d = %d (%f) %c:%c\n", i, pairprob[i][j].bestpos, pairprob[i][j].bestscore, seq[0][i], seq[0][pairprob[i][j].bestpos] );
}
}
char gett[1000];
FILE *fp;
int left, right, dumm;
- float prob;
+ double prob;
static TLS int pid;
static TLS char fnamein[100];
static TLS char cmd[1000];
if( gett[0] == ',' ) break;
if( gett[0] != ' ' ) continue;
- sscanf( gett, "%d %d %d %f", &left, &right, &dumm, &prob );
+ sscanf( gett, "%d %d %d %lf", &left, &right, &dumm, &prob );
left--;
right--;
}
-void foldrna( int nseq1, int nseq2, char **seq1, char **seq2, double *eff1, double *eff2, RNApair ***grouprna1, RNApair ***grouprna2, float **impmtx, int *gapmap1, int *gapmap2, RNApair *additionalpair )
+void foldrna( int nseq1, int nseq2, char **seq1, char **seq2, double *eff1, double *eff2, RNApair ***grouprna1, RNApair ***grouprna2, double **impmtx, int *gapmap1, int *gapmap2, RNApair *additionalpair )
{
int i, j;
// int ui, uj;
static TLS RNApair *pairpt1, *pairpt2;
int lgth1 = strlen( seq1[0] );
int lgth2 = strlen( seq2[0] );
- static TLS float **impmtx2;
- static TLS float **map;
+ static TLS double **impmtx2;
+ static TLS double **map;
// double lenfac;
- float prob;
+ double prob;
int **sgapmap1, **sgapmap2;
- char *nogapdum;
- float **tbppmtx;
+// char *nogapdum;
+ double **tbppmtx;
// fprintf( stderr, "nseq1=%d, lgth1=%d\n", nseq1, lgth1 );
odir2 = AllocateCharVec( lgth2+10 );
sgapmap1 = AllocateIntMtx( nseq1, lgth1+1 );
sgapmap2 = AllocateIntMtx( nseq2, lgth2+1 );
- nogapdum = AllocateCharVec( MAX( lgth1, lgth2 ) );
+// nogapdum = AllocateCharVec( MAX( lgth1, lgth2 ) );
pairprob1 = (RNApair **)calloc( lgth1, sizeof( RNApair *) );
pairprob2 = (RNApair **)calloc( lgth2, sizeof( RNApair *) );
map = AllocateFloatMtx( lgth1, lgth2 );
}
else if( RNAscoremtx == 'r' )
{
- for( i=0; i<lgth1; i++ ) for( j=0; j<lgth2; j++ )
- {
- tbppmtx[i][j] = 1.0;
- impmtx2[i][j] = 0.0;
- }
- for( i=0; i<lgth1; i++ ) for( pairpt1=pairprob1[i]; pairpt1->bestpos!=-1; pairpt1++ )
- {
- for( j=0; j<lgth2; j++ ) for( pairpt2=pairprob2[j]; pairpt2->bestpos!=-1; pairpt2++ )
- {
- uido = pairpt1->bestpos;
- ujdo = pairpt2->bestpos;
- prob = pairpt1->bestscore * pairpt2->bestscore;
- if( uido > -1 && ujdo > -1 )
- {
- if( uido > i && j > ujdo )
- {
- impmtx2[i][j] += prob * pairedribosumscore53( nseq1, nseq2, oseq1, oseq2, eff1, eff2, i, j, uido, ujdo ) * consweight_multi;
- tbppmtx[i][j] -= prob;
- }
- else if( i < uido && j < ujdo )
- {
- impmtx2[i][j] += prob * pairedribosumscore35( nseq1, nseq2, oseq1, oseq2, eff1, eff2, i, j, uido, ujdo ) * consweight_multi;
- tbppmtx[i][j] -= prob;
- }
- }
- }
- }
-
-
- for( i=0; i<lgth1; i++ )
- {
- for( j=0; j<lgth2; j++ )
- {
- impmtx2[i][j] += tbppmtx[i][j] * singleribosumscore( nseq1, nseq2, oseq1, oseq2, eff1, eff2, i, j ) * consweight_multi;
- }
- }
+ fprintf( stderr, "Unexpected error. Please contact kazutaka.katoh@aist.go.jp\n" );
}