SimBiology.DiffResults
Description
SimBiology.DiffResults
contains the results from comparing two
SimBiology models and diagram information.
Creation
Use sbiodiff
to
compare the models and the function returns SimBiology.DiffResults
as an
output.
Properties
Comparisons
— Results of comparison between two SimBiology models and their diagrams
table
Results of comparison between two SimBiology models and their diagrams, specified as a table.
The table has the following columns:
Class — Model component type specified as a string. Note that for a variant, the table shows
"Variant (X)"
, where X is the string"species"
,"compartment"
, or"parameter"
depending on the type of the component referenced in the corresponding row of the variant content. For details on how SimBiology matches variants, see Doses and Variants.Source — Source component name.
For a species, parameter, or compartment, the column shows a qualified name (such as
cell.Ligand
).For a kinetic law, it shows
"Kinetic Law (Y)"
, where Y is the parent reaction name.For a rule, it shows the rule name. If the name is empty, it shows the value of the Rule property instead.
For an event, it shows the event name. If the name is empty, it shows the value of the Trigger property instead.
For a reaction, observable, dose, or variant, it shows the value of the Name property.
Target — Target component name (see the Source column for details)
Property — Name of the component property for which the value is shown in the SourceValue and TargetValue column.
SourceValue — Value of the corresponding property of the source component
TargetValue — Value of the corresponding property of the target component
The Property, SourceValue, and
TargetValue show <missing>
as the value for
any deleted or inserted model component.
Tip
The Class, Source, Target, and Property columns contain strings. You can use these columns to select specific changes by using string comparisons. For instance, to get all modifications to the value of any parameter from the table, use:
diffResults = sbiodiff(m1,m2); diffTbl = diffResults.Comparisons; param_subset = diffTbl(diffTbl.Class == "Parameter" & diffTbl.Property == "Value",:);
To find <missing>
values, use ismissing
.
Data Types: table
Source
— Source model information
struct
Source model information, specified as a structure. The structure contains the following fields.
Project
— Name of the SBPROJ file that contains the source model. If you specify the corresponding model as a SimBiology model object, this field value is""
.ModelName
— SimBiology model nameModel
— SimBiology model objectLastModified
— Last modified date of the SBPROJ file. If you specify the corresponding model as a SimBiology model object, this field value is""
.
Data Types: struct
Target
— Target model information
struct
Target model information, specified as a structure. The structure contains the following fields.
Project
— Name of the SBPROJ file that contains the target model. If you specify the corresponding model as a SimBiology model object, this field value is""
.ModelName
— SimBiology model nameModel
— SimBiology model objectLastModified
— Last modified date of the SBPROJ file. If you specify the corresponding model as a SimBiology model object, this field value is""
.
Data Types: struct
Object Functions
getComponents | Get model components associated with SimBiology model comparison results |
visdiff | Visualize SimBiology model comparison results |
Examples
Compare SimBiology Models
Load a source model.
model1 = sbmlimport("lotka"); y1 = sbioselect(model1, "Type", "species", "Name", "y1"); y1.Value = 880;
Load a target model to compare against the source model.
model2 = sbmlimport("lotka"); y1 = sbioselect(model2, "Type", "species", "Name", "y1"); y1.Value = 920;
Compare the models using sbiodiff
and display the comparison table.
diffResults = sbiodiff(model1,model2); diffTable = diffResults.Comparisons
diffTable=1×6 table
Class Source Target Property SourceValue TargetValue
_________ ______ ______ ________ ___________ ___________
1 "Species" "y1" "y1" "Value" {[880]} {[920]}
You can also view the comparison results graphically in the Comparison tool.
visdiff(diffResults);
Get a table of model components associated with the changes reported in the comparison table.
tbl = getComponents(diffResults)
tbl=1×2 table
Source Target
________________________ ________________________
1 {1×1 SimBiology.Species} {1×1 SimBiology.Species}
Version History
Introduced in R2022a
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.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- 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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)