Skip to contents

Model and data

Functions for loading model and data and construct a mathematical model (ODE or stochastic) and corresponding code.

uqsa_example()
Load an example model for this package
model_from_tsv()
model_from_tsv loads the content from a series of tsv files
as_ode()
Interpret a model as an ODE
generateCode()
Write C code
write_and_compile()
Writes code to file and compiles
makeGillespieModel()
makeGillespieModel interprets the provided SBtab file as a stochastic model
generateGillespieCode()
Generate C Code to solve a model stochastically
generateRCode()
Write R code
values()
Find values in a data.frame that is derived from a tsv file or similar
experiments()
Extract Measured Data and Simulation Experiment Instructions
standard_error_matrix()
Standard Error Matrix from an errors object
checkModel()
checkModel tries to establish the simulation file for a given model
conservation_law_analysis()
Reduce the size of the system
parameterConversion()
Returns information about parameter conversion
replace_powers()
replace_powers
stoichiometry()
This function returns a list of named stoichiometric vectors
unit.from.string()
Unit Interpreter
unit.id()
Converts a unit to a string that works as an identifier
unit.info()
Prints an interpretation string of a unit
unit_as_character()
converts a unit data.frame into a printable string
units_from_table()
Get units from a data.frame column
yJacobian()
Jacobian of string-math
yacasMath()
yacasMath converts math to Ryacas compatible math

Simulations

Functions for simulating the model

simulator.c()
This creates a closure that simulates the model
simstoch()
Simulate stochastic model
simfi()
This creates a closure that simulates the model, similar to simulator.c
scrnn()
scrnn returns a closure around gsl_odeiv2_CRNN()
gsl_odeiv2_fi()
simulates an ode model with extra work
gsl_odeiv2_CRNN()
simulates a CRNN ode model with extra work

Prior

Functions for constructing priors

rNormalPrior()
rNormalPrior returns a random vector generator
rUniformPrior()
rUniformPrior returns a random vector generator
rCopulaPrior()
rCopulaPrior returns a function that generates random values from the copula model
dNormalPrior()
dNormalPrior creates the density function of a multivariate normal distribution with independent components
dUniformPrior()
dUniformPrior creates a uniform density function
dCopulaPrior()
dCopulaPrior creates a prior probability density function
gNormalPrior()
gNormalPrior creates the gradient function of a multivariate normal distribution with independent components, in log-space
fitCopula()
Makes a Probability Density Estimate (from a sample)
makeIndepCopula()
Copula Formulation for Uniform Prior Distributions
sampleWithNoise()
(for testing) A non-Copula sampling function as fallback

Uncertainty quantification - likelihood based

MCMC methods for Bayesian parameter inference

mcmc()
Markov Chain Monte Carlo
mcmc_init()
Initialize the Markov chain
mcmc_mpi()
The MPI version of the mcmc function
metropolis_update()
Metropolis Update is an MCMC update function
high_level_metropolis()
High Level Metropolis function
smmala_update()
SMMALA Update is an MCMC update function
smmala_move()
SMMALA move
smmala_move_density()
SMMALA transition kernel density
high_level_smmala()
High Level SMMALA function
logLikelihoodFunc()
Default log-likelihood function
gradLogLikelihoodFunc()
Default log-likelihood function, gradient
ll()
Default Log-likelihood Function
gllf()
Default gradient-log-likelihood Function
fi()
Default gradient-Log-likelihood Function
tune_step_size()
Find a good Step-Size for a given MCMC Algorithm
change_temperature()
Should 2 Markov chains exchange their temperatures
pbdMPI_bcast_reduce_temperatures()
Broadcast to other ranks and swap temperatures with any of them
loadSubSample_mpi()
This function merges mpi-samples into one
loadSample_mpi()
This function merges mpi-samples into one
gatherSample()
gatherSample collects all sample points, from all files, with the given temperature
gatherReplicas()
gatherReplicas collects all sample points, from all files, which are assumed to be exact replicas, with different seeds (and possibly sizes). This function uses mclapply to process the files, which may be quicker than gatherSample. The temperature is disregarded, assuming that no parallel tempering was used. To facilitate the loading of a very big sample, this function will analyse the auto-correltation within each file and returned a thinned subsample of size N/2*tauint (effective sample size). There is no need to further reduce the rfesult.

