This repository contains the implementation of the computational model of BER mechanism, as described in [paper]
- KaSim 3.5
- Python 2.7
- simplejson
Main entry point is the "run.py" file. It requires the user to specify the run mode as it's first command line argument, e.g:
$ python run.py [mode]
where mode is one of the following:
synth, which synthesizes sample DNA strands. It supports optional named argument-descriptorthat points to the JSON settings file.simulate, which simulates the BER mechanism. It supports optional named argument-descriptorthat points to the JSON settings file.experiment, which runs a series of experiments. It requires an additional argument that points to a JSON file that describes the experiment.
All values defined in the JSON files can be overridden in command line.
synth and simulate mode have a set of predefined default values.
The supplied JSON file (-descriptor) needs not to define every value,
instead, missing values are filled from the default dictionary.
JSON files are separated into "meta" and "data" top-level keys.
"meta" defines the "meta" values, used to direct output, etc. "data"
is instead used to define values used directly in the simulation.
-
meta:temp_dirdefines the temporary directory used in the synthesis
-
meta:out_dirdefines the output directory
-
meta:outspecifies the filename of the synthesized DNA
-
data:bp_per_stranddefines the number of base pairs per strand
-
data:strandsdefines the number of strands in the output
-
data:weightsdefines the dictionary of weights used when generating the DNA
-
meta:temp_dirdefines the temporary directory used in the simulation
-
meta:out_dirdefines the output directory
-
meta:outspecifies the filename of the trace of the simulation
-
meta:dna_filespecifies the filename of the DNA file, on which the BER is performed
-
meta:time/meta:eventsspecifies the amount of "simulation time"/events used for the simulation
-
meta:plot_pointsspecifies the number of points in the trace of the simulation
-
meta:modelis an array that defines the components used in the simulation:
damage-- damages the DNA file after 1000 eventssliding-- sliding action for the DG actorDG,APE1,POLb,LIG3,XRCC1,PNKP-- actions for the respective actorxrcc_dimerXRCC1 dimerization action
-
meta:sanityused for debugging. Outputs weakly compressed stories of some observables.
-
data:...specifies the kinetic rates used in the simulation -- see rates.xlsx
meta fields are joined with the ones defined before (in simulate).
-
meta:experiment_namedefines the name of the experiment series
-
meta:runsspecifies the number of times the rates are calculated and simulations are performed
-
meta:parallelspecifies the number of simulations to perform in parallel
-
data:constantsspecifies the dictionary of constants used in calculation of rates
-
data:fieldsspecifies the dictionary of fields to generate the rates for. The keys of the dictionary should match the names of the rate variables. The value of each key should be another dictionary with two components
typeandvalue.Currently supported types are:
constant,random_uniform,Kd_constraint.constantcopies the value of thevaluekey as the value of the rate variablerandom_uniformgenerates a uniform random value in the range specified in thevaluekey. The range is defined as a JSON array of three values, the first one is either"int"or"float", followed by the lower bound, and the upper bound. If the first value is missing,"float"is used. You can also use the name of a variable defined in theconstantssection, if the variable defines an array of the form specified before.Kd_constraint, used to impose the K_d constraint on variables that are generated. The value field should be an array, with the rate variable name used as k_off in the first position, followed by Kd ratio.