[Avida-SVN] r2418 - branches/matt/PairwiseEpistasis/source/analyze

matt at myxo.css.msu.edu matt at myxo.css.msu.edu
Mon Mar 3 19:47:54 PST 2008


Author: matt
Date: 2008-03-03 22:47:53 -0500 (Mon, 03 Mar 2008)
New Revision: 2418

Modified:
   branches/matt/PairwiseEpistasis/source/analyze/cAnalyze.cc
Log:
Added pairwise sign-epistasis calculation into Mutation_Revert.


Modified: branches/matt/PairwiseEpistasis/source/analyze/cAnalyze.cc
===================================================================
--- branches/matt/PairwiseEpistasis/source/analyze/cAnalyze.cc	2008-03-03 21:26:17 UTC (rev 2417)
+++ branches/matt/PairwiseEpistasis/source/analyze/cAnalyze.cc	2008-03-04 03:47:53 UTC (rev 2418)
@@ -7001,7 +7001,7 @@
  * January 2008
  * This function will go through the lineage, align the genotypes, and
  * perform pairwise reversions for all pairs of genotypes in the current
- * batch.
+ * batch.  Reversions from a mutation will not be performed once the mutation
  * Recalculating the current batch for phenotypic plasticity prior to use
  * speeds up this function.
  * Arguments:
@@ -7126,7 +7126,7 @@
             break;
             
           case 'm':      // Point mutation from 0 to A
-            if (str_AB[k] != '_' && true){ //!mutated_from_A[k]){ // If the site still exists and is the
+            if (str_AB[k] != '_' && !mutated_from_A[k]){ // If the site still exists and is the
               str_B += str_0[k];                           // same as mutant A, revert to mutant 0 
               tmp_B += str_0[k];
               performed_reversion = true;
@@ -7184,6 +7184,7 @@
       fitness_B = pp.GetLikelyFitness();
       P_H_B = pp.GetPhenotypicEntropy();
       
+      double sign_epistasis = log( (fitness_0 * fitness_AB) / (fitness_A * fitness_B) );
       
       /*
        FOT output per line
@@ -7205,6 +7206,7 @@
        DISTANCE_A_AB
        FITNESS_B
        PHEN_PLAST_ENTROPY_B
+       SIGN_EPISTASIS (Nats)
        */
       
 /*
@@ -7238,6 +7240,8 @@
       df.Write(fitness_B, "Fitness_B"); //18
       df.Write(P_H_B, "Phenotypic_Entropy_B"); //19
       
+      df.Write(sign_epistasis, "Sign_Epistasis_(nats)");
+      
      
       df.Endl();
       /*




More information about the Avida-cvs mailing list