|
Last change
on this file was
7811,
checked in by westram, 14 years ago
|
|
merge from dev [7748] [7749] [7750]
- comments (C→C++ style)
- fixed umlauts in TREEGEN
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
|
File size:
929 bytes
|
| Line | |
|---|
| 1 | #include "base.h" |
|---|
| 2 | #include <ctype.h> |
|---|
| 3 | |
|---|
| 4 | char helixBaseChar[BASECHARS] = { 'A', 'C', 'G', 'T', '=' }, |
|---|
| 5 | loopBaseChar[BASECHARS] = { 'a', 'c', 'g', 't', '-' }; |
|---|
| 6 | |
|---|
| 7 | int 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 | |
|---|
| 19 | int baseCharType[MAXBASECHAR+1], |
|---|
| 20 | charIsDelete[MAXBASECHAR+1], |
|---|
| 21 | charIsHelical[MAXBASECHAR+1]; |
|---|
| 22 | |
|---|
| 23 | void initBaseLookups() |
|---|
| 24 | { |
|---|
| 25 | int b; |
|---|
| 26 | |
|---|
| 27 | for (b = 0; b<MAXBASECHAR; b++) |
|---|
| 28 | { |
|---|
| 29 | baseCharType[b] = -1; |
|---|
| 30 | charIsDelete[b] = 0; |
|---|
| 31 | charIsHelical[b] = 0; |
|---|
| 32 | } |
|---|
| 33 | |
|---|
| 34 | for (b = 0; b<BASECHARS; b++) |
|---|
| 35 | { |
|---|
| 36 | int c1 = helixBaseChar[b], |
|---|
| 37 | c2 = loopBaseChar[b]; |
|---|
| 38 | |
|---|
| 39 | assert(c1<=MAXBASECHAR); |
|---|
| 40 | assert(c2<=MAXBASECHAR); |
|---|
| 41 | |
|---|
| 42 | baseCharType[c1] = b; |
|---|
| 43 | baseCharType[c2] = b; |
|---|
| 44 | charIsHelical[c1] = 1; |
|---|
| 45 | } |
|---|
| 46 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.