[Avida-SVN] r2587 - in branches/matt/CladeTracking: Avida.xcodeproj source/classification

matt at myxo.css.msu.edu matt at myxo.css.msu.edu
Mon May 19 12:22:36 PDT 2008


Author: matt
Date: 2008-05-19 15:22:36 -0400 (Mon, 19 May 2008)
New Revision: 2587

Added:
   branches/matt/CladeTracking/source/classification/cGenotype_AnalysisData.cc
   branches/matt/CladeTracking/source/classification/cGenotype_AnalysisData.h
Modified:
   branches/matt/CladeTracking/Avida.xcodeproj/project.pbxproj
   branches/matt/CladeTracking/source/classification/cGenotype.h
Log:
Added function stubs and headers to new class cGenotype_AnalysisData; this class is to handle intensive experiment-time computationally intensive genotype analysis.


Modified: branches/matt/CladeTracking/Avida.xcodeproj/project.pbxproj
===================================================================
--- branches/matt/CladeTracking/Avida.xcodeproj/project.pbxproj	2008-05-19 18:31:11 UTC (rev 2586)
+++ branches/matt/CladeTracking/Avida.xcodeproj/project.pbxproj	2008-05-19 19:22:36 UTC (rev 2587)
@@ -202,6 +202,8 @@
 		70B651B70BEA9AEC002472ED /* unit-tests in CopyFiles */ = {isa = PBXBuildFile; fileRef = 70B6514C0BEA6FAD002472ED /* unit-tests */; };
 		70DCAC9C097AF7C0002F8733 /* primitive.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70DCAC9B097AF7C0002F8733 /* primitive.cc */; };
 		70EFD6600D975B6E00FAD32A /* cConstBurstSchedule.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70EFD65F0D975B5E00FAD32A /* cConstBurstSchedule.cc */; };
+		B41B97C50DE1FD370073450C /* cGenotype_AnalysisData.h in Headers */ = {isa = PBXBuildFile; fileRef = B41B97C30DE1FD370073450C /* cGenotype_AnalysisData.h */; };
+		B41B98000DE206720073450C /* cGenotype_AnalysisData.cc in Sources */ = {isa = PBXBuildFile; fileRef = B41B97C40DE1FD370073450C /* cGenotype_AnalysisData.cc */; };
 		B4FA258A0C5EB65E0086D4B5 /* cPlasticPhenotype.cc in Sources */ = {isa = PBXBuildFile; fileRef = B4FA25810C5EB6510086D4B5 /* cPlasticPhenotype.cc */; };
 		B4FA25A90C5EB7880086D4B5 /* cPhenPlastGenotype.cc in Sources */ = {isa = PBXBuildFile; fileRef = B4FA259E0C5EB7600086D4B5 /* cPhenPlastGenotype.cc */; };
 		B516AF840C91E2D400023D53 /* cDemeCellEvent.cc in Sources */ = {isa = PBXBuildFile; fileRef = B516AF790C91E24600023D53 /* cDemeCellEvent.cc */; };
