source: branches/items/GDE/MAFFT/mafft-7.055-with-extensions/core/dndpre_score.c

Last change on this file was 10371, checked in by aboeckma, 11 years ago

updated mafft version. Added extensions (no svn ignore, yet)

File size: 944 bytes
Line 
1#include "mltaln.h"
2
3#define TEST 0
4
5int main()
6{
7        int i, j;
8        char **seq;
9        static char name[M][B];
10        static int nlen[M];
11        double **mtx;
12        FILE *fp;
13        int res;
14
15        scoremtx = NOTSPECIFIED;
16
17#if 0
18        PreRead( stdin, &njob, &nlenmax );
19#else
20        getnumlen( stdin );
21#endif
22        rewind( stdin );
23
24        seq = AllocateCharMtx( njob, nlenmax+1 );
25        mtx = AllocateDoubleMtx( njob, njob );
26
27#if 0
28        FRead( stdin, name, nlen, seq );
29#else
30        readData( stdin, name, nlen, seq );
31#endif
32
33        for( i=0; i<njob-1; i++ ) 
34        {
35                fprintf( stderr, "%4d/%4d\r", i+1, njob );
36                for( j=i+1; j<njob; j++ ) 
37                        mtx[i][j] = (double)substitution_score( seq[i], seq[j] );
38        }
39       
40#if TEST
41        for( i=0; i<njob-1; i++ ) for( j=i+1; j<njob; j++ ) 
42                fprintf( stdout, "i=%d, j=%d, mtx[][] = %f\n", i, j, mtx[i][j] );
43#endif
44
45        fp = fopen( "hat2", "w" );
46        WriteHat2( fp, njob, name, mtx );
47        fclose( fp );
48        exit( 0 );
49/*
50        res = system( ALNDIR "/spgsdl < hat2"  );
51        if( res ) exit( 1 );
52        else exit( 0 );
53*/
54}
Note: See TracBrowser for help on using the repository browser.