
UCSB’s BioSens:
A Toolkit for Sensitivity Analysis
(A Contribution to the Bio-SPICE Project)
Version 2.2
BioSens is a general purpose sensitivity analysis tool that provides
a Matlab GUI interface. To simulate the dynamics of a biological system,
BioSens uses one of two ODE-solvers – XPP or DASPK. XPP is a collection of differential
equations solvers, developed by Bard Ermentrout at the
Sensitivity analysis investigates the changes in the system outputs or behavior with respect to the parameter variations, which are quantified by the sensitivity coefficients S. Mathematically, the sensitivity coefficients are the first order derivatives of the outputs with respect to the system parameters:
![]()
where yi is
the i-th output and pj is the j-th parameter. When the model is
described by an ordinary differential equation
, the sensitivity matrix S
can be derived from the model according to
![]()
This sensitivity equation is solved directly in the implementation of the DASPK code. For XPP models, the toolkit implements centered difference approximation to compute the sensitivity coefficients:
![]()
The parameter perturbation magnitude Δp should be small enough to ensure small truncation error in the finite difference approximation, and large enough to reduce dependence on the simulation inaccuracies. We recommend using SBML models, as DASPK’s computation of the sensitivities is more accurate.
BioSens also includes Fisher Information Matrix (FIM)-based sensitivity analysis. Though the FIM was originally used to represent the amount of information contained in a given set of signals/measurements about the model parameters, it also can be interpreted as a consolidation of the system sensitivities. In this case, the FIM takes into account the underlying distributive nature of states or measurements due to the inherent stochasticity of cellular processes involving reactions with low copy number of substrates (McAdams, H. H. and A. Arkin, Trends Genet. 15:65-9, 1999) as well as noise in the measurements. The FIM-based sensitivity measures can give insights into the robustness and fragility trade off in biological regulatory structures based on the rank-ordering of the sensitivities (Stelling, J., E. D. Gilles and F. J. Doyle III, PNAS.101:13210-15, 2004). For ease of use, BioSens functionalities are accessible through a Matlab graphical user interface.
In addition, BioSens provides a measurement selection tool that selects the optimal measurement set for maximum parameter identifiability and accuracy. The purpose of this tool is to provide a feedback from a biological model to guide the next experiment for parameter refinement. The tool also uses the FIM, but here in the original interpretation as a measure of information. Given a limited set of measurements and their approximate accuracies, the tool can maximize two possible criteria for information (D- or A-optimality) such that the parameter estimation problem based on the measurements will give the most identifiable parameter set and the highest accuracy. Such tool allows an iterative procedure for model identification in which the knowledge from each iterate will be used to better design the next experiment for model refinement.
For more information about sensitivities and Fisher Information Matrix, the user can consult the following references:
· A. Varma, M. Morbidelli and H. Wu, Parametric Sensitivity in Chemical Systems, Cambridge University Press, Cambridge, U.K., 1999.
·
L. Ljung, System Identification: Theory for the User, 2nd. Ed., PTR Prentice Hall,
For
more information about XPP and DASPK, consult:
·
XPP:
http://www.math.pitt.edu/~bard/XPP/XPP.html
·
DASPK:
http://www.engineering.ucsb.edu/~cse/software.html
This is used to parse the SBML input files.
Note: There are two versions of the libSBML – one that uses the Xerces XML parser, and one that uses Expat. We use the Xerces version.
DASPK is a collection of Fortran 77 routines that solve and perform sensitivity analysis on ordinary differential equations (ODE’s) and differential algebraic equations (DAE’s) s. It is subject to copyright restrictions, but is available for research purposes.
Tapenade is an automatic differentiation package used to make DASPK simulations more efficient (by providing the Jacobian matrix of the system). It has been implemented as an on-line tool, but it is possible to download the .jar files and install it locally. If automatic differentiation is to be used, BioSens requires Tapenade to be installed locally. If Tapenade is not installed, then DASPK can approximate the Jacobian numerically.
Selection of these packages will automatically install other supporting packages.
Note: If you already have cygwin installed, it may be necessary to reinstall it to make sure the version is recent enough. There are problems calling Tapenade with older versions of cygwin.
Download and run the libSBML
installer, using the typical installation method. Be sure the java bindings are installed.
Note: There are two versions of libSBML – one based on Xerces and the
other based on Expat. We use the
Xerces version. As of May 2005, the
Windows installer for libSBML includes Xerces, making this installation the
simplest. We downloaded
libsbml-2.3.4-win-xerces.exe and installed it using the installation program.
1. Create the root DASPK directory (e.g. C:\DASPK).
2. Go to http://www.engineering.ucsb.edu/~cse/software.html.
3. Download daspk31.tgz by right-clicking on the link to DASPK 3.0. Select Save-As and save the file as daspk31.tgz in the root DASPK directory you just created.
4. In cygwin’s BASH shell, the package can be expanded using the commands:
gunzip
daspk31.tgz
tar -xf daspk31.tar
5. There is no need to compile the code at this time. BioSens will do that for you.
It is possible to run BioSens with XPP-based tools only. In this case, one needs to have only Matlab, BioSens.zip, and xpp available to them. This option is designed for users who do not have Administrator privilege, those who have only small models, and/or those who are running in a Unix environment (Note: full installation should soon be available for Unix).
If the user has input files in SBML, then libSBML and java must be installed. This is a simple task for Windows, but is more complicated with Unix.
BioSens is run via a Matlab script:
1. Open Matlab and change to the “matlab” subdirectory of the BioSens directory tree.
2. From
the command line type “BioSens”.
If this is the first time BioSens is loaded, the Preferences Tool will be
opened and the user will be prompted for the location of five folder/files:
Note: For the partial (XPP-only) installation, simply leave the DASPK and Tapenade paths blank.
This path information is physically stored in the preferences file
(BioSensToolPrefs.txt) under Matlab’s default preference folder
(specified by Matlab’s prefdir function).
The Preferences Tool also provides the option of having status messages written to Matlab’s Command Window (in addition to the status bar at the bottom of each tool). This is available because Matlab’s Command Window often displays messages before the tool’s user interface displays them.

The main window of BioSens allows the user to:

Details:
It is worth noting that there is no need for the writer of an SBML file to determine which species are independent (require an ODE) and which species are dependent (can be computed algebraically from concentrations of other species). BioSens will automatically detect dependent species. The code for this is based on Herbert Sauro's Structural Analysis Part II: Conservation Relations and modeled after the implementation by Marc Vass (as part of the JigCell project).
When BioSens reads in an SBML file, it invokes a parser to generate both *.ode and internal *.bsn versions of the model. It then automatically load the *.bsn version of the file, which user can (and should) use the in subsequent runs.
References
· http://www.cds.caltech.edu/~hsauro/Algorithms/struct1.pdf
· http://jigcell.biol.vt.edu/
*.bsn is a text format designed to minimize the time required to load a model into BioSens. This means the easiest and most efficient way to use BioSens is to load in the SBML version of a file the first time you analyze it in BioSens. Thereafter, load the .bsn version of the model.
BioSens will create a working directory which will store the simulation data and the analysis results. If the selected directory exists, BioSens will load up saved simulations and results from the past run. The user can choose to clear up the working directory for a new run.
Using the sensitivity matrix, this tool allows selection of the optimal measurement set to maximize parameter accuracy and identifiability.

The Options dialog box (accessible through Edit menu) allows the user to change the default values for several BioSens parameters, as well the option to keep or delete temporary files. These settings can be changed on a “per session” basis, or, more permanently, by saving them to a file.

