sbmlexport
Export SimBiology model to SBML file
Description
sbmlexport( exports a SimBiology
model modelObj)modelObj to a file with a Systems Biology Markup Language (SBML)
Level 3 Version 2 format. The default file extension is .xml, and the
file name matches the model name.
sbmlexport(___,
specifies additional options using one or more name-value arguments for any of the previous
syntaxes.Name=Value)
Examples
Load the lotka model.
sbioloadproject("lotka.sbproj");The model is represented by the variable m1. Show the name of the model.
m1.Name
ans = 'lotka'
Export the model to an SBML file. By default, sbmlexport uses the name of the model as the file name using the default SBML version and generates lotka.xml in the current folder.
sbmlexport(m1);
Specify the output file name and SBML version to use.
sbmlexport(m1,"lotka_2_5.xml",Version=2.5);You can also specify how to generate the SBML IDs for the model components. For instance, to use short IDs, use ReplacementStyle="Short".
sbmlexport(m1,"lotka_short.xml",ReplacementStyle="Short");
Input Arguments
SimBiology model, specified as a SimBiology.Model object.
Name of a file to export the model, specified as a character vector or string scalar.
The file is an XML file with a Systems Biology Markup Language (SBML) format. Enter
either a file name or a path and file name supported by your operating system. If the
file name has no extension, then the function appends .xml to the end
of the file name. If the file name has any extension, the function keeps the
extension.
You can also save a SimBiology model to a MAT file or to a SimBiology project using
sbiosaveproject to save features not supported by SBML. For more
information about features that are supported by SimBiology but not by SBML or vice
visa, see SBML Support.
Data Types: char | string
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN, where Name is
the argument name and Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: sbmlexport(m1,Version=2.5) specifies to use SBML version 2.5
to export the model m1.
SBML version to export to, specified as one of the following values: 3.2, 3.1, 2.5, 2.4, 2.3, or 2.2.
Example: sbmlexport(modelObj,Version=2.5) exports
modelObj using SBML version 2.5.
Data Types: double | char | string
Algorithm to generate SBML IDs during the export, specified as one of the following values:
"underscore"— Replaces any consecutive sequence of nonalphanumeric characters with a single underscore. If, after replacement, the initial character is a number or an underscore, the function prepends anxto ensure that the ID is both a valid SBML ID and valid MATLAB variable name. A nonalphanumeric character here represents any character that is not a letter (A-Z, a-z), number (0-9), or _ (underscore). If a generated ID is not unique, the function keeps appending a number until it is a unique ID."short"— Generates IDs using the form xN, where N is a unique hexadecimal integer for each model component, starting with x0."delete"— Deletes all characters that are not alphanumerics or underscores. If, after deletion, the initial character is numeric, the function prepends anxto ensure that the ID is both a valid SBML ID and valid MATLAB variable name. If a generated ID is not unique, the function keeps appending a number until it is a unique ID."hex"— Replaces each character that is not an alphanumeric or underscore with its corresponding hexadecimal representation. Specifically, the function starts the ID withmw. Then it replaces any character that is not an alphanumeric or underscore with _NNNN, where NNNN is the four-character hexadecimal string representation of the character's numeric value, that is, the code point. For example, the double quote"is replaced with _0022 because0x0022is the associated code point.
Data Types: char | string
Version History
Introduced before R2006aSpecify which SBML version to use when you export a SimBiology model using the
Version name-value argument.
Use ReplacmentStyle name-value argument to specify how to generate
an SBML ID for each model component when you export a model.
SimBiology supports SBML level 3 version 2 (L3V2). You can import and export SBML L3V2 formatted files using sbmlimport and sbmlexport, respectively. For details, see SBML Support.
To specify the SBML version, use the Version name-value argument of sbmlexport.
SBML level 3 no longer supports the outside attribute. Therefore, if you want to preserve the compartment ownership (Owner) information from your model, use an earlier SBML version, such as 2.5. Otherwise, if you save your SimBiology model in the 3.2 format and reimport it, you see the following changes in the model:
No compartments are nested in the model and in the Diagram view of SimBiology Model Builder.
The compartment properties Compartments and Owner are empty.
Note that the SBML version you use does not affect the model simulation results.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.
América
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)