ARB
i-hopper.cxx
Go to the documentation of this file.
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=NULp;
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=NULp;
51  char *YY=NULp;
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
#define FALSE
Definition: defs.h:21
#define EXIT_SUCCESS
Definition: arb_a2ps.c:154
static void error(const char *msg)
Definition: mkptypes.cxx:96
int main(void)
Definition: i-hopper.cxx:17
static void clearUp(void)
Definition: mem.cxx:23
#define EXIT_FAILURE
Definition: arb_a2ps.c:157
#define freeBlock(v)
Definition: mem.h:25
#define NULp
Definition: cxxforward.h:116
void Align(int nX, char X[], int secX[], char **XX, int nY, char Y[], int secY[], char **YY, int freqs, double fT, double fC, double fA, double fG, double rTC, double rTA, double rTG, double rCA, double rCG, double rAG, double dist, double supp, double gapA, double gapB, double gapC, double thres)
Definition: align.cxx:799