Details:
o Defaults: Restore the Options to the factory default settings.
o Apply Options: Upload the settings to the current BioSens window. These values will be used as default until the BioSens window is closed.
o
Save Options: Upload the settings in the current
BioSens window and save the settings for future BioSens sessions.
Note: The Options file (BioSensToolOptions.txt) is located in the folder
returned by the Matlab function “prefdir”.
o Close: Close the Options tool.
o Delete intermediate ODE files Checkbox: If checked, all temporary model *.ode files used in finite difference approximation will be deleted.
o Delete intermediate DAT files Checkbox: If checked, all temporary XPP simulation output *.dat files will be deleted.

The controls in this frame allow the user to adjust the nominal values for each initial condition of the states in the model and select the initial condition whose sensitivities should be computed.
This table shows the parameters for DASPK simulations:
![]()
The options dialog under edit menu allows adjustments of the default values of simulation parameters. The functionality is similar to the XPP options.

The Plot Tool provides the ability to visualize the system dynamics and the sensitivities. This tool can be accessed from both the main BioSens and the XPP/DASPK simulation windows. It is possible to view:



The FIM Tool provides the interface to compute the Fisher Information Matrix from the sensitivity matrix and user-provided standard deviations. The standard deviations represent the amount of noise in the measurements (in this case, the states). Under the Gaussian assumption, the FIM is computed according to:
FIM = STV-1S
where S is the sensitivity matrix and V is the covariance matrix:

and

such that n is the number states and NT is the total number of time steps. The FIM tool uses the Relative Error and Absolute Error to compute the standard deviation for the i-th state according to:
si,j = relative_errori × yi,j + absolute_errori
where yi,j
is the nominal value of state i at
time step j.
The FIM Tool is shown in the following figure. The user can edit the relative error for all states on the current page by setting the “Default Relative Error” field and clicking the “Apply to Page” button. To edit all the relative error for all states in the model, press the “Apply to All” button. Likewise, the user can edit the absolute error for all states on the current page, or all states in the model using the “Default Absolute Error” field and its related buttons.

If the resulting FIM has moderate size, then it is displayed in a dialog box such as shown here:

Clicking the button “Display Sensitivity Measure” will bring up the sensitivity rankings window. The FIM diagonal rankings are computed from the diagonal entries of the normalized FIM:
![]()

where pi is the nominal parameters and m is the number of parameters.
The sensitivity measures can be sorted by the order of appearance in the BioSens main window, or by the FIM sensitivity measures by checking the appropriate choice.

The purpose of this tool is to select the states in the model which represent the optimal (noisy) measurement set for parameter estimation. BioSens provides two choices of optimality criteria, practical identifiability and D-optimality. In practical identifiability, the optimal set is selected to give the best parameter accuracy as measured by the standard deviations. According to the Cramer-Rao theorem, the (inverse of) Fisher Information Matrix gives the lower bound for the variances in the parameter estimates from which the standard deviations can be computed. On the other hand, D-optimality criterion uses the determinant of the FIM as a measure of the information content in the states. Maximizing this criterion corresponds to maximizing the volume of information and thus the accuracy of the parameter estimates. In both cases, the number of identifiable parameters is maximized preceding to the optimization of the criteria.
The selection process is divided in steps.

Note that the parameters that will appear in the first step depend on the selection of parameters to which the sensitivities were computed and available, i.e., the parameters in the sensitivity computation step by either XPP or DASPK.
Output Files:
The workspace directory will contain the following files:
The columns of the sensitivity
matrix consist of the sensitivity coefficients with respect to the model
parameters and initial conditions in the order of the appearance in the BioSens
window. The rows represent the time axis, which can be found in the file t.mat
below. For example, the sensitivity matrix for i-th state of a model with
perturbed parameters
and
perturbed initial
conditions will have the following block structure:

To load the information into Matlab, we use the code:
S =
load(fullfile(subdirName,['S',num2str(stateNum),'.mat']));
if isfield(S,'S')
% Collected with Xpp code
S = S.S;
else
% Collected with DASPK code
S = S.ST';
end;
The values are stored in different variables, and with slightly different formats, depending upon which simulator was used.
To load the information into Matlab, we use the code: