This folder contains simulation data and code for the analysis of the nucleosome model (see SI Section 7). The model was first introduced in: Dodd IB, Micheelsen MA, Sneppen K, Thon G. Theoretical analysis of epigenetic cell memory by nucleosome modification. Cell. 2007 May 18;129(4):813-22. doi: 10.1016/j.cell.2007.02.053. PMID: 17512413. nucleosome_simulation.m is MATLAB code to simulate the nucleosome model for particular choices of parameters. Three examples of interest are indicated within. nucleosome_modification.cpp is the C++ code used to generate the many simulations of the nucleosome model for different values of recruitment probability, p, and neighbourhood size, N. This is the data saved in the folder "nuc". Additional explanations are provided within the code. If run as it is, it will generate 61 x 101 simulations (61 different neighbourhood sizes, 101 values of p) and save the heatmap of the time series data into files denoted "nuc_[neighbour size index]_[probability index]" in the "nuc" folder. It also generates files denoted "z_[neighbour size index]_[probability index]" containing the histogram of the "alignment" of the nucleosome system (i.e., the difference between the number of acetylated and methylated nucleosomes). The figure in SI.7 shows of the curvature of the data for each simulation and the stability (alignment) observed. The analysis of each of the simulations has been summarised into the "curvature" and "stability" files. We have opted to omit the simulation files due to their number/size. The simulation files can be recovered by running the nucleosome_modification.cpp code. Running nucleosome_analysis.cpp afterwards will produce the "curvature" and "stability" files. nucleosome_plot.py produces the figure in SI.7 directly from the available "curvature" and "stability" files and the two simulations available in the "nuc" folder, without the need to run nucleosome_modification.cpp.