| Title: | Open Systems Pharmacology Global Sensitivity Package |
|---|---|
| Description: | A global sensitivity analysis for Open Systems Pharmacology models. |
| Authors: | Abdullah Hamadeh (Systems In Silico Ltd.) |
| Maintainer: | Abdullah Hamadeh <[email protected]> |
| License: | GPL-2 |
| Version: | 1.0.0 |
| Built: | 2026-07-15 13:23:38 UTC |
| Source: | https://github.com/Open-Systems-Pharmacology/OSPSuite.GlobalSensitivity |
A named list of distribution constructors used to create
distribution objects for global sensitivity analyses. Each element is a
constructor function returning a distribution object: Uniform,
LogUniform, Normal and LogNormal.
distributiondistribution
A named list of distribution constructor functions.
Function to generate a bar graph of EFAST sensitivity analysis results.
generateEFASTBarGraph(gsaResultsDataframe)generateEFASTBarGraph(gsaResultsDataframe)
gsaResultsDataframe |
EFAST results returned by the |
A list of ggplot bar graphs, one corresponding to each output path/PK parameter combination.
Function to generate a plot of Morris sensitivity analysis.
generateMorrisPlot(morrisResults, logPlot = FALSE)generateMorrisPlot(morrisResults, logPlot = FALSE)
morrisResults |
Morris sensitivity results returned by |
logPlot |
Logical setting. The Morris results are plotted on a logarithmic scale if |
A list of ggplots of Morris sensitivity analysis results, one corresponding to each output path/PK parameter combination.
Function to generate a bar graph of Sobol sensitivity analysis results.
generateSobolBarGraph(gsaResultsDataframe)generateSobolBarGraph(gsaResultsDataframe)
gsaResultsDataframe |
Sobol results returned by the |
A list of ggplot bar graphs, one corresponding to each output path/PK parameter combination.
Function to generate a tornado plot of local sensitivity analysis or uncertainty analysis results.
generateTornadoPlot( sensitivityDataFrame, generateForUncertaintyAnalysis = FALSE )generateTornadoPlot( sensitivityDataFrame, generateForUncertaintyAnalysis = FALSE )
sensitivityDataFrame |
Sensitivity or uncertainty analysis results returned by |
generateForUncertaintyAnalysis |
Logical value. If |
A list of ggplot tornado plots results, one corresponding to each output path/PK parameter combination.
Generates a matrix of contour plots visualizing the pairwise response surfaces of model outputs based on eFAST sensitivity analysis results.
getContourPlot(efastResults, jitterSize = 0, gridSize = 40, logScale = TRUE)getContourPlot(efastResults, jitterSize = 0, gridSize = 40, logScale = TRUE)
efastResults |
A list object containing the complete results of an eFAST sensitivity analysis. Expected structure:
|
jitterSize |
A numeric value representing the noise magnitude added during interpolation.
Passed to |
gridSize |
An integer specifying the resolution of the contour grids. Defaults to 40. |
logScale |
Logical. If |
This function creates a visualization tool to identify parameter interactions and non-linearities. The process involves:
Iterating through every unique Output and PK parameter (e.g., "C_max", "AUC") in the results.
For each Output/PK combination, extracting the relevant simulation data.
Calling getPairwiseGrid to generate interpolated surfaces for all parameter pairs.
Optionally applying a log-transformation to the response values (Z-axis) to handle wide dynamic ranges common in PK/PD.
Ranking parameters based on their Total Sensitivity index ($S_T$) so that the most influential parameters appear in the top-left of the plot matrix.
Constructing a ggplot2 object using geom_contour_filled and
facet_grid to display the full matrix of pairwise interactions.
The resulting plot is a scatterplot matrix where:
Off-diagonal cells display filled contours of the response surface for two parameters.
Diagonal cells display the names of the parameters.
A nested list of ggplot objects, structured as:
plotList[[outputName]][[pkParameter]].
Each element is a complete ggplot object ready for printing or saving.
R6 class, child class of SADistribution, defining a statistical lognormal distribution object
ospsuite.globalsensitivity::SADistribution -> LogNormalDistribution
typeis the type of the probability distribution.
meanThe mean of the lognormal distribution.
CVThe coefficient of variation of the lognormal distribution.
new()
Create a new LogNormalDistribution object.
LogNormalDistribution$new(mean, CV)
meanThe mean of the lognormal distribution.
CVThe coefficient of variation of the lognormal distribution.
An instance of the LogNormalDistribution class.
quantilesToSample()
Maps a vector of quantiles to corresponding values from the lognormal distribution.
LogNormalDistribution$quantilesToSample(quantiles)
quantilesVector of quantiles.
A vector of values from the lognormal distribution corresponding to the input quantiles.
clone()
The objects of this class are cloneable with this method.
LogNormalDistribution$clone(deep = FALSE)
deepWhether to make a deep clone.
R6 class, child class of SADistribution, defining a statistical loguniform distribution object
ospsuite.globalsensitivity::SADistribution -> LogUniformDistribution
typeis the type of the probability distribution.
minimumThe maximum of the loguniform distribution.
maximumThe maximum of the loguniform distribution.
new()
Create a new LogUniformDistribution object.
LogUniformDistribution$new(minimum, maximum)
minimumThe minimum of the loguniform distribution.
maximumThe maximum of the loguniform distribution.
An instance of the LogUniformDistribution class.
quantilesToSample()
Maps a vector of quantiles to corresponding values from the loguniform distribution.
LogUniformDistribution$quantilesToSample(quantiles)
quantilesVector of quantiles.
A vector of values from the loguniform distribution corresponding to the input quantiles.
clone()
The objects of this class are cloneable with this method.
LogUniformDistribution$clone(deep = FALSE)
deepWhether to make a deep clone.
R6 class, child class of SADistribution, defining a statistical normal distribution object
ospsuite.globalsensitivity::SADistribution -> NormalDistribution
typeis the type of the probability distribution.
meanThe mean of the normal distribution.
stdvThe standard deviation of the normal distribution.
new()
Create a new NormalDistribution object.
NormalDistribution$new(mean, stdv)
meanThe mean of the normal distribution.
stdvThe standard deviation of the normal distribution.
An instance of the NormalDistribution class.
quantilesToSample()
Maps a vector of quantiles to corresponding values from the normal distribution.
NormalDistribution$quantilesToSample(quantiles)
quantilesVector of quantiles.
A vector of values from the normal distribution corresponding to the input quantiles.
clone()
The objects of this class are cloneable with this method.
NormalDistribution$clone(deep = FALSE)
deepWhether to make a deep clone.
Run the EFAST algorithm.
runEFAST( simulation, DDIsimulation = NULL, parameters, outputs, runParallel = TRUE, numberOfResamples = 1, updateProgress = NULL, saveResults = FALSE, saveFolder = NULL, saveFileName = NULL )runEFAST( simulation, DDIsimulation = NULL, parameters, outputs, runParallel = TRUE, numberOfResamples = 1, updateProgress = NULL, saveResults = FALSE, saveFolder = NULL, saveFileName = NULL )
simulation |
PKML simulation object. |
DDIsimulation |
DDI PKML simulation object. |
parameters |
List of |
outputs |
List of |
runParallel |
Logical value. EFAST sensitivity computation is run in parallel when |
numberOfResamples |
Number of times to run the EFAST algorithm steps with resampling, as per Saltelli, Tarantola & Chan, 1999. |
updateProgress |
Logical value. Updates shiny app GUI with EFAST progress when |
saveResults |
Logical value. Results are saved if |
saveFolder |
Folder in which results will be saved if |
saveFileName |
File name to which results will be saved if |
Results of EFAST evaluation.
Function to run Shiny App GUI interface to ospsuite.globalsensitivity package.
runGUI()runGUI()
Function to run Morris sensitivity analysis.
runMorris( simulation, DDIsimulation = NULL, parameters, outputs, numberOfSamples, runParallel = TRUE, updateProgress = NULL, saveResults = FALSE, saveFolder = NULL, saveFileName = NULL )runMorris( simulation, DDIsimulation = NULL, parameters, outputs, numberOfSamples, runParallel = TRUE, updateProgress = NULL, saveResults = FALSE, saveFolder = NULL, saveFileName = NULL )
simulation |
PKML simulation object. |
DDIsimulation |
DDI PKML simulation object. |
parameters |
List of |
outputs |
List of |
numberOfSamples |
The number of runs of the Morris algorithm to perform. |
runParallel |
Logical value. Morris computation is run in parallel when |
updateProgress |
Logical value. Updates shiny app GUI with Morris algorithm progress when |
saveResults |
Logical value. If |
saveFolder |
String indicating the path to the folder in which the results are to be saved. |
saveFileName |
String indicating the file name to use when saving the results. |
Morris sensitivity analysis results.
Function to run Sobol sensitivity analysis.
runSobol( simulation, DDIsimulation = NULL, parameters, outputs, numberOfSamples, runParallel = TRUE, updateProgress = NULL, saveResults = FALSE, saveFolder = NULL, saveFileName = NULL )runSobol( simulation, DDIsimulation = NULL, parameters, outputs, numberOfSamples, runParallel = TRUE, updateProgress = NULL, saveResults = FALSE, saveFolder = NULL, saveFileName = NULL )
simulation |
PKML simulation object. |
DDIsimulation |
DDI PKML simulation object. |
parameters |
List of |
outputs |
List of |
numberOfSamples |
The number of samples in parameter space at which to evaluate the simulation. |
runParallel |
Logical value. Sobol computation is run in parallel when |
updateProgress |
Logical value. Updates shiny app GUI with Sobol algorithm progress when |
saveResults |
Logical value. If |
saveFolder |
String indicating the path to the folder in which the results are to be saved. |
saveFileName |
String indicating the file name to use when saving the results. |
Sobol sensitivity analysis results.
Function to run sensitivity analysis and then run uncertainy analysis for parameters deemed sensitive. Main parameters:
runSU( simulation, DDIsimulation = NULL, customParameters = NULL, outputs, evaluateForAllParameters = FALSE, variationRange = 0.1, numberOfSensitivityAnalysisSteps = 2, sensitivityThreshold = 0.1, runUncertaintyAnalysis = TRUE, runUncertaintlyOnlyForSensitiveParameters = TRUE, numberOfUncertaintyAnalysisSamples = 100, quantiles = c(0.05, 0.5, 0.95), saveResults = FALSE, saveFolder = NULL, saveFileName = NULL, runParallel = TRUE, updateProgressSensitivity = NULL, updateProgressUncertainty = NULL )runSU( simulation, DDIsimulation = NULL, customParameters = NULL, outputs, evaluateForAllParameters = FALSE, variationRange = 0.1, numberOfSensitivityAnalysisSteps = 2, sensitivityThreshold = 0.1, runUncertaintyAnalysis = TRUE, runUncertaintlyOnlyForSensitiveParameters = TRUE, numberOfUncertaintyAnalysisSamples = 100, quantiles = c(0.05, 0.5, 0.95), saveResults = FALSE, saveFolder = NULL, saveFileName = NULL, runParallel = TRUE, updateProgressSensitivity = NULL, updateProgressUncertainty = NULL )
simulation |
PKML simulation object. |
DDIsimulation |
DDI PKML simulation object. |
customParameters |
List of |
outputs |
List of |
evaluateForAllParameters |
Logical value. If |
variationRange |
The variation range used to define the log-uniform distribution of the parameters in |
numberOfSensitivityAnalysisSteps |
Positive integer. Number of steps at which the model is simulated within a parameter's |
sensitivityThreshold |
Positive numeric value. The threshold sensitivity above which a parameter will undergo uncertainty analysis if |
runUncertaintyAnalysis |
Logical value. If |
runUncertaintlyOnlyForSensitiveParameters |
Logical value. If |
numberOfUncertaintyAnalysisSamples |
Positive integer value giving the number of Monte Carlo runs for each parameter. |
quantiles |
Vector of numerical values between 0 and 1. The |
saveResults |
Logical value. If |
saveFolder |
String indicating the path to the folder in which the results are to be saved. |
saveFileName |
String indicating the file name to use when saving the results. Parallel run and updating settings |
runParallel |
Logical value. Sensitivity computation is run in parallel when |
updateProgressSensitivity |
Logical value. Updates shiny app GUI with sensitivity analysis progress when |
updateProgressUncertainty |
Logical value. Updates shiny app GUI with uncertainty analysis progress when |
Sensitivity and uncertainty analysis results.
R6 class defining a model output object
pathis the path to the output within the simulation PKML simulation.
displayNameis the display name for the output in lieu of the output path in the simulation PKML simulation.
pkParameterListThe list of PK parameters for this instance of the SAOutput.
dimensionThe dimension of this instance of the SAOutput.
unitThe display unit of this instance of the SAOutput.
new()
Create a new SAOutput object.
SAOutput$new(simulation, path, displayName = NULL, unit = NULL)
simulationsimulation A PKML simulation in which the parameter exists.
pathA PKML simulation in which the output exists.
displayNameA shorthand string for the output that substitutes for the path for display purposes.
unitA valid OSP unit that will be the display unit for this instance of the SAOutput object.
An instance of the SAOutput class.
addPKParameter()
Add PK parameter to be evaluated for the SAOutput instance.
SAOutput$addPKParameter( standardPKParameter, pkParameterDisplayName = NULL, startTime = NULL, endTime = NULL )
standardPKParameterA standard PK parameter selected from among the list of strings in ospsuite::allPKParameterNames().
pkParameterDisplayNameA shorthand string for the parameter that substitutes for the path for display purposes.
startTimeStart time within the simulation run for calculation of the PK parameter.
endTimeEnd time within the simulation run for calculation of the PK parameter.
clone()
The objects of this class are cloneable with this method.
SAOutput$clone(deep = FALSE)
deepWhether to make a deep clone.
R6 class defining a parameter object
pathis the path to the parameter within the simulation PKML simulation.
displayNameis the display name for the parameter in lieu of the parameter path in the simulation PKML simulation.
dimensionis the dimension of the parameter in the simulation PKML simulation.
unitis the unit of the parameter in the simulation PKML simulation.
distributionis the distribution of the parameter
new()
Create a new SAParameter object.
SAParameter$new( simulation, path, displayName = NULL, unit = NULL, parameterDistribution = NULL, defaultVariationRangeForLogUniformDistributions = 0.1 )
simulationsimulation A PKML simulation in which the parameter exists.
pathA PKML simulation in which the parameter exists.
displayNameA shorthand string for the parameter that substitutes for the path for display purposes.
unitA valid OSP unit used to interpret the numerical values that are input into the parameterDistribution object, such as the mean and standard deviation of a normal distribution.
parameterDistributionA SADistribution object specifying the probability distribution of the parameter.
defaultVariationRangeForLogUniformDistributionsWhen no parameterDistribution is specified, a loguniform distribution is assumed with multiplicative variation range given by defaultVariationRangeForLogUniformDistributions.
An instance of the SAParameter class.
clone()
The objects of this class are cloneable with this method.
SAParameter$clone(deep = FALSE)
deepWhether to make a deep clone.
R6 class, child class of SADistribution, defining a statistical uniform distribution object
ospsuite.globalsensitivity::SADistribution -> UniformDistribution
typeis the type of the probability distribution.
minimumThe minimum of the uniform distribution.
maximumThe maximum of the uniform distribution.
new()
Create a new UniformDistribution object.
UniformDistribution$new(minimum, maximum)
minimumThe minimum of the uniform distribution.
maximumThe maximum of the uniform distribution.
An instance of the UniformDistribution class.
quantilesToSample()
Maps a vector of quantiles to corresponding values from the uniform distribution.
UniformDistribution$quantilesToSample(quantiles)
quantilesVector of quantiles.
A vector of values from the uniform distribution corresponding to the input quantiles.
clone()
The objects of this class are cloneable with this method.
UniformDistribution$clone(deep = FALSE)
deepWhether to make a deep clone.