Bioplib
Protein Structure C Library
 All Data Structures Files Functions Variables Typedefs Macros Pages
NumericAlign.c
Go to the documentation of this file.
1 /************************************************************************/
2 /**
3 
4  \file NumericAlign.c
5 
6  \version V1.3
7  \date 07.07.14
8  \brief Perform Needleman & Wunsch sequence alignment on two
9  sequences encoded as numeric symbols.
10 
11  \copyright (c) UCL / Dr. Andrew C. R. Martin / University of Reading 1993-2014
12  \author Dr. Andrew C. R. Martin
13  \par
14  Institute of Structural & Molecular Biology,
15  University College London,
16  Gower Street,
17  London.
18  WC1E 6BT.
19  \par
20  andrew@bioinf.org.uk
21  andrew.martin@ucl.ac.uk
22 
23 **************************************************************************
24 
25  This code is NOT IN THE PUBLIC DOMAIN, but it may be copied
26  according to the conditions laid out in the accompanying file
27  COPYING.DOC.
28 
29  The code may be modified as required, but any modifications must be
30  documented so that the person responsible can be identified.
31 
32  The code may not be sold commercially or included as part of a
33  commercial product except as described in the file COPYING.DOC.
34 
35 **************************************************************************
36 
37  Note, the code herein is very heavily based on code written by Dr.
38  Andrew C.R. Martin while self-employed. Some modifications were made to
39  that original code while employed at University College London. This
40  version which handles sequences encoded as arrays of numbers rather
41  than as character arrays was modified from the original version(s)
42  while employed at Reading University.
43 
44  Description:
45  ============
46 
47  A simple Needleman & Wunsch Dynamic Programming alignment of 2
48  sequences encoded as numeric symbols.
49  A window is not used so the routine may be a bit slow on long
50  sequences.
51 
52 **************************************************************************
53 
54  Usage:
55  ======
56 
57  First call NumericReadMDM() to read the mutation data matrix, then call
58  NumericAffineAlign() to align the sequences.
59 
60 **************************************************************************
61 
62  Revision History:
63  =================
64 - V1.0 08.03.00 A modified version of align.c V2.12 written by ACRM
65  from 19.06.90 to 06.03.00
66 - V1.1 28.09.00 Fixed bug at end of alignment if one sequence finishes
67  first
68 - V1.2 06.02.03 Fixed for new version of GetWord()
69 - V1.3 07.07.14 Use bl prefix for functions By: CTP
70 
71 
72 *************************************************************************/
73 /* Doxygen
74  -------
75  #GROUP Handling Sequence Data
76  #SUBGROUP Alignment
77  #FUNCTION blNumericReadMDM()
78  Read mutation data matrix into static global arrays for number-encoded
79  sequences
80 
81  #FUNCTION blNumericCalcMDMScore()
82  Calculate score from static globally stored mutation data matrix for
83  number-encoded sequences
84 
85  #FUNCTION blNumericAffineAlign()
86  Perform simple N&W alignment using sequences encodede as arrays of
87  numeric tokens
88 */
89 /************************************************************************/
90 /* Includes
91 */
92 #include <stdio.h>
93 #include <stdlib.h>
94 #include <string.h>
95 #include <ctype.h>
96 
97 #include "SysDefs.h"
98 #include "macros.h"
99 #include "array.h"
100 #include "general.h"
101 #include "seq.h"
102 
103 /************************************************************************/
104 /* Defines and macros
105 */
106 #ifndef MAX
107 #define MAX(a,b) ((a) > (b) ? (a) : (b))
108 #endif
109 
110 #define DATAENV "DATADIR" /* Environment variable or assign */
111 
112 #define MAXBUFF 2048
113 
114 /* Type definition to store a X,Y coordinate pair in the matrix */
115 typedef struct
116 {
117  int x, y;
118 } XY;
119 
120 
121 /************************************************************************/
122 /* Globals
123 */
124 static int **sMDMScore;
125 static int sMDMSize = 0;
126 
127 /************************************************************************/
128 /*
129 BOOL NumericReadMDM(char *mdmfile);
130 int NumericCalcMDMScore(int resa, int resb);
131 int NumericAffineAlign(int *seq1,
132  int length1,
133  int *seq2,
134  int length2,
135  BOOL verbose,
136  BOOL identity,
137  int penalty,
138  int penext,
139  int *align1,
140  int *align2,
141  int *align_len);
142 */
143 
144 /************************************************************************/
145 /* Prototypes
146 */
147 static int NumericSearchForBest(int **matrix, int length1, int length2,
148  int *BestI, int *BestJ, int *seq1, int *seq2,
149  int *align1, int *align2);
150 static int NumericTraceBack(int **matrix, XY **dirn, int length1,
151  int length2, int *seq1, int *seq2,
152  int *align1, int *align2,
153  int *align_len);
154 
155 
156 
157 /************************************************************************/
158 /*>static int NumericSearchForBest(int **matrix, int length1,
159  int length2, int *BestI, int *BestJ,
160  int *seq1, int *seq2, int *align1,
161  int *align2)
162  ----------------------------------------------------------------
163 *//**
164  \param[in] **matrix N&W matrix
165  \param[in] length1 Length of first sequence
166  \param[in] length2 Length of second sequence
167  \param[in] *BestI x position of highest score
168  \param[in] *BestJ y position of highest score
169  \param[in] *seq1 First sequence
170  \param[in] *seq2 Second sequence
171  \param[out] *align1 First sequence with end aligned correctly
172  \param[out] *align2 Second sequence with end aligned correctly
173  \return Alignment length thus far
174 
175  Searches the outside of the matrix for the best score and starts the
176  alignment by putting in any starting 0s as insertion symbols.
177 
178  Identical to align.c/SearchForBest(), but uses int arrays rather than
179  characters
180 
181 - 08.03.00 Original based on align.c/SearchForBest() 08.10.92 By: ACRM
182 */
183 static int NumericSearchForBest(int **matrix,
184  int length1,
185  int length2,
186  int *BestI,
187  int *BestJ,
188  int *seq1,
189  int *seq2,
190  int *align1,
191  int *align2)
192 {
193  int ai,
194  besti, bestj,
195  i, j;
196 
197  /* Now search the outside of the matrix for the highest scoring cell */
198  ai = 0;
199  besti = 0;
200  for(i = 1; i < length1; i++)
201  {
202  if(matrix[i][0] > matrix[besti][0]) besti = i;
203  }
204  bestj = 0;
205  for(j = 1; j < length2; j++)
206  {
207  if(matrix[0][j] > matrix[0][bestj]) bestj = j;
208  }
209  if(matrix[besti][0] > matrix[0][bestj])
210  {
211  *BestI = besti;
212  *BestJ = 0;
213  for(i=0; i<*BestI; i++)
214  {
215  align1[ai] = seq1[i];
216  align2[ai++] = 0;
217  }
218  }
219  else
220  {
221  *BestI = 0;
222  *BestJ = bestj;
223  for(j=0; j<*BestJ; j++)
224  {
225  align1[ai] = 0;
226  align2[ai++] = seq2[j];
227  }
228  }
229  return(ai);
230 }
231 
232 
233 
234 
235 /************************************************************************/
236 /*>BOOL blNumericReadMDM(char *mdmfile)
237  ------------------------------------
238 *//**
239 
240  \param[in] *mdmfile Mutation data matrix filename
241  \return Success?
242 
243  Read mutation data matrix into static global arrays. The matrix may
244  have comments at the start introduced with a ! in the first column.
245  The matrix must be complete (i.e. a triangular matrix will not
246  work). A line describing the residue types must appear, and may
247  be placed before or after the matrix itself
248 
249  Identical to align.c/ReadMDM() but reads into a different static
250  2D array and doesn't read a symbol identifier line from the file
251  as the symbols are numeric and always start from 1 (0 is used as
252  the insert character)
253 
254 - 08.03.00 Original based on align.c/ReadMDM() 26.07.95 By: ACRM
255 - 06.02.03 Fixed for new version of GetWord()
256 - 07.07.14 Use bl prefix for functions By: CTP
257 */
258 BOOL blNumericReadMDM(char *mdmfile)
259 {
260  FILE *mdm = NULL;
261  int i, j;
262  char buffer[MAXBUFF],
263  word[16],
264  *p;
265  BOOL noenv;
266 
267  if((mdm=blOpenFile(mdmfile, DATAENV, "r", &noenv))==NULL)
268  {
269  return(FALSE);
270  }
271 
272  /* Read over any comment lines */
273  while(fgets(buffer,MAXBUFF,mdm))
274  {
275  TERMINATE(buffer);
276  KILLLEADSPACES(p,buffer);
277  if(strlen(p) && p[0] != '!')
278  break;
279  }
280 
281  /* See how many fields there are in the buffer */
282  for(p = buffer, sMDMSize = 0; p!=NULL; sMDMSize++)
283  p = blGetWord(p, word, 16);
284 
285 
286  /* Allocate memory for the MDM and the AA List */
287  if((sMDMScore = (int **)blArray2D(sizeof(int),sMDMSize,sMDMSize))==NULL)
288  return(FALSE);
289 
290  /* Fill the matrix with zeros */
291  for(i=0; i<sMDMSize; i++)
292  {
293  for(j=0; j<sMDMSize; j++)
294  {
295  sMDMScore[i][j] = 0;
296  }
297  }
298 
299  i=0;
300  do
301  {
302  TERMINATE(buffer);
303  KILLLEADSPACES(p, buffer);
304  if(strlen(p))
305  {
306  blGetWord(buffer, word, 16);
307  if(sscanf(word,"%d",&j)) /* A row of numbers */
308  {
309  for(p = buffer, j = 0; p!=NULL && j<sMDMSize; j++)
310  {
311  p = blGetWord(p, word, 16);
312  sscanf(word,"%d",&(sMDMScore[i][j]));
313  }
314  i++;
315  }
316  }
317  } while(fgets(buffer,MAXBUFF,mdm));
318 
319  fclose(mdm);
320 
321  return(TRUE);
322 }
323 
324 /************************************************************************/
325 /*>int blNumericCalcMDMScore(int resa, int resb)
326  ---------------------------------------------
327 *//**
328 
329  \param[in] resa First token
330  \param[in] resb Second token
331  \return score
332 
333  Calculate score from static globally stored mutation data matrix
334 
335  Identical to align.c/CalcMDMScore(), but uses a different static score
336  array and takes integer parameters. These are used as direct lookups
337  into the score array rather than being searched.
338 
339 - 08.03.00 Original based on align.c/CalcMDMScore() 11.07.96 By: ACRM
340 - 07.07.14 Use bl prefix for functions By: CTP
341 */
342 int blNumericCalcMDMScore(int resa, int resb)
343 {
344  int i,j;
345  static int NWarn = 0;
346  BOOL Warned = FALSE;
347 
348  i = resa-1;
349  j = resb-1;
350 
351  if(i>=sMDMSize)
352  {
353  if(NWarn < 10)
354  printf("Token %d not found in matrix\n",resa);
355  else if(NWarn == 10)
356  printf("More token not found in matrix...\n");
357  Warned = TRUE;
358  }
359  if(j>=sMDMSize)
360  {
361  if(NWarn < 10)
362  printf("Token %d not found in matrix\n",resb);
363  else if(NWarn == 10)
364  printf("More tokens not found in matrix...\n");
365  Warned = TRUE;
366  }
367 
368  if(Warned)
369  {
370  NWarn++;
371  return(0);
372  }
373 
374  return(sMDMScore[i][j]);
375 }
376 
377 /************************************************************************/
378 /*>int blNumericAffineAlign(int *seq1, int length1, int *seq2, int length2,
379  BOOL verbose, BOOL identity, int penalty,
380  int penext, int *align1, int *align2,
381  int *align_len)
382  ---------------------------------------------------------------------
383 *//**
384  \param[in] *seq1 First sequence of tokens
385  \param[in] length1 First sequence length
386  \param[in] *seq2 Second sequence of tokens
387  \param[in] length2 Second sequence length
388  \param[in] verbose Display N&W matrix
389  \param[in] identity Use identity matrix
390  \param[in] penalty Gap insertion penalty value
391  \param[in] penext Extension penalty
392  \param[out] *align1 Sequence 1 aligned
393  \param[out] *align2 Sequence 2 aligned
394  \param[out] *align_len Alignment length
395  \return Alignment score (0 on error)
396 
397  Perform simple N&W alignment of seq1 and seq2. No window is used, so
398  will be slow for long sequences.
399 
400  The sequences come as integer arrays containing numeric tokens
401 
402  Note that you must allocate sufficient memory for the aligned
403  sequences.
404  The easy way to do this is to ensure that align1 and align2 are
405  of length (length1+length2).
406 
407  Identical to align.c/affinealign(), but uses integer arrays
408 
409 - 08.03.00 Original based on align.c/affinealign() 06.03.00 By: ACRM
410 - 07.07.14 Use bl prefix for functions By: CTP
411 */
412 int blNumericAffineAlign(int *seq1,
413  int length1,
414  int *seq2,
415  int length2,
416  BOOL verbose,
417  BOOL identity,
418  int penalty,
419  int penext,
420  int *align1,
421  int *align2,
422  int *align_len)
423 {
424  XY **dirn = NULL;
425  int **matrix = NULL,
426  maxdim,
427  i, j, k, l,
428  i1, j1,
429  dia, right, down,
430  rcell, dcell, maxoff,
431  match = 1,
432  thisscore,
433  gapext,
434  score;
435 
436  maxdim = MAX(length1, length2);
437 
438  /* Initialise the score matrix */
439  if((matrix = (int **)blArray2D(sizeof(int), maxdim, maxdim))==NULL)
440  return(0);
441  if((dirn = (XY **)blArray2D(sizeof(XY), maxdim, maxdim))==NULL)
442  return(0);
443 
444  for(i=0;i<maxdim;i++)
445  {
446  for(j=0;j<maxdim;j++)
447  {
448  matrix[i][j] = 0;
449  dirn[i][j].x = -1;
450  dirn[i][j].y = -1;
451  }
452  }
453 
454  /* Fill in scores up the right hand side of the matrix */
455  for(j=0; j<length2; j++)
456  {
457  if(identity)
458  {
459  if(seq1[length1-1] == seq2[j]) matrix[length1-1][j] = match;
460  }
461  else
462  {
463  matrix[length1-1][j] = blNumericCalcMDMScore(seq1[length1-1],
464  seq2[j]);
465  }
466  }
467 
468  /* Fill in scores along the bottom row of the matrix */
469  for(i=0; i<length1; i++)
470  {
471  if(identity)
472  {
473  if(seq1[i] == seq2[length2-1]) matrix[i][length2-1] = match;
474  }
475  else
476  {
477  matrix[i][length2-1] = blNumericCalcMDMScore(seq1[i],
478  seq2[length2-1]);
479  }
480  }
481 
482  i = length1 - 1;
483  j = length2 - 1;
484 
485  /* Move back along the diagonal */
486  while(i > 0 && j > 0)
487  {
488  i--;
489  j--;
490 
491  /* Fill in the scores along this row */
492  for(i1 = i; i1 > -1; i1--)
493  {
494  dia = matrix[i1+1][j+1];
495 
496  /* Find highest score to right of diagonal */
497  rcell = i1+2;
498  if(i1+2 >= length1) right = 0;
499  else right = matrix[i1+2][j+1] - penalty;
500 
501  gapext = 1;
502  for(k = i1+3; k<length1; k++, gapext++)
503  {
504  thisscore = matrix[k][j+1] - (penalty + gapext*penext);
505 
506  if(thisscore > right)
507  {
508  right = thisscore;
509  rcell = k;
510  }
511  }
512 
513  /* Find highest score below diagonal */
514  dcell = j+2;
515  if(j+2 >= length2) down = 0;
516  else down = matrix[i1+1][j+2] - penalty;
517 
518  gapext = 1;
519  for(l = j+3; l<length2; l++, gapext++)
520  {
521  thisscore = matrix[i1+1][l] - (penalty + gapext*penext);
522 
523  if(thisscore > down)
524  {
525  down = thisscore;
526  dcell = l;
527  }
528  }
529 
530  /* Set score to best of these */
531  maxoff = MAX(right, down);
532  if(dia >= maxoff)
533  {
534  matrix[i1][j] = dia;
535  dirn[i1][j].x = i1+1;
536  dirn[i1][j].y = j+1;
537  }
538  else
539  {
540  if(right > down)
541  {
542  matrix[i1][j] = right;
543  dirn[i1][j].x = rcell;
544  dirn[i1][j].y = j+1;
545  }
546  else
547  {
548  matrix[i1][j] = down;
549  dirn[i1][j].x = i1+1;
550  dirn[i1][j].y = dcell;
551  }
552  }
553 
554  /* Add the score for a match */
555  if(identity)
556  {
557  if(seq1[i1] == seq2[j]) matrix[i1][j] += match;
558  }
559  else
560  {
561  matrix[i1][j] += blNumericCalcMDMScore(seq1[i1],seq2[j]);
562  }
563  }
564 
565  /* Fill in the scores in this column */
566  for(j1 = j; j1 > -1; j1--)
567  {
568  dia = matrix[i+1][j1+1];
569 
570  /* Find highest score to right of diagonal */
571  rcell = i+2;
572  if(i+2 >= length1) right = 0;
573  else right = matrix[i+2][j1+1] - penalty;
574 
575  gapext = 1;
576  for(k = i+3; k<length1; k++, gapext++)
577  {
578  thisscore = matrix[k][j1+1] - (penalty + gapext*penext);
579 
580  if(thisscore > right)
581  {
582  right = thisscore;
583  rcell = k;
584  }
585  }
586 
587  /* Find highest score below diagonal */
588  dcell = j1+2;
589  if(j1+2 >= length2) down = 0;
590  else down = matrix[i+1][j1+2] - penalty;
591 
592  gapext = 1;
593  for(l = j1+3; l<length2; l++, gapext++)
594  {
595  thisscore = matrix[i+1][l] - (penalty + gapext*penext);
596 
597  if(thisscore > down)
598  {
599  down = thisscore;
600  dcell = l;
601  }
602  }
603 
604  /* Set score to best of these */
605  maxoff = MAX(right, down);
606  if(dia >= maxoff)
607  {
608  matrix[i][j1] = dia;
609  dirn[i][j1].x = i+1;
610  dirn[i][j1].y = j1+1;
611  }
612  else
613  {
614  if(right > down)
615  {
616  matrix[i][j1] = right;
617  dirn[i][j1].x = rcell;
618  dirn[i][j1].y = j1+1;
619  }
620  else
621  {
622  matrix[i][j1] = down;
623  dirn[i][j1].x = i+1;
624  dirn[i][j1].y = dcell;
625  }
626  }
627 
628  /* Add the score for a match */
629  if(identity)
630  {
631  if(seq1[i] == seq2[j1]) matrix[i][j1] += match;
632  }
633  else
634  {
635  matrix[i][j1] += blNumericCalcMDMScore(seq1[i],seq2[j1]);
636  }
637  }
638  }
639 
640  score = NumericTraceBack(matrix, dirn, length1, length2,
641  seq1, seq2, align1, align2, align_len);
642 
643  if(verbose)
644  {
645  printf("Matrix:\n-------\n");
646  for(j=0; j<length2;j++)
647  {
648  for(i=0; i<length1; i++)
649  {
650  printf("%3d ",matrix[i][j]);
651  }
652  printf("\n");
653  }
654 
655  printf("Path:\n-----\n");
656  for(j=0; j<length2;j++)
657  {
658  for(i=0; i<length1; i++)
659  {
660  printf("(%3d,%3d) ",dirn[i][j].x,dirn[i][j].y);
661  }
662  printf("\n");
663  }
664  }
665 
666  blFreeArray2D((char **)matrix, maxdim, maxdim);
667  blFreeArray2D((char **)dirn, maxdim, maxdim);
668 
669  return(score);
670 }
671 
672 /************************************************************************/
673 /*>static int NumericTraceBack(int **matrix, XY **dirn,
674  int length1, int length2,
675  int *seq1, int *seq2, int *align1,
676  int *align2, int *align_len)
677  ----------------------------------------------------------------
678 *//**
679  \param[in] **matrix N&W matrix
680  \param[in] **dirn Direction Matrix
681  \param[in] length1 Length of first sequence
682  \param[in] length2 Length of second sequence
683  \param[in] *seq1 First sequence
684  \param[in] *seq2 Second sequence
685  \param[out] *align1 First sequence aligned
686  \param[out] *align2 Second sequence aligned
687  \param[out] *align_len Aligned sequence length
688  \return Alignment score
689 
690  Does the traceback to find the aligment.
691 
692  Identical to align.c/TraceBack(), but uses integer arrays.
693 
694 - 08.03.00 Original based on align.c/TraceBack() 06.03.00 By: ACRM
695 - 28.09.00 Fixed bug at end of alignment if one sequence finishes
696  first
697 */
698 static int NumericTraceBack(int **matrix,
699  XY **dirn,
700  int length1,
701  int length2,
702  int *seq1,
703  int *seq2,
704  int *align1,
705  int *align2,
706  int *align_len)
707 {
708  int i, j,
709  ai,
710  BestI,BestJ;
711  XY nextCell;
712 
713  ai = NumericSearchForBest(matrix, length1, length2, &BestI, &BestJ,
714  seq1, seq2, align1, align2);
715 
716  /* Now trace back to find the alignment */
717  i = BestI;
718  j = BestJ;
719  align1[ai] = seq1[i];
720  align2[ai++] = seq2[j];
721 
722  while(i < length1-1 && j < length2-1)
723  {
724  nextCell.x = dirn[i][j].x;
725  nextCell.y = dirn[i][j].y;
726  if((nextCell.x == i+1) && (nextCell.y == j+1))
727  {
728  /* We are inheriting from the diagonal */
729  i++;
730  j++;
731  }
732  else if(nextCell.y == j+1)
733  {
734  /* We are inheriting from the off-diagonal inserting a gap in
735  the y-sequence (seq2)
736  */
737  i++;
738  j++;
739  while((i < nextCell.x) && (i < length1-1))
740  {
741  align1[ai] = seq1[i++];
742  align2[ai++] = 0;
743  }
744  }
745  else if(nextCell.x == i+1)
746  {
747  /* We are inheriting from the off-diagonal inserting a gap in
748  the x-sequence (seq1)
749  */
750  i++;
751  j++;
752  while((j < nextCell.y) && (j < length2-1))
753  {
754  align1[ai] = 0;
755  align2[ai++] = seq2[j++];
756  }
757  }
758  else
759  {
760  /* Cockup! */
761  fprintf(stderr,"align.c/TraceBack() internal error\n");
762  }
763 
764  align1[ai] = seq1[i];
765  align2[ai++] = seq2[j];
766  }
767 
768  /* If one sequence finished first, fill in the end with insertions */
769  if(i < length1-1)
770  {
771  for(j=i+1; j<length1; j++)
772  {
773  align1[ai] = seq1[j];
774  align2[ai++] = 0;
775  }
776  }
777  else if(j < length2-1)
778  {
779  for(i=j+1; i<length2; i++)
780  {
781  align1[ai] = 0;
782  align2[ai++] = seq2[i];
783  }
784  }
785 
786  *align_len = ai;
787 
788  return(matrix[BestI][BestJ]);
789 }
790 
791 
792 
793 
794 
795 
796 #ifdef DEMO
797 int main(int argc, char **argv)
798 {
799  int seq1[] = {1, 3, 1, 3, 7, 9, 5, 6},
800  seq2[] = {1, 3, 1, 3, 5, 6},
801  align1[100],
802  align2[100];
803  int score, al_len, i;
804 
805 
806  NumericReadMDM("numtopmat.mat");
807 
808  score = NumericAffineAlign(seq1, 8, seq2, 6,
809  TRUE, FALSE,
810  5, 0, align1, align2, &al_len);
811 
812  align1[al_len] = '\0';
813  align2[al_len] = '\0';
814 
815  for(i=0;i<al_len;i++)
816  printf("%2d=", align1[i]);
817  printf("\n");
818 
819  for(i=0;i<al_len;i++)
820  printf("%2d=", align2[i]);
821  printf("\n");
822 
823  return(0);
824 }
825 #endif
826 
#define MAX(a, b)
Definition: macros.h:239
int main(int argc, char **argv)
Definition: test.c:4
short BOOL
Definition: SysDefs.h:64
#define NULL
Definition: array2.c:99
int blNumericAffineAlign(int *seq1, int length1, int *seq2, int length2, BOOL verbose, BOOL identity, int penalty, int penext, int *align1, int *align2, int *align_len)
Definition: NumericAlign.c:412
char ** blArray2D(int size, int dim1, int dim2)
Definition: array2.c:130
int x
Definition: align.c:156
#define FALSE
Definition: macros.h:223
BOOL blNumericReadMDM(char *mdmfile)
Definition: NumericAlign.c:258
Definition: align.c:154
Useful macros.
Include file for 2D/3D array functions.
FILE * blOpenFile(char *filename, char *envvar, char *mode, BOOL *noenv)
Definition: OpenFile.c:146
#define TERMINATE(x)
Definition: macros.h:366
Header file for sequence handling.
void blFreeArray2D(char **array, int dim1, int dim2)
Definition: array2.c:174
#define TRUE
Definition: macros.h:219
int y
Definition: align.c:156
char * blGetWord(char *buffer, char *word, int maxsize)
Definition: GetWord.c:268
#define DATAENV
Definition: NumericAlign.c:110
Header file for general purpose routines.
#define KILLLEADSPACES(y, x)
Definition: macros.h:408
System-type variable type definitions.
int blNumericCalcMDMScore(int resa, int resb)
Definition: NumericAlign.c:342
#define MAXBUFF
Definition: NumericAlign.c:112