Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
CodonModelCompare - save results to file (Read 2398 times)
avilella
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 35
CodonModelCompare - save results to file
Sep 5th, 2005 at 10:44am
 
Dears,

I found out that CodonModelCompare.bf differs from NucModelCompare.bf in that the former won't ask for a results file, while the latter does.

As I find more convenient for batched jobs to save the results in a separate file, I took to liberty of adding the results file prompt in CodonModelCompare.bf.

In hopes of being useful to others, here is the diff:
-----
--- CodonModelCompare.bf.ori    2005-09-05 19:24:51.967872600 +0200
+++ CodonModelCompare.bf        2005-09-05 19:28:44.062588840 +0200
@@ -631,6 +631,10 @@
       fscanf  (stdin,"Number", rejectAt);
}

+SetDialogPrompt ("Save results to:");
+
+fprintf (PROMPT_FOR_FILE, CLEAR_FILE);
+BASE_PATH = LAST_FILE_PATH;


KEEP_OPTIMAL_ORDER = 1;
@@ -942,6 +946,9 @@
               }
       }

+       fprintf (BASE_PATH,CLEAR_FILE,"\n\nRemaining models:\n\n#   |  Model   | # prm |    lnL    |      LRT       |    AIC     |   P-Value        |");
+       fprintf (BASE_PATH,"\n----|----------|-------|-----------|----------------|------------|
------------------|");
+
       fprintf (stdout,"\n\nRemaining models:\n\n#   |  Model   | # prm |    lnL    |      LRT       |    AIC     |   P-Value        |");
       fprintf (stdout,"\n----|----------|-------|-----------|----------------|------------|---
---------------|");

@@ -970,11 +977,15 @@
                       modelNum = modelNum + 1;
                       PRINT_DIGITS = 3;
                       fprintf (stdout,"\n",v2);
+                       fprintf (BASE_PATH,"\n",v2);
                       PRINT_DIGITS = 1;
                       fprintf (stdout," | (",0,resultCache[v2][0],resultCache[v2][1],resultCache[v2][2],resultCache[v2][3],resultCache[v2][4],") | ");
                       fprintf (stdout,Format (np,5,0));
+                       fprintf (BASE_PATH," | (",0,resultCache[v2][0],resultCache[v2][1],resultCache[v2][2],resultCache[v2][3],resultCache[v2][4],") | ");
+                       fprintf (BASE_PATH,Format (np,5,0));
                       PRINT_DIGITS = 8;
                       fprintf (stdout, " |  ",lnL," | ",Format(LRT,14,3), " |  ", AIC, "  |  ", );
+                       fprintf (BASE_PATH, " |  ",lnL," | ",Format(LRT,14,3), " |  ", AIC, "  |  ", );
                       PRINT_DIGITS = 15;
                       if (LRT==0)
                       {
@@ -990,6 +1001,7 @@
                               v4 = v2;
                       }
                       fprintf (stdout,pValue," |");
+                       fprintf (BASE_PATH,pValue," |");

               }
       }
@@ -1002,6 +1014,7 @@
       }

       fprintf (stdout, "\n\nAIC based winner: (", modelString, ") with AIC = ", v5, "\n\n");
+       fprintf (BASE_PATH, "\n\nAIC based winner: (", modelString, ") with AIC = ", v5, "\n\n");

       dummy = printModelMatrix (modelString);

@@ -1021,12 +1034,14 @@
       if (Abs(modelString2))
       {
               fprintf (stdout, "\nThis model is better known as:", modelString2, "\n");
+               fprintf (BASE_PATH, "\nThis model is better known as:", modelString2, "\n");
       }

}
else
{
       fprintf (stdout, "\nGeneral Reversible Model is the winner!\n");
+       fprintf (BASE_PATH, "\nGeneral Reversible Model is the winner!\n");
}

Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: CodonModelCompare - save results to file
Reply #1 - Sep 6th, 2005 at 12:01pm
 
Dear Albert,

Thanks for the modified version of the analysis. I will include the additions in the next build of HyPhy.

Cheers,
Sergei
Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged