Skip to content

TruthTable.R

palmerito0 edited this page Jul 12, 2020 · 7 revisions

TruthTable.R

TruthTable.R is a script that creates a table showing the behavior of a given model under all possible combinations of certain inputs and inhibitors.

Running

Run TruthTable.R by sourcing it directly (./TruthTable.R) or with Rscript (Rscript ./TruthTable.R).

Parameters can be set as command-line arguments (TruthTable.R --arg="value") or in a config file (TruthTable.R --config="/path/to/config.R", see below for config file format). Command-line arguments override parameters set in the config file.

Parameters

  • kboolnetPath: Root directory of the kboolnet repository
  • rxnconPath: Path to directory containing rxncon scripts.
  • file: Path of local master rxncon file
  • driveFile: File name or path of master rxncon file (on Google Drive)
  • modules: Comma-separated modules to be loaded from master rxncon file [default: load all modules]
  • minQuality: Minimum quality for rule to be loaded [default: 0]
  • out: Folder to which output files will be written [default: ./out/]
  • inputStimuli: Comma-separated rxncon names of nodes that serve as stimulus inputs in simulation.
  • inputInhibs: Comma-separated rxncon names of nodes that serve as inhibitor inputs in simulation.
  • outputs: Comma-separated rxncon names of nodes that serve as outputs in simulation.

Config file

Config files should be .R files following this general format:

config <- list(
	arg1 = "string value",
	arg2 = FALSE,
	arg3 = 23
	...
)

Output

TruthTable.R will output the following files:

  • master.xlsx: rxncon file downloaded from Google Drive
  • modules.xlsx: rxncon file containing only the modules loaded by TruthTable.R.
  • modules.boolnet, modules_initial_vals.csv, modules_symbols.csv: BoolNet files generated by rxncon2boolnet.py
  • truth_table.csv, truth_table.pdf: Truth table output in both csv and pdf formats
Clone this wiki locally