summaryrefslogtreecommitdiff
blob: 139b83c1c1c6090ce9734d67799c8ef719f07f52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
--- elph.cc.old	2005-01-11 14:17:47.000000000 -0500
+++ elph.cc	2005-01-27 19:42:30.218350552 -0500
@@ -26,11 +26,11 @@
                    period variable\n\
   -x             : print maximum positions within sequences\n\
   -g             : find significance of motif\n\
-  -t <matrix>    : test if there is significant difference between the two 
-                   input files for a given motif matrix; <matrix> is the file
+  -t <matrix>    : test if there is significant difference between the two\n\
+                   input files for a given motif matrix; <matrix> is the file\n\
                    containing the motif matrix\n\
-  -l             : compute Least Likely Consensus (LLC) for given motif 
-  -c             : in conjunction with -m option: motif is not necessarily in 
+  -l             : compute Least Likely Consensus (LLC) for given motif\n\
+  -c             : in conjunction with -m option: motif is not necessarily in\n\
                    the closest edit distance from input motif\n\
   LEN=n          : n = length of motif\n\
   ITERNO=n       : n = no of iterations to compute the global maximum;\n\
@@ -41,7 +41,7 @@
                    default = 1000\n\
  "
 
-// global variables: 
+// global variables:
 int ITER_NO=10;
 int MAX_LOOP=500;
 int printmax=0;
@@ -66,7 +66,7 @@
   seqType t;
 
   GArgs args(argc, argv, "ho:abcglvdxt:p:s:m:n:LEN=ITERNO=MAXLOOP=SGFNO=");
-  
+
   // == Process arguments.
 
   int e;
@@ -83,7 +83,7 @@
 
   if(!testfile.is_empty()) { // if testfile is defined then only compute significance between the two files
 
-    M = new Motif(infile,outf,t,matrixfile,pattern,motiflen,ITER_NO,MAX_LOOP,inlocmax,mdet);    
+    M = new Motif(infile,outf,t,matrixfile,pattern,motiflen,ITER_NO,MAX_LOOP,inlocmax,mdet);
     M->twofilesignif(gdet,testfile,SignifNo,print,pattern);
 
   }
@@ -93,11 +93,11 @@
                             // given motif
 
       M = new Motif(infile,outf,t,pattern);
-      if(defLLC) { 
+      if(defLLC) {
 	double llc=M->computeLLC(pattern,print);
 	fprintf(outf,"LLC = %f\n",llc);
       }
-      
+
     }
     else {
 
@@ -108,7 +108,7 @@
     }
 
     double globAlignProb;
-    
+
     globAlignProb=M->findMotif(ITER_NO,MAX_LOOP,inlocmax,1,mdet);
 
 
@@ -116,13 +116,13 @@
     /*info=M->InfoPar(globAlignProb);
       fprintf(outf,"MAP for motif: %.3f InfoPar=%.3f\n\n",globAlignProb,info);
       M->printMotif();*/
-    
+
     // optimizing
     fprintf(stderr,"Optimizing...\n");
     globAlignProb=M->optimize(globAlignProb,info,closest);
     fprintf(outf,"\n\n**********************\n\nMotif after optimizing\n");
     fprintf(outf,"MAP for motif: %.3f InfoPar=%.3f\n\n",globAlignProb,M->InfoPar(globAlignProb));
-    
+
     if(runsignif) {
       M->runforsignif(SignifNo,print,gdet,pattern);
     }
@@ -134,17 +134,17 @@
 
 seqType Process_Options(GArgs* args)
 {
-    
-  if (args->startNonOpt()) { //parse the non-options arguments 
+
+  if (args->startNonOpt()) { //parse the non-options arguments
                           //(usually filenames)
         infile=args->nextNonOpt();
   }
 
-  if (infile.is_empty() || args->getOpt('h')!=NULL) 
+  if (infile.is_empty() || args->getOpt('h')!=NULL)
     GError("%s",usage); // the empty test is optional you can ignore it if you accept stdin input
 
   testfile=args->nextNonOpt();
-  
+
   GString outfile=args->getOpt('o');
   if (!outfile.is_empty()) {
     outf=fopen(outfile, "w");
@@ -156,7 +156,7 @@
   matrixfile=args->getOpt('t');
 
   GString param;
-  
+
   pattern=args->getOpt('m');
   if(pattern.is_empty()) {
     param=args->getOpt("LEN");
@@ -200,7 +200,7 @@
 
   seqType t;
   if(args->getOpt('a')!=NULL) t=aac; else t=nucl;
-  
+
   return(t);
 
 }
@@ -210,7 +210,7 @@
   Motif *M;
 
   double llcmax=-HUGE_VAL;
-  GString seed;	
+  GString seed;
   for(int i1=0;i1<4;i1++)
     for(int i2=0;i2<4;i2++)
       for(int i3=0;i3<4;i3++)