~ubuntu-branches/ubuntu/edgy/ncbi-tools6/edgy

« back to all changes in this revision

Viewing changes to tools/pseed3.c

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese
  • Date: 2006-07-19 23:28:07 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060719232807-et3cdmcjgmnyleyx
Tags: 6.1.20060507-3ubuntu1
Re-merge with Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
static char const rcsid[] = "$Id: pseed3.c,v 6.45 2005/07/28 14:57:10 coulouri Exp $";
 
1
static char const rcsid[] = "$Id: pseed3.c,v 6.47 2006/03/10 15:22:30 papadopo Exp $";
2
2
 
3
 
/* $Id: pseed3.c,v 6.45 2005/07/28 14:57:10 coulouri Exp $ */
 
3
/* $Id: pseed3.c,v 6.47 2006/03/10 15:22:30 papadopo Exp $ */
4
4
/**************************************************************************
5
5
*                                                                         *
6
6
*                             COPYRIGHT NOTICE                            *
35
35
 
36
36
Contents: high-level routines for PHI-BLAST and pseed3
37
37
 
38
 
$Revision: 6.45 $
 
38
$Revision: 6.47 $
39
39
 
40
40
$Log: pseed3.c,v $
 
41
Revision 6.47  2006/03/10 15:22:30  papadopo
 
42
when reading multi-line PHI patterns, strip trailing newlines from each line
 
43
 
 
44
Revision 6.46  2006/03/01 13:44:28  coulouri
 
45
From Alejandro Schaffer: handle patterns in a case-insensitive fashion. Fixes rt#15144173
 
46
 
41
47
Revision 6.45  2005/07/28 14:57:10  coulouri
42
48
remove dead code
43
49
 
1438
1444
    Char line[BUF_SIZE];  /*Line read in from the file*/
1439
1445
    Char *name;  /*name of pattern, if there is a name*/
1440
1446
    Char  *rp;   /*pattern string read in from file*/
 
1447
    Int4 length; /*length of pattern string*/
 
1448
    Int4 i; /*loop index*/
1441
1449
 
1442
1450
    name = NULL; 
1443
1451
    stringForPattern[0] = '\0';
1455
1463
        }
1456
1464
        /*recognize pattern content by line starting 'PA'*/
1457
1465
        if (line[0] == 'P' && line[1] == 'A') {
 
1466
 
 
1467
          /* remove newlines */
 
1468
          rp = strchr(line, '\n');
 
1469
          if (rp)
 
1470
            *rp = NULLB;
 
1471
 
1458
1472
          /*skip over spaces*/
1459
1473
          for (rp = &line[2]; *rp == ' '; rp++);
1460
1474
          /*copy rest of pattern to return parameter stringForPattern*/
1461
1475
          strcat(stringForPattern, rp);
1462
1476
          while (FileGets(line, BUF_SIZE, fp)) {
1463
1477
            if (line[0] == 'P' && line[1] == 'A') {
1464
 
              for (rp = &line[2]; *rp == ' '; rp++);
 
1478
 
 
1479
              /* remove newlines */
 
1480
              rp = strchr(line, '\n');
 
1481
              if (rp)
 
1482
                *rp = NULLB;
 
1483
 
 
1484
              for (rp = &line[2]; *rp == ' '; rp++)
 
1485
                ;
1465
1486
              strcat(stringForPattern, rp); 
1466
1487
            } 
1467
1488
            else {
1475
1496
              } */
1476
1497
            }
1477
1498
          }
 
1499
          length = strlen(stringForPattern);
 
1500
          for(i = 0; i < length; i++)
 
1501
            if ('x' !=  stringForPattern[i])
 
1502
              stringForPattern[i] = toupper(stringForPattern[i]);
1478
1503
          if (name) {
1479
1504
            return 1;
1480
1505
          }