Setup

First, load the libraries needed for the workflow

library(tidyverse)
library(CoRC)

Input

Put in all variables needed to customise the workflow

Put in the path to the model (SBML), as url or local path (as string) and load the model. Use loadModel() for .cps models.

modelPathSBML   <- "./Models/Schaber2012SUP_model.xml"
model           <- loadSBML(modelPathSBML)

Define the subtask. Has to be one of “SteadyState”, “TimeSeries”, “ParameterEstimation”, “Optimization”.

subtask         <- "SteadyState"

Set Sensitivity Method settings.

delta_factor    <- 0.001
delta_minimum   <- 1E-12

Define the effect (can be any of EMPTY_LIST, SINGLE_OBJECT, ALL_VARIABLES, NON_CONST_METAB_CONCENTRATIONS, NON_CONST_METAB_NUMBERS, METAB_CONC_RATES, METAB_PART_RATES, NON_CONST_GLOBAL_PARAMETER_VALUES, REACTION_PART_FLUXES, REDUCED_JACOBIAN_EV_RE, REDUCED_JACOBIAN_EV_IM).

effect          <- "NON_CONST_METAB_CONCENTRATIONS"

Define the cause and (if applicable) secondary cause (can be any of “SINGLE_OBJECT”, “ALL_LOCAL_PARAMETER_VALUES”, “ALL_PARAMETER_VALUES”, “METAB_INITIAL_CONCENTRATIONS”).

cause           <- "ALL_PARAMETER_VALUES"
secondary_cause <- NULL

Do you want to save the result as a RDS object? Also give the file, where you want to save it.

save           <- TRUE
file           <- "docs/Sens_Schaber"

Workflow

This should generally not need to be changed, only if the workflow is to be changed more generally.

# Run Sensitivity
Sens_result <- runSensitivities(model           = model, 
                                subtask         = subtask, 
                                delta_factor    = delta_factor,
                                delta_minimum   = delta_minimum,
                                effect          = effect,
                                cause           = cause,
                                secondary_cause = secondary_cause)

# Save result
if (save){
  saveRDS(Sens_result, 
          file = file)
}

Output

This workflow produces the following output:

Result:

Sens_result$main$annotated_result
#>      (T -> Tp; S).k (Tp -> T).k1
#> [S]        0.000000     0.000000
#> [T]       -2.498751     2.498751
#> [Tp]       2.498751    -2.498751

Scaled Result:

Sens_result$main$annotated_scaled_result
#>      (T -> Tp; S).k (Tp -> T).k1
#> [S]       0.0000000    0.0000000
#> [T]      -0.4997501    0.4997501
#> [Tp]      0.4997501   -0.4997501

Collapsed Result:

Sens_result$main$annotated_collapsed_result
#>                    Value
#> (T -> Tp; S).k 0.7067534
#> (Tp -> T).k1   0.7067534