source: tags/arb-6.0/ISLAND_HOPPING/i-hopper.cxx

Last change on this file was 8607, checked in by westram, 13 years ago

merge from e4fix [8135] [8136] [8137] [8138] [8139] [8140] [8141] [8142] [8143] [8144] [8222]
(this revives the reverted patches [8129] [8130] [8131] [8132]; see [8133])

  • fixes
    • some free/delete mismatches
    • wrong definition of ORF objects (Level was no bit value)
    • amino consensus (failed for columns only containing 'C')
  • rename
    • AA_sequence_term → orf_term
    • ED4_sequence_terminal_basic → ED4_abstract_sequence_terminal
  • cleaned up hierarchy dumps
  • tweaked is_terminal()/to_terminal()
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.7 KB
Line 
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
17int 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
Note: See TracBrowser for help on using the repository browser.