Menu

Tree [61efd3] master /
 History

HTTPS access


File Date Author Commit
 data 2011-03-16 Diamantis Sellis Diamantis Sellis [937203] added ageplot.R
 figures 2011-10-26 Diamantis Sellis Diamantis Sellis [0a3f63] small changes in PNAS revision figures
 #batch.pa.pl# 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 Makefile 2011-10-24 Diamantis Sellis Diamantis Sellis [094665] implement Random Combination of Alleles scenario
 README 2011-09-21 Diamantis Sellis Diamantis Sellis [5e8a63] added a README file and a publish.sh for prepar...
 SelectWalks.pl 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 a.out 2011-10-26 Diamantis Sellis Diamantis Sellis [0a3f63] small changes in PNAS revision figures
 allele.cpp 2011-10-24 Diamantis Sellis Diamantis Sellis [094665] implement Random Combination of Alleles scenario
 allele.h 2011-10-24 Diamantis Sellis Diamantis Sellis [094665] implement Random Combination of Alleles scenario
 batch.mo.alt.pl 2011-10-26 Diamantis Sellis Diamantis Sellis [0a3f63] small changes in PNAS revision figures
 batch.mo.pl 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 batch.mo.pnas.pl 2011-10-11 Diamantis Sellis Diamantis Sellis [33f876] make changes to be able to study the effect of ...
 batch.pa.pl 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 batch.walks.figures.pl 2011-03-30 Diamantis Sellis Diamantis Sellis [14f827] correct string for parallel runs
 batch.walks.pl 2011-03-21 Diamantis Sellis Diamantis Sellis [cf7441] added option cluster == 2. with cluster = 1 the...
 bioxbatch5.pl 2011-03-17 Diamantis Sellis Diamantis Sellis [9c5071] eval around use Parallel::ForkManager to test i...
 coalescence.pl 2011-03-30 Diamantis Sellis Diamantis Sellis [e1ca2e] removed R scripts for unused figures and rename...
 colors.R 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 condense.sh 2011-03-21 Diamantis Sellis Diamantis Sellis [4f1f90] can be run in biox or not
 environment.cpp 2011-03-15 Diamantis Sellis Diamantis Sellis [12d117] replaced pseudofixation condition with isAdapte...
 environment.h 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 figlib.R 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 figure2.R 2011-09-06 Diamantis Sellis Diamantis Sellis [10f5eb] modified figures 2,3 and S4 for PNAS (capitaliz...
 figure3.R 2011-09-06 Diamantis Sellis Diamantis Sellis [10f5eb] modified figures 2,3 and S4 for PNAS (capitaliz...
 figureS3.R 2011-04-05 Diamantis Sellis Diamantis Sellis [25780f] changed axis labels, probability with lowercase...
 figureS4.R 2011-09-06 Diamantis Sellis Diamantis Sellis [10f5eb] modified figures 2,3 and S4 for PNAS (capitaliz...
 figureS4a.R 2011-04-05 Diamantis Sellis Diamantis Sellis [72068d] change path for data in figureS4
 figureS4b.R 2011-04-05 Diamantis Sellis Diamantis Sellis [72068d] change path for data in figureS4
 figureS4c.R 2011-04-05 Diamantis Sellis Diamantis Sellis [0835f5] yaxis label has no trailing zeros
 figureS4d.R 2011-04-05 Diamantis Sellis Diamantis Sellis [0835f5] yaxis label has no trailing zeros
 geometry.cpp 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 geometry.exe 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 index 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 initEnvironment.dat 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 initPopOptim.dat 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 initPopulation.dat 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 makeArrows.pl 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 modelFunctions.cpp 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 modelFunctions.h 2011-04-10 Diamantis Sellis Diamantis Sellis [3891d2] prepare some doxygen-style comments
 numeric_limits.cpp 2011-10-11 Diamantis Sellis Diamantis Sellis [33f876] make changes to be able to study the effect of ...
 par.dat 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 parA.dat 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 parB.dat 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 parC.dat 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 parD.dat 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 parPA.dat 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 parR.dat 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 parameters.dat 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 pard.dat 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 parh.dat 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 pbal.cpp 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 plotArrows.R 2011-11-01 Diamantis Sellis Diamantis Sellis [b38a6e] modify for batch run of rca examples
 plotS3.R 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 plots.R 2011-02-28 Diamantis Sellis Diamantis Sellis [3dd5c1] bug fixes
 pnas_revision_figures.R 2011-10-26 Diamantis Sellis Diamantis Sellis [0a3f63] small changes in PNAS revision figures
 population.cpp 2013-07-10 Diamantis Sellis Diamantis Sellis [61efd3] include N in constructor of population class so...
 population.h 2013-07-10 Diamantis Sellis Diamantis Sellis [61efd3] include N in constructor of population class so...
 prepare4.pl 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 prepare5a.R 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 prepareS1.R 2011-03-21 Diamantis Sellis Diamantis Sellis [961c98] small bug fixes
 prepareS3.R 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 prepareS4.pl 2011-03-30 Diamantis Sellis Diamantis Sellis [4db32d] more renames and clean-up
 preparefig2.pl 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 publish.sh 2011-10-15 Diamantis Sellis Diamantis Sellis [36cd39] seccond attempt at DFEs
 randomv.cpp 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 randomv.h 2011-04-10 Diamantis Sellis Diamantis Sellis [3891d2] prepare some doxygen-style comments
 rca.cpp 2011-11-01 Diamantis Sellis Diamantis Sellis [b38a6e] modify for batch run of rca examples
 runningStat.cpp 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 runningStat.h 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 saved.pl 2011-03-03 Diamantis Sellis Diamantis Sellis [9f87d9] new batch file running 100 times 10 repeats in ...
 sfs.pl 2011-04-07 Diamantis Sellis Diamantis Sellis [7c0bb4] construct site frequency spectrum
 stability.cpp 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 stability.h 2011-04-10 Diamantis Sellis Diamantis Sellis [3891d2] prepare some doxygen-style comments
 stable.pl 2011-03-29 Diamantis Sellis Diamantis Sellis [80f290] removed also GetOptions code for N
 statistics.R 2011-03-21 Diamantis Sellis Diamantis Sellis [95467b] adapt to fgmo
 statistics.pl 2011-03-09 Diamantis Sellis Diamantis Sellis [400ffa] prints out more detailed statistics
 stats.pl 2011-02-25 Diamantis Sellis Diamantis Sellis [5028ba] added the rest of the files in the directory
 table2walk.pl 2011-02-28 Diamantis Sellis Diamantis Sellis [2697fe] bug fixes
 tableS1.R 2011-03-16 Diamantis Sellis Diamantis Sellis [f9c5a2] reads .b files and prints out columns for tableS1
 tester.cpp 2013-07-10 Diamantis Sellis Diamantis Sellis [61efd3] include N in constructor of population class so...
 todo 2011-10-26 Diamantis Sellis Diamantis Sellis [0a3f63] small changes in PNAS revision figures
 trajectories.R 2011-03-30 Diamantis Sellis Diamantis Sellis [fbfe93] move upwards text in balanced state label

Read Me

 .___    .               .__                ,          .  .     .   .
 [__ * __|_  _ ._. , __  [ __ _  _ ._ _  _ -+-._.* _.  |\/| _  _| _ |
 |   |_) [ )(/,[    _)   [_./(/,(_)[ | )(/, | [  |(_.  |  |(_)(_](/,|
                                                                     
                    ._        .__     .      .   
                    |, _ ._.  |  \*._ | _ * _| __
                    | (_)[    |__/|[_)|(_)|(_]_) 
                                   |             

A simulation of Fisher's Geometric Model in two dimensions for
diploids. You can download the most recent version from
https://sourceforge.net/projects/fgm/ or clone the Git repository

Prerequisites:
--------------
(a computer and OS, preferably Linux)
a C++ compiler (http://gcc.gnu.org/)
GNU Scientific Library (http://www.gnu.org/s/gsl/)

Compiling and Installing:
-------------------------
uncompress the file and compile
#> tar -xzvf fgm.YYMMDD.tar.gz
#> make

Running the simulations:
------------------------

After compiling you will get a new executable called a.out. In order
to run a sensible simulation you need to define a number of
parameters. Three example parameter files are included in the .tar
file you can modify them or create your own:

parameters.dat: includes all the simulation parameters such as population size
                mutation rates etc. There are no defaults for these!

initPopulation.dat: parameters specifying the initial population. By default a
                    monomorphic population at distance 2 from the optimum

initEnvironment.dat: initial conditions of the environment. This is useful for
                     continuing interrupted runs with moving optimum. The 
                     default is optimum on (0,0)

Once all the parameters are ready you can run a simulation:
#> ./a.out initPopulation.dat initEnvironment.dat parameters.dat output

This will create a number of output files, the most important are:
output.ts:    This file contains data in columns one generation per line.
              the columns are:
                    1. time (generations)
                    2. mean fitness
                    3. maximum allele's fitness
                    4. number of different alleles
                    5. optimum location (r)
                    6. optimum location (theta)				 
                    7. fitness variance					 
                    8. mean phenotype r					 
                    9. mean phenotype phi
                   10. phenotype variance on x axis
                   11. phenotype variance on y axis
                   12. maximum genotype fitness
                   13. time since last change in the environment's optimum
                   14. number of polymorphic alleles (with pi > d && pi < d)
                   15. stable equilibrium for all alleles (with pi > d && 
                       taking 1/N into account)
                   16. Heterosis A (wab - (waa+wbb)/2)/wab
                   17. Heterosis B (wab - max(waa,wbb))/wab
                   18. maximum difference

output.b:     Summary statistics for the whole run in columns:
                    1. mean fitness
                    2. fitness variance
                    3. number of balanced generations
                    4. total generations
                    5. did the population adapt
                    6. if true (1) the fitness is almost 0

more details about the simulation run are stored in the rest of the
output files, details of the colums can be found in the comments of
printStatus function in population.cpp

output.table :each line corresponds to a different allele
output.edges :pairs of parent-offspring alleles (mutated-mutant)
output.r     :only used with print states function

in the Git repository there are a number of R and Perl scripts for
formating and plotting the output in some convenient ways but their
usefulness highly depends on the focus of interest

Cite:
-----
Sellis, D., Callahan, B.J., Petrov, D.A and P.W. Messer. Fitness overdominance as a generic feature of adaptation in diploids. unpub (at least for now)

Bugs:
-----
through sourceforge or at dsellis@stanford.edu
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.