@@ -839,6 +841,8 @@
 		70F7DE76092967A8009E311D /* cGenotypeBatch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cGenotypeBatch.h; sourceTree = "<group>"; };
 		70F9FD990C4E89C40083B788 /* tAutoRelease.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tAutoRelease.h; sourceTree = "<group>"; };
 		70FB86A908BFAFEC00BDF589 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
+		B41B97C30DE1FD370073450C /* cGenotype_AnalysisData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cGenotype_AnalysisData.h; sourceTree = "<group>"; };
+		B41B97C40DE1FD370073450C /* cGenotype_AnalysisData.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cGenotype_AnalysisData.cc; sourceTree = "<group>"; };
 		B4FA25800C5EB6510086D4B5 /* cPhenPlastGenotype.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cPhenPlastGenotype.h; sourceTree = "<group>"; };
 		B4FA25810C5EB6510086D4B5 /* cPlasticPhenotype.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cPlasticPhenotype.cc; sourceTree = "<group>"; };
 		B4FA25820C5EB6510086D4B5 /* cPlasticPhenotype.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cPlasticPhenotype.h; sourceTree = "<group>"; };
@@ -1283,6 +1287,8 @@
 		70F7D8C8092546DC009E311D /* classification */ = {
 			isa = PBXGroup;
 			children = (
+				B41B97C30DE1FD370073450C /* cGenotype_AnalysisData.h */,
+				B41B97C40DE1FD370073450C /* cGenotype_AnalysisData.cc */,
 				705333E5092A4B7C006BD186 /* cLineage.cc */,
 				705333E6092A4B7C006BD186 /* cLineage.h */,
 				70533363092A3DF4006BD186 /* cInjectGenotype_BirthData.h */,
@@ -1669,6 +1675,7 @@
 			buildActionMask = 2147483647;
 			files = (
 				2A57A4000D6B954D00FC54C7 /* cProbDemeProbSchedule.h in Headers */,
+				B41B97C50DE1FD370073450C /* cGenotype_AnalysisData.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -1817,7 +1824,6 @@
 		DCC30C4D0762532C008F7A48 /* Project object */ = {
 			isa = PBXProject;
 			buildConfigurationList = 702442D70859E0B00059BD9B /* Build configuration list for PBXProject "Avida" */;
-			compatibilityVersion = "Xcode 2.4";
 			hasScannedForEncodings = 0;
 			mainGroup = DCC30C490762532C008F7A48;
 			productRefGroup = DCC3164E07626CF3008F7A48 /* Products */;
@@ -2020,6 +2026,7 @@
 				70A778390D69D5CA00735F1E /* cDemeProbSchedule.cc in Sources */,
 				2A57A3FF0D6B954D00FC54C7 /* cProbDemeProbSchedule.cc in Sources */,
 				70EFD6600D975B6E00FAD32A /* cConstBurstSchedule.cc in Sources */,
+				B41B98000DE206720073450C /* cGenotype_AnalysisData.cc in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

Modified: branches/matt/CladeTracking/source/classification/cGenotype.h
===================================================================
--- branches/matt/CladeTracking/source/classification/cGenotype.h	2008-05-19 18:31:11 UTC (rev 2586)
+++ branches/matt/CladeTracking/source/classification/cGenotype.h	2008-05-19 19:22:36 UTC (rev 2587)
@@ -33,6 +33,9 @@
 #ifndef cGenome_h
 #include "cGenome.h"
 #endif
+#ifndef cGenotype_AnalysisData_h
+#include "cGenotype_AnalysisData.h"
+#endif
 #ifndef cGenotype_BirthData_h
 #include "cGenotype_BirthData.h"
 #endif
@@ -51,7 +54,8 @@
 class cGenotype {
 private:
   friend class cClassificationManager;
-
+  friend class cGenotype_AnalysisData;  //Needed to make on-demand recalculations in cGenotype_AnalysisData
+  
   cWorld* m_world;
   cGenome genome;
   cString name;
@@ -65,7 +69,8 @@
 
   mutable cGenotype_TestData test_data;
   cGenotype_BirthData birth_data;
-
+ // cGenotype_AnalysisData analysis_data;
+  
   // Statistical info
 
   int num_organisms;

Added: branches/matt/CladeTracking/source/classification/cGenotype_AnalysisData.cc
===================================================================
--- branches/matt/CladeTracking/source/classification/cGenotype_AnalysisData.cc	                        (rev 0)
+++ branches/matt/CladeTracking/source/classification/cGenotype_AnalysisData.cc	2008-05-19 19:22:36 UTC (rev 2587)
@@ -0,0 +1,11 @@
+/*
+ *  cGenotype_AnalysisData
+ *  Avida
+ *
+ *  Created by Matthew Rupp on 5/19/08.
+ *  Copyright 2008 __MyCompanyName__. All rights reserved.
+ *
+ */
+
+#include "cGenotype_AnalysisData.h"
+

Added: branches/matt/CladeTracking/source/classification/cGenotype_AnalysisData.h
===================================================================
--- branches/matt/CladeTracking/source/classification/cGenotype_AnalysisData.h	                        (rev 0)
+++ branches/matt/CladeTracking/source/classification/cGenotype_AnalysisData.h	2008-05-19 19:22:36 UTC (rev 2587)
@@ -0,0 +1,71 @@
+/*
+ *  cGenotype_AnalysisData.h
+ *  Avida
+ *
+ *  Copyright 1999-2008 Michigan State University. All rights reserved.
+ *  Copyright 1993-2003 California Institute of Technology.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
+
+/*  This class is designed to handle some experiment-time analysis of Avida genotypes
+ *  including genetic background tracking.
+ */
+
+
+
+#ifndef cGenotype_AnalysisData_h
+#define cGenotype_AnalysisData_h
+
+#ifndef cGenotype_h
+#include "cGenotype.h"
+#endif
+
+class cGenotype_AnalysisData {
+  
+  private:  
+    // This class is supposed to be an internal, general purpose means
+    // of tracking epistasis information in real time.  Its purpose is
+    // to keep track of the identity of the base genetic background --
+    // the second genotype in the epistasis analysis pair.
+    class cEpistasisInfo{         
+      int    base_gentoype_id;    // Identity of base genetic background
+      int    base_genotype_depth; // Depth of base genetic background
+      double log_epistasis;
+    };
+    mutable cEpistasisInfo* m_SignEpistasisMRCA;   // Keep track of sign epistasis data to MRCA   (allowed to be invalid or null)
+    mutable cEpistasisInfo* m_SignEpistasisParent; // Keep track of sign epistasis data to Parent (allowed to be invalid or null)
+    void CheckSignEpistasisMRCA();    // Validate MRCA epistasis data
+    void CheckSignEpistasisParent();  // Validate parent epistasis data
+    
+    int m_coalescese_time;  // Time the genotype became part of the genetic background of the entire population (-1 if never or not yet);
+    
+    
+  public:
+     //Common Ancestor Information
+     int DepthToMRCA() {return 0;}    // Depth to most recent common ancestor
+     int CoalescenseTime() {return -1;} // Time this genotype became the genetic background of the population (-1 if never or not yet)
+    
+     //Sign-Epistatic Mutation Tracking
+      double EpistaticConversionToMRCA() {return 0.0;}   // Revert all background mutations back to MRCA (except last mutation)
+     
+     
+};
+
+
+#endif




More information about the Avida-cvs mailing list