/efficientFixation

Primary LanguageC++GNU General Public License v2.0GPL-2.0

efficientFixation

This code contains the algorithm described in Exact numerical calculation of fixation probability and time on graphs. by Laura Hindersin, Marius Möller, Arne Traulsen and Benedikt Bauer.

##Dependencies igraph and eigen3 have to be installed in order to use our software. They can be downloaded here and <a href=http://eigen.tuxfamily.org/index.php?title=Main_Page#Download>here. (Under Linux, you can use apt get to install. Under OS X, you can use MacPorts.) The GNU make tool is useful for compiling our code.

##Before compiling Edit the makefile (starting in line 29) to account for the location of your igraph and eigen Include Paths and Library Paths. For igraph, locate the libabry file libigraph.dylib and add its path (for example /usr/local/lib or /opt/local/lib) to line 33 of the makefile. ##Compiling In the terminal, go to the folder efficientFixation and run the following commands:

make clean
make
##Usage of the software You can run the code by using the command ./release/fixating.out, followed by the input parameters
Update Rule (Bd or dB),
Population Size (integer between 2 and 23),
Direction (undirected or directed),
Fitness of the mutants (any float larger than 0.0),
Category ('ER' for Erdos-Reny, 'BB' for Barabasi-Albert, 'WS' for Watts-Strogatz, 'geo' for geometric, 'complete' for well-mixed, or 'custom' for a custom graph),
Argument 1 ('GNM' or 'GNP' for Erdos Reny, double power of preference for Barabasi, int dimension for small world, bool periodic for geometric, '0' for complete, adjacency matrix as a string of numbers for custom),
Argument 2 (probability for every edge in Erdos-Reny GNP and geometric, number of edges for Erdos-Reny GNM, m for Barabasi, probability of rewiring for small world, 0 for complete and custom),
Output (probability, unconditional, conditional, or all).

We have also provided a config file in the release directory named configbash.sh, in which one can define all input parameters. The config file can then be run by ./configbash.sh

An example of the config file (configbash.sh):

Update="Bd"
popSize="4"
direction="undirected"
fitness="2.0"
category="ER"
arg1="GNP"
arg2="0.5"
output="unconditional"
 
./fixating $Update $popSize $direction $fitness $category $arg1 $arg2 $output

#License See LICENSE for details.