-
Notifications
You must be signed in to change notification settings - Fork 0
TruthTable.R
TruthTable.R
is a script to simulate a rxncon model (or specific module(s) within a model) under all possible combinations of a given set of inhibitors and activators to see their effect on selected output nodes. Values for selected output nodes range from 0 (never on in attractor) to 1 (always on in attractor)
Run TruthTable.R
by sourcing it directly (./TruthTable.R
) or with Rscript
(Rscript ./TruthTable.R
).
Parameters should be set in a config file (TruthTable.R /path/to/config.R
, see below for config file format)
-
file
: Path to master rxncon file. -
driveFile
: Name or URL of master rxncon file on Google Drive (mutually exclusive withfile
) -
modules
: Comma-separated modules to be loaded from master rxncon file. Omit this argument or leave it blank to load all modules. -
minQuality
: Minimum quality for a rxncon rule to be loaded, default: 0. Rules without a quality tag are always loaded -
out
: Folder to which output files will be written, default:./
-
inputInhibs
: List of nodes to be inhibited (i.e. forcibly set to "on") -
inputStimuli
: List of nodes to be activated (i.e. forcibly set to "off") -
outputs
: List of nodes to be monitored for the effects of inhibitor and activator combinations
At times, it may be necessary to match multiple rxncon nodes that are closely related (e.g. when inhibiting a protein kinase that phosphorylates many substrates). In that case, it is possible to use the wildcard (*
) operator. This operator matches any string in its place in a non-greedy way (effectively the same as .*?
in regex).
Config files should be .R
files following this general format:
config <- list(
arg1 = "string value",
arg2 = FALSE,
arg3 = 23,
arg4 = c("val1", "val2", "val3")
...
)
See inst/scripts/examples/.../TruthTableConfig.R
for examples.
TruthTable.R
will output the following files:
- Temporary
modules*
files: These files are generated by rxncon and can be used for manual simulation of the system using BoolNetSim.R -
truth_table.csv
: Acsv
file showing the results of simulating the system under each possible combination ofinputStimuli
andinputInhibs
. Each row represents a different combination of the inputs. Columns represent output nodes selected inoutputs
, with an additional two columns,stimuli
andinhibitors
, containing comma separated lists of the stimuli and inhibitors applied in that simulation. -
truth_table.pdf
: A graphical representation of the results. Thin columns on the left represent the presence or absence of the stimulus/inhibitor, columns on the right represent the values of outputs when simulated under the specific combination of stimuli/inhibitors.