| --- 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++) |