~ubuntu-branches/debian/sid/mafft/sid

« back to all changes in this revision

Viewing changes to core/mltaln9.c

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Tille
  • Date: 2011-03-12 00:02:43 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20110312000243-1yx6ho40e2kf9nxw
Tags: 6.850-1
* New upstream version
* Adapted patch to new upstream
* Debhelper 8 (control + compat)
* debian/rules: Switch to dh
* debian/links: override broken symlinks created in Makefile

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
 
53
53
                                fprintf( stderr, "========================================================================= \n" );
54
54
                                fprintf( stderr, "========================================================================= \n" );
55
 
                                fprintf( stderr, "========================================================================= \n" );
56
55
                                fprintf( stderr, "=== \n" );
57
56
                                fprintf( stderr, "=== Alphabet '%c' is unknown.\n", (*seq)[i] );
58
57
                                fprintf( stderr, "=== Please check site %d in sequence %d.\n", i+1, (int)(seq-seqbk+1) );
59
58
                                fprintf( stderr, "=== \n" );
60
 
                                fprintf( stderr, "========================================================================= \n" );
 
59
                                fprintf( stderr, "=== To make an alignment having unusual characters (U, @, #, etc), try\n" );
 
60
                                fprintf( stderr, "=== %% mafft --anysymbol input > output\n" );
 
61
                                fprintf( stderr, "=== \n" );
61
62
                                fprintf( stderr, "========================================================================= \n" );
62
63
                                fprintf( stderr, "========================================================================= \n" );
63
64
                                return( (int)(*seq)[i] );
1412
1413
        float *mindisfrom = NULL; // by D.Mathog, a guess
1413
1414
        static char **tree;
1414
1415
        static char *treetmp;
1415
 
        static char *nametmp;
 
1416
        static char *nametmp, *nameptr, *tmpptr;
1416
1417
        FILE *fp;
1417
1418
        float (*clusterfuncpt[1])(float,float);
1418
1419
 
1439
1440
                nmemar = AllocateIntVec( njob );
1440
1441
                mindisfrom = AllocateFloatVec( njob );
1441
1442
                nearest = AllocateIntVec( njob );
1442
 
                treetmp = AllocateCharVec( njob*50 );
 
1443
                treetmp = AllocateCharVec( njob*150 );
1443
1444
                nametmp = AllocateCharVec( 130 );
1444
 
                tree = AllocateCharMtx( njob, njob*50 );
 
1445
                tree = AllocateCharMtx( njob, njob*150 );
1445
1446
        }
1446
1447
 
1447
1448
        
1450
1451
                for( j=0; j<130; j++ ) nametmp[j] = 0;
1451
1452
                for( j=0; j<130; j++ ) 
1452
1453
                {
1453
 
                        if( isalnum( name[i][j] ) )
 
1454
                        if( name[i][j] == 0 )
 
1455
                                break;
 
1456
                        else if( isalnum( name[i][j] ) )
1454
1457
                                nametmp[j] = name[i][j];
1455
1458
                        else
1456
1459
                                nametmp[j] = '_';
1458
1461
                nametmp[129] = 0;
1459
1462
//              sprintf( tree[i], "%d_l=%d_%.20s", i+1, nlen[i], nametmp+1 );
1460
1463
                if( outnumber )
1461
 
                        sprintf( tree[i], "%d_%.20s", i+1, strstr( nametmp, "_numo_e" ) + 8 );
 
1464
                        nameptr = strstr( nametmp, "_numo_e" ) + 8;
1462
1465
                else
1463
 
                        sprintf( tree[i], "%d_%.20s", i+1, nametmp+1 );
 
1466
                        nameptr = nametmp + 1;
 
1467
 
 
1468
                if( (tmpptr=strstr( nameptr, "_oripos__" )) ) nameptr = tmpptr + 9; // = -> _ no tame
 
1469
 
 
1470
                sprintf( tree[i], "%d_%.60s", i+1, nameptr );
1464
1471
        }
1465
1472
        for( i=0; i<nseq; i++ )
1466
1473
        {
1701
1708
        double *mindisfrom = NULL; // by D.Mathog, a guess
1702
1709
        static char **tree;
1703
1710
        static char *treetmp;
1704
 
        static char *nametmp;
 
1711
        static char *nametmp, *nameptr, *tmpptr;
1705
1712
        FILE *fp;
1706
1713
        double (*clusterfuncpt[1])(double,double);
1707
1714
 
1728
1735
                nmemar = AllocateIntVec( njob );
1729
1736
                mindisfrom = AllocateDoubleVec( njob );
1730
1737
                nearest = AllocateIntVec( njob );
1731
 
                treetmp = AllocateCharVec( njob*50 );
1732
 
                nametmp = AllocateCharVec( 31 );
1733
 
                tree = AllocateCharMtx( njob, njob*50 );
 
1738
                treetmp = AllocateCharVec( njob*150 );
 
1739
                nametmp = AllocateCharVec( 91 );
 
1740
                tree = AllocateCharMtx( njob, njob*150 );
1734
1741
        }
1735
1742
 
1736
1743
        
1737
1744
    for( i=0; i<nseq; i++ )
1738
1745
        {
1739
 
                for( j=0; j<30; j++ ) nametmp[j] = 0;
1740
 
                for( j=0; j<30; j++ ) 
 
1746
                for( j=0; j<90; j++ ) nametmp[j] = 0;
 
1747
                for( j=0; j<90; j++ ) 
1741
1748
                {
1742
 
                        if( isalnum( name[i][j] ) )
 
1749
                        if( name[i][j] == 0 )
 
1750
                                break;
 
1751
                        else if( isalnum( name[i][j] ) )
1743
1752
                                nametmp[j] = name[i][j];
1744
1753
                        else
1745
1754
                                nametmp[j] = '_';
1746
1755
                }
1747
 
                nametmp[30] = 0;
1748
 
//              sprintf( tree[i], "%d_l=%d_%.20s", i+1, nlen[i], nametmp+1 );
1749
 
                sprintf( tree[i], "%d_%.20s", i+1, nametmp+1 );
 
1756
                nametmp[90] = 0;
 
1757
//              sprintf( tree[i], "%d_%.60s", i+1, nametmp+1 );
 
1758
                if( outnumber )
 
1759
                        nameptr = strstr( nametmp, "_numo_e" ) + 8;
 
1760
                else
 
1761
                        nameptr = nametmp + 1;
 
1762
 
 
1763
                if( (tmpptr=strstr( nameptr, "_oripos__" )) ) nameptr = tmpptr + 9; // = -> _ no tame
 
1764
 
 
1765
                sprintf( tree[i], "%d_%.60s", i+1, nameptr );
1750
1766
        }
1751
1767
        for( i=0; i<nseq; i++ )
1752
1768
        {
7257
7273
        {
7258
7274
                v += (double)naivepairscore11( s[i], s[j], penalty );
7259
7275
        }
 
7276
 
 
7277
        fprintf( stderr, "penalty = %d\n", penalty );
 
7278
 
7260
7279
        return( v );
7261
7280
}
7262
7281