Use this function to merge the stable states from all boolean models into a single
data.frame
object. The models stable states are loaded from .gitsbe
files that can be found inside the given models.dir
directory.
get_stable_state_from_models_dir(models.dir, all.ss = FALSE)
models.dir | string. A directory with .gitsbe files/models. Do not include the ending path character in the string (/). Only files that include the string gitsbe are parsed. |
---|---|
all.ss | logical. Should all stable states be included in the returned object? Default value is FALSE (only the 1 stable state models are included). |
The format of the returned object depends on the all.ss
value.
If:
all.ss
is FALSE (default): a data.frame
(nxm)
with n models and m nodes. The row names
specify the models names (taken from the file names without the gitsbe
extension) whereas the column names specify the name of the
network nodes (gene, proteins, etc.). Possible values for each model-node
element are either 0 (inactive node) or 1 (active node). If a
.gitsbe file/model has zero (0) or more than 1 stable states, a diagnostic
message is printed and the corresponding model is discarded, i.e. it will not
be included in the returned data.frame
object.
all.ss
is TRUE: a tibble
object where each row
stores a separate stable state and the columns correspond to network nodes
(as before) with an extra last column that has the name of the model that
produced that stable state. As such, models that have multiple stable states
will occupy several rows with the last column having the same name/model.
Models with no stable states are discarded.
models.dir = system.file("extdata", "models", package = "emba", mustWork = TRUE) models.stable.state = get_stable_state_from_models_dir(models.dir)#>models.stable.state = get_stable_state_from_models_dir(models.dir, all.ss = TRUE)