This repo contains the source code that realizes the simulation and the algorithm proposed in the paper: Xiao Y, Wu B (2019) Close spatial arrangement of mutants favors and disfavors fixation. PLoS Comput Biol 15(9): e1007212. https://doi.org/10.1371/journal.pcbi.1007212
In the paper, we mentioned that the algorithm could generate "numerical" results of the fixation probability and time. But in fact, we can have the "analytical" results! Please refer to fp_and_derivative-analytical.py
The realization of the proposed algorithm to calculate the fixation probabilities and their derivatives. Note that the sparse matrix method is not adopted here. You may ask for the sparse matrix version by emailing at the authors.
The code of theh proposed algorithm for calculating the conditional fixation time.
The simulation code to evaluate the effectiveness of the algorithm.
To obtain the numerical statistics (like mean and variance) of the simulation.