source: tags/arb_5.5/TREEGEN/base.c

Last change on this file was 4043, checked in by westram, 18 years ago
  • includes fixed (make depends had problems with)
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.1 KB
Line 
1#include "base.h"
2#include <ctype.h>
3
4char helixBaseChar[BASECHARS] = { 'A', 'C', 'G', 'T', '=' },
5     loopBaseChar[BASECHARS]  = { 'a', 'c', 'g', 't', '-' };
6
7int basesArePairing[BASECHARS][BASECHARS] =
8{
9
10/*    A  C  G  T  - */
11
12    { 0, 0, 0, 1, 0 }, /* A */
13    { 0, 0, 1, 0, 0 }, /* C */
14    { 0, 1, 0, 0, 0 }, /* G */
15    { 1, 0, 0, 0, 0 }, /* T */
16    { 0, 0, 0, 0, 0 }, /* - */
17};
18
19int baseCharType[MAXBASECHAR+1],
20    charIsDelete[MAXBASECHAR+1],
21    charIsHelical[MAXBASECHAR+1];
22
23/* -------------------------------------------------------------------------- */
24/*      void initBaseLookups(void) */
25/* ------------------------------------------------------ 25.05.95 02.07 ---- */
26void initBaseLookups(void)
27{
28    int b;
29
30    for (b = 0; b<MAXBASECHAR; b++)
31    {
32        baseCharType[b]  = -1;
33        charIsDelete[b]  = 0;
34        charIsHelical[b] = 0;
35    }
36
37    for (b = 0; b<BASECHARS; b++)
38    {
39        int c1 = helixBaseChar[b],
40            c2 = loopBaseChar[b];
41
42        assert(c1<=MAXBASECHAR);
43        assert(c2<=MAXBASECHAR);
44
45        baseCharType[c1]  = b;
46        baseCharType[c2]  = b;
47        charIsHelical[c1] = 1;
48    }
49}
Note: See TracBrowser for help on using the repository browser.