1 | // ============================================================= |
---|
2 | /* */ |
---|
3 | // File : i-hopper.c |
---|
4 | // Purpose : |
---|
5 | /* */ |
---|
6 | // Institute of Microbiology (Technical University Munich) |
---|
7 | // http://www.arb-home.de/ |
---|
8 | /* */ |
---|
9 | // ============================================================= |
---|
10 | |
---|
11 | #include "i-hopper.h" |
---|
12 | #include "mem.h" |
---|
13 | |
---|
14 | // ============================================================================ |
---|
15 | |
---|
16 | #ifndef ARB |
---|
17 | int main(void) { |
---|
18 | |
---|
19 | Error=NULL; |
---|
20 | |
---|
21 | fprintf(stdout,"\nAligning ..."); |
---|
22 | |
---|
23 | { |
---|
24 | char X[]="CTTCGCTTTGGATCCTTACTAGGATCTGCCTAGTACATTCAAATCTTAACAGGCTTATTTCTGTGTGGGTGTGTGTGTGAATACATTACACATCAGACACATCAACTG"; |
---|
25 | int secX[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; |
---|
26 | |
---|
27 | char Y[]="GGTCTTTATTAGGAATATGCCTAATTATTCAAATTCTCACCGGACTATTCACACCCCAACACACACACACAATACACTACACCTCTGACACATTCACCGCCTT"; |
---|
28 | int secY[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; |
---|
29 | |
---|
30 | int freqs=FALSE; |
---|
31 | double fT=0.25; |
---|
32 | double fC=0.25; |
---|
33 | double fA=0.25; |
---|
34 | double fG=0.25; |
---|
35 | |
---|
36 | double rTC=4.0; |
---|
37 | double rTA=1.0; |
---|
38 | double rTG=1.0; |
---|
39 | double rCA=1.0; |
---|
40 | double rCG=1.0; |
---|
41 | double rAG=4.0; |
---|
42 | |
---|
43 | double dist=0.3; |
---|
44 | double supp=0.5; |
---|
45 | double gapA=8.; |
---|
46 | double gapB=4.; |
---|
47 | double gapC=7.; |
---|
48 | double thres=0.005; |
---|
49 | |
---|
50 | char *XX=NULL; |
---|
51 | char *YY=NULL; |
---|
52 | |
---|
53 | int nX; |
---|
54 | int nY; |
---|
55 | |
---|
56 | nX=strlen(X); |
---|
57 | nY=strlen(Y); |
---|
58 | |
---|
59 | Align( |
---|
60 | nX,X,secX,&XX,nY,Y,secY,&YY, |
---|
61 | freqs,fT,fC,fA,fG, |
---|
62 | rTC,rTA,rTG,rCA,rCG,rAG, |
---|
63 | dist,supp,gapA,gapB,gapC,thres |
---|
64 | ); |
---|
65 | |
---|
66 | if(Error) goto error; |
---|
67 | |
---|
68 | { FILE *fp; int i,nXX,nYY; |
---|
69 | nXX=strlen(XX); |
---|
70 | nYY=strlen(YY); |
---|
71 | fp=fopen("alignment.txt","w"); |
---|
72 | for(i=0;i<nXX;i++) fprintf(fp,"%c",XX[i]); fprintf(fp,"\n"); |
---|
73 | for(i=0;i<nYY;i++) fprintf(fp,"%c",YY[i]); fprintf(fp,"\n"); |
---|
74 | fclose(fp); |
---|
75 | } |
---|
76 | |
---|
77 | freeBlock(&XX); |
---|
78 | freeBlock(&YY); |
---|
79 | |
---|
80 | } |
---|
81 | |
---|
82 | clearUp(); |
---|
83 | |
---|
84 | return(EXIT_SUCCESS); |
---|
85 | |
---|
86 | error: |
---|
87 | |
---|
88 | fprintf(stdout,"\n!!! %s\n",Error); |
---|
89 | fprintf(stdout,"\nPress RETURN to exit\n"); |
---|
90 | getc(stdin); |
---|
91 | |
---|
92 | clearUp(); |
---|
93 | |
---|
94 | return(EXIT_FAILURE); |
---|
95 | |
---|
96 | } |
---|
97 | #endif |
---|