Uncertainty quantification - ABC

Approximate Bayesian Computation (ABC) MCMC for parameter inference

makeObjective()
creates Objective functions from ingredients
preCalibration()
Determine a starting value for ABC's delta
ABCMCMC()
Performs and Approximate Bayesian Computation Sampling of Model Parameters
checkFitWithPreviousExperiments()
ABC acceptance of currently sampled values given old data (Prior)

Global Sensitivity Analysis

gsa_binning()
Global Sensitivity Analysis
gsa_saltelli()
Outputs the global sensitivity scores SI and SIT, calculated by the Sobol-Homma-Saltelli method
saltelli_prior()
Sample for the Sobol-Homma-Saltelli Global Sensitivity Analysis

Parameter mappings

Parameter transformations from sampling space back to model space

logParMap()
NATURAL LOG parameter mapping used by the MCMC module
logParMapJac()
NATURAL LOG parameter mapping, jacobian
log10ParMap()
LOG10 parameter mapping used by the MCMC module
log10ParMapJac()
LOG10 parameter mapping, jacobian
log2ParMap()
LOG2 parameter mapping used by the MCMC module
log2ParMapJac()
LOG2 parameter mapping, jacobian

Operators and helper functions

`%@%`
Fetch an Attribute
`%as%`
%as% is a binary operator on strings with units in them
`%has%`
checks whether a variable has the named attributes
`%otherwise%`
This function can be used to specify default values
determinePrefix()
Determine a prefix from a character vector str of similar contents

Plotting functions

pcDist()
plots a sample in parallel coordinates
plotTimeSeries()
Plot time series simulations with experimental data
plotTimeSeriesBase()
plot function for experiments
sensitivity.graph()
plot the sensitivity matrix
showPosterior()
showPosterior makes a pairs plot for a sample

Internal functions

`modify<-`()
Modifies a value
getDose()
Get the values of the input for a series of dose response experiments
ggplotDoseResponse()
Plot dose response simulations with experimental data
ggplotTimeSeries()
Plot time series simulations with experimental data
ggplotTimeSeriesStates()
Plot time series simulation with state variables
onlyCoefficients()
Returns a list of reaction coefficients
onlyNames()
Returns only the names in a reaction formula
parUpdate()
Updates Parameter Values
simfiGaussianLogLikelihood()
SMMALA -- The default Extractor of the log-likelihood computed by the simfi solver
CRNN()
CRNN creates C code for a chemical reaction neural network
automatic_update()
This function proposes an MCMC candidate variable, and either accepts or rejects the candidate
`base<-`()
Convert to linear space
column()
Get j-th column with names
defaultAcceptance()
default ABC acceptance probability function for one experiment
defaultDistance()
default distance function for one experiment
find_parameter_reaction()
Find the stoichiometry for a given parameter name
flux_matrix()
Creates a Matrix with reaction kinetic entries
formulae()
Find a column that contains some kind of mathematic expression in a data.frame
getMCMCPar()
Selects MCMC scheme specific setup parameters
initialCount()
Initial count of reacting Compounds
is.invertible()
checks whether a given matrix is a valid, invertible fisherInformation
linear_scale()
Interprets a character vector as names of logarithms
moleCountConversion()
This function calculates the conversion from moles to particle counts
observable.mean.in.bin()
The mean value of an observable value given a parameter bin
parameterReaction()
Find the Reaction a parameter appears in
parse_concise()
Read Concise Error Notation
`reaction<-`()
Add a Reaction to an ODE
update_values()
Updates the named values of vector v with values mentioned in data.frame d
writeCFunction()
Write C Function
scaleParameter()
Returns a string that contains code to scale the parameter
simple.unit()
Simple unit from string
sum.of.bin.variance()
Weighted Sum of Bin-specific variances
unit.kind()
find unit category
unit.scale()
Unit scale from SI prefix