Main Functions
TackleMMe functions are sorted into three categories:
-
Model Building and Project Initialization
-
Single Model Analysis
-
Model Comparison
Main functions are documented below.
Model Building and Project Initialization
createProject(params)
Creates a project structure ready for the analysis pipeline.
This function initializes a project object containing one or more models, each defined by a set of parameters. The project can then be used as input for single model analysis and model comparison functions.
Input arguments:
| Name | Type | Description | Default |
|---|---|---|---|
params
|
cell
|
1-by-N cell array. One struct per model. See the Project Initialization page for the full list of available fields. Required fields: modelName, contextSpecificModel. |
required |
Output arguments:
| Name | Type | Description |
|---|---|---|
project
|
struct
|
Initialized project with a models field. |
Examples:
params = {struct('modelName', 'model1', 'contextSpecificModel', model)};
project = createProject(params);
params = {struct(...), struct(...)};
project = createProject(params);
Note
Fields marked as (rFastcormics) in the source code are specific to
models built with rFASTCORMICS and are optional for other COBRA models.
Only modelName and contextSpecificModel are required. Field
validation is performed by validateParamsForPipeline.
Source code in scr/classes/project_initialization/createProject.m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | |
addModelsToProject(project, params)
Adds one or more models to an already existing project.
This function extends an existing project by adding new models. Each model is validated and formatted before being added. If a model with the same name already exists, the user is prompted to confirm overwriting.
Input arguments:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
struct
|
Existing project structure created by createProject. |
required |
params
|
cell
|
1-by-N cell array, one struct per model to add. See the Project Initialization page for the full list of available fields. Required fields: modelName, contextSpecificModel. |
required |
Output arguments:
| Name | Type | Description |
|---|---|---|
project
|
struct
|
The input project with new models added. |
Examples:
project = addModelsToProject(project, ...
{struct('modelName', 'model2', 'contextSpecificModel', model2)});
% Add multiple models
project = addModelsToProject(project, {struct(...), struct(...)});
Note
The project format is validated with checkProjectFormat before adding any model. Fields specific to rFASTCORMICS are optional.
Source code in scr/classes/project_initialization/addModelsToProject.m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
Single Model Analysis
singleModelAnalysis(project, parameterTable, modelList={}, analyses={}, saveCheckpoint=true, resumeFromCheckpoint=false)
Runs analyses on one or multiple models and stores results.
This function performs one or several analyses on each model in the provided list and stores the results under a timestamped analysis ID in the project structure. A checkpoint system is available to resume after a crash.
Input arguments:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
struct
|
Project structure created by createProject. |
required |
parameterTable
|
table
|
Parameter table defining analysis settings. See the Single Model Analysis page for details. |
required |
modelList
|
cell
|
Names of the models to analyze. If empty, all models in the project are used. |
required |
analyses
|
cell
|
List of analyses to perform. If empty, all available analyses are run. Valid keys: FBA, FVA, sampling, loopless, kld, singleGeneDeletion, doubleGeneDeletion. |
required |
saveCheckpoint
|
logical
|
Whether to save a checkpoint after each model. Default: true. |
required |
resumeFromCheckpoint
|
logical
|
Whether to resume from the last saved checkpoint. Default: false. |
required |
Output arguments:
| Name | Type | Description |
|---|---|---|
project
|
struct
|
The input project with an analysis field added to each analyzed model. |
Examples:
% Run all analyses on all models
project = singleModelAnalysis(project, parameterTable);
% Run FBA and sampling on specific models
project = singleModelAnalysis(project, parameterTable, ...
{"model1", "model2"}, {"FBA", "sampling"});
% Resume after a crash
project = singleModelAnalysis(project, parameterTable, ...
resumeFromCheckpoint = true);
Note
When loopless is requested without sampling, a samplingToUse parameter must be provided in the parameter table, referencing a previous sampling analysis ID. The IDs must be listed in the same order as the models in modelList.
Warning
Unimplemented analyses requested in the analyses list are skipped with a console warning.
Source code in scr/classes/single_model_analysis/singleModelAnalysis.m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | |
addAnalysisToExistingOne(project, parameterTable, modelName, analyses, analysisId)
Adds analyses to an already existing analysis run.
This function adds one or more analyses to an existing analysis field identified by its analysis ID, without creating a new timestamped entry. It is useful for supplementing a previous run with additional analyses or re-running existing ones with updated parameters.
Input arguments:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
struct
|
Project structure with an existing analysis field. |
required |
parameterTable
|
table
|
Parameter table containing settings for the analyses to add. |
required |
modelName
|
char
|
Name of the model. |
required |
analyses
|
char
|
Analysis key(s) to add (e.g. 'FBA', 'sampling'). Can be a single string or a cell array of strings. |
required |
analysisId
|
char
|
Existing analysis ID to add to (e.g. 'analysis_20240815_1430'). |
required |
Output arguments:
| Name | Type | Description |
|---|---|---|
project
|
struct
|
The input project with updated analysis results. |
Examples:
% Add gene deletion analyses to an existing run
project = addAnalysisToExistingOne(project, parameterTable, ...
'model1', {'singleGeneDeletion', 'doubleGeneDeletion'}, ...
'analysis_20240815_1430');
% Re-run FVA with updated parameters
project = addAnalysisToExistingOne(project, parameterTable, ...
'model1', 'FVA', 'analysis_20240815_1430');
Warning
When re-running an existing analysis, results and the corresponding rows in the stored parameters table are overwritten after user confirmation. Parameters for other analyses are preserved.
Source code in scr/classes/single_model_analysis/addAnalysisToExistingOne.m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | |
writeAnalysisReport(project, modelName, analysisId, varargin)
Generates a PDF report summarizing analysis results.
This function creates a PDF report for a single analysis run, including model characteristics, exchange fluxes, and pathway- or metabolite-level flux details. It requires that FBA and FVA have been performed on the model.
Input arguments:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
struct
|
Project structure containing analysis results. |
required |
modelName
|
char
|
Name of the model to report on. |
required |
analysisId
|
char
|
Analysis ID (e.g. 'analysis_20240815_1430'). |
required |
path
|
char
|
Output directory for the PDF file. Default: current folder. Passed as name-value pair. |
required |
pathwaysOfInterest
|
cell
|
Pathway names to include in the report. Default: empty. Passed as name-value pair. |
required |
metsOfInterest
|
cell
|
Metabolite IDs to include in the report. Default: empty. Passed as name-value pair. |
required |
Output arguments:
| Name | Type | Description |
|---|---|---|
|
None. The PDF file is saved to the specified directory. |
Examples:
% Generate a report with default settings
writeAnalysisReport(project, 'model1', 'analysis_20240815_1430', ...
'path', './results/reports/');
% Include specific pathways and metabolites
writeAnalysisReport(project, 'model1', 'analysis_20240815_1430', ...
'path', './results/reports/', ...
'pathwaysOfInterest', {'Glycolysis', 'TCA cycle'}, ...
'metsOfInterest', {'glc_D', 'o2', 'ac'});
Warning
FBA and FVA must have been performed on the model. If these analyses are not present, the function will error.
Note
The output file is named
Source code in scr/classes/single_model_analysis/writeAnalysisReport.m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 | |
Model Comparison
chooseActiveAnalysis(project, modelList, analysisIDs={}, overwriteActive={'all'})
Designates which analysis run to use for model comparison.
This function must be run before modelComparison. Since multiple analysis runs can coexist on the same model, this function selects which one to use by copying it into an 'active' slot. This allows downstream comparison functions to access results without specifying the exact analysis ID for each model.
Input arguments:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
struct
|
Project structure with completed single model analyses. |
required |
modelList
|
cell
|
Names of the models to define an active analysis for. |
required |
analysisIDs
|
cell
|
Analysis ID to set as active for each model, in the same order as modelList. If empty, the most recent analysis (by timestamp) is automatically selected for each model. |
required |
overwriteActive
|
cell
|
Fields to overwrite in the existing active slot. Use {'all'} (default) for full replacement, or specify individual fields (e.g. {'FBA'}) to selectively overwrite while preserving other results. |
required |
Output arguments:
| Name | Type | Description |
|---|---|---|
project
|
struct
|
Project with an active analysis defined for each model. |
activeAnalysisTable
|
table
|
Summary of the active analysis IDs used per model. |
Examples:
% Use the most recent analysis for each model
[project, activeTable] = chooseActiveAnalysis(project, ...
{'model1', 'model2'});
% Specify explicit analysis IDs
[project, activeTable] = chooseActiveAnalysis(project, ...
{'model1', 'model2'}, ...
{'analysis_20240815_1430', 'analysis_20240816_0900'});
% Selectively overwrite only FBA in the active slot
[project, activeTable] = chooseActiveAnalysis(project, ...
{'model1'}, {'analysis_20240815_1430'}, {'FBA'});
Note
When overwriteActive is set to a specific field (e.g. {'FBA'}), the parameters table is automatically merged: rows corresponding to the overwritten analyses are replaced, while rows for other analyses are preserved.
Source code in scr/classes/model_comparison/functions/chooseActiveAnalysis.m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | |
modelComparison(project, modelList, referenceModel, identifier=string(datetime('now', 'Format', '_yyyyMMdd_HHmmss')), analyses="structuralComparison")
Compares multiple models on structural, functional, and sampling levels.
This function runs a set of comparative analyses on the specified models. Three types of comparison are available: structural (presence or absence of reactions, metabolites, and genes), functional (FBA and FVA flux differences), and sampling (solution space comparison). Structural comparison is always run first as a prerequisite for the others.
Input arguments:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
struct
|
Project structure with single model analyses completed and active analyses set via chooseActiveAnalysis. |
required |
modelList
|
string
|
Names of the models to compare. |
required |
referenceModel
|
string
|
Reference model used to compute relative reaction presence. |
required |
identifier
|
string
|
Postfix appended to the comparison name. Default: current timestamp. |
required |
analyses
|
string
|
Analyses to perform. Valid values: structuralComparison, functionalComparison, samplingComparison, IDAREoutput. Default: structuralComparison. |
required |
Output arguments:
| Name | Type | Description |
|---|---|---|
project
|
struct
|
Project with a comparisons field containing all results and plots. |
comparisonName
|
string
|
Name of the created comparison. |
Examples:
% Run only the structural comparison (default)
[project, compName] = modelsComparison(project, ...
["model1", "model2"], "model1");
% Run structural and functional comparisons
[project, compName] = modelsComparison(project, ...
["model1", "model2"], "model1", "batchA", ...
["structuralComparison", "functionalComparison"]);
% Run all three comparisons
[project, compName] = modelsComparison(project, ...
["model1", "model2", "model3"], "model1", "fullRun", ...
["structuralComparison", "functionalComparison", "samplingComparison"]);
Note
The comparison name is built as model1_vs_model2_vs_...__identifier. Models are ordered by their appearance in project.models. If a comparison with the same name already exists and the structural analysis was already run, only the newly requested analyses are performed.
Warning
If a comparison with the same name exists but uses a different reference model, the user is prompted to confirm overwriting.
Source code in scr/classes/model_comparison/modelComparison.m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | |
showFigure(figHandle)
Creates a copy of a figure safely.
This function duplicates a figure given by its handle. It attempts several copy strategies in sequence: direct copyobj, children-only copyobj, and finally save-and-reopen via a temporary .fig file. This ensures compatibility with figures containing UIAxes, tables, clustergrams, and other complex objects.
Input arguments:
| Name | Type | Description | Default |
|---|---|---|---|
figHandle
|
figure
|
Handle of the figure to duplicate. |
required |
Output arguments:
| Name | Type | Description |
|---|---|---|
newFig
|
figure
|
Handle of the newly created figure copy. |
Examples:
newFig = showFigure(plots.funct.import);
Note
The function tries three strategies in order of preference: 1. Direct copyobj of the entire figure 2. copyobj of children only into a new figure 3. Save to temporary .fig file and reopen
Source code in scr/classes/model_comparison/functions/showFigure.m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | |
getRxnIDs(project, referenceModel, pattern)
Finds reactions matching a pattern across model fields.
This function filters reactions for visualization using a regex pattern. The pattern can match subsystems, genes, reaction names, or metabolites. Multiple patterns can be combined with & (AND) or | (OR) operators.
Input arguments:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
struct
|
Project object from singleModelAnalysis and modelsComparison. |
required |
referenceModel
|
string
|
Reference model to search in. |
required |
pattern
|
string
|
Regex pattern(s) to match. Use & to require multiple patterns simultaneously (e.g. "^lac_. & ^Glycolysis.") or | to match any of several patterns (e.g. "^lac. | ^pyr."). |
required |
Output arguments:
| Name | Type | Description |
|---|---|---|
rxnID
|
cell
|
Reaction indices in the reference model for each pattern. |
producing
|
cell
|
Logical vector indicating whether matched metabolites are produced or consumed in each reaction, based on stoichiometry. |
matchedAll
|
cell
|
Actual strings matched by each pattern (reaction, gene, metabolite, or subsystem names). |
Examples:
% Find reactions in Glycolysis involving lactate
[rxnID, producing, matched] = getRxnIDs(project, "model1", ...
"^lac_.* & ^Glycolysis.*");
% Find reactions involving lactate or pyruvate
[rxnID, producing, matched] = getRxnIDs(project, "model1", ...
"^lac.* | ^pyr.*");
% Find reactions in a single subsystem
[rxnID, producing, matched] = getRxnIDs(project, "model1", ...
"^TCA cycle.*");
Note
If no match is found in model fields, the function searches the gene ID dictionary (settings.dico) to match gene names, symbols, or other identifiers. A pattern cannot contain both & and | operators.
Source code in scr/classes/model_comparison/functions/getRxnIDs.m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | |
visDiffRxnSetActivityFBA(project, compName, rxnSets, rxnSetLabels, referenceModel)
Generates a heatmap showing how active the defined reactions are, by computing the sum of all FBA flux values for each reaction set.
Input arguments:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
struct
|
Project object from singleModelAnalysis and modelComparison. Both must have been run before calling this function. |
required |
compName
|
string
|
Name of the comparison to visualize. Available comparisons can be listed with project.comparisons. |
required |
rxnSets
|
cell
|
Sets of reaction indices to visualize, typically obtained via getRxnIDs. |
required |
rxnSetLabels
|
string
|
Labels for each reaction set, displayed in the figure. Must be the same length as rxnSets. |
required |
referenceModel
|
string
|
Name of the reference model. Must match the reference model used in the specified comparison and when retrieving reaction IDs with getRxnIDs. |
required |
Output arguments:
| Name | Type | Description |
|---|---|---|
fluxSet
|
struct
|
Flux sum data used to generate the heatmap. |
figs
|
figure
|
Figure object generated and displayed by the function. |
Examples:
% Retrieve reactions for two sets, then visualize
[rxnsMetId, producingMet, matched] = getRxnIDs(project, ...
referenceModel, ["Pentose.* & g6p.*"; "Glycolysis.*"]);
[fluxSet, figs] = visDiffRxnSetActivityFBA(project, compName, ...
rxnsMetId, ["Pentose.* & g6p.*"; "Glycolysis.*"], referenceModel);
Warning
The reference model must be the same one used when calling getRxnIDs to retrieve the reaction indices. Using a different reference model will cause index misalignment.
Source code in scr/classes/model_comparison/functions/visDiffRxnSetActivityFBA.m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |
visDiffRxnSetActivitySampling(project, compName, rxnSets, rxnSetLabels, referenceModel, metIdx)
Generates a heatmap showing how active the defined reactions are across sampling solutions. For each reaction set, the sum of flux values is computed per sample, then averaged over all samples to produce one value per reaction set in the heatmap.
Input arguments:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
struct
|
Project object from singleModelAnalysis and modelComparison. Both must have been run before calling this function. |
required |
compName
|
string
|
Name of the comparison to visualize. Available comparisons can be listed with project.comparisons. |
required |
rxnSets
|
cell
|
Sets of reaction indices to visualize, typically obtained via getRxnIDs. |
required |
rxnSetLabels
|
string
|
Labels for each reaction set, displayed in the figure. Must be the same length as rxnSets. |
required |
referenceModel
|
string
|
Name of the reference model. Must match the reference model used in the specified comparison and when retrieving reaction IDs with getRxnIDs. |
required |
metIdx
|
Optional metabolite indices for filtering. |
required |
Output arguments:
| Name | Type | Description |
|---|---|---|
fluxSet
|
struct
|
Flux sum data used to generate the heatmap. |
figs
|
figure
|
Figure object generated and displayed by the function. |
Examples:
% Retrieve reactions for two sets, then visualize
[rxnsMetId, producingMet, matched] = getRxnIDs(project, ...
referenceModel, ["Pentose.* & g6p.*"; "Glycolysis.*"]);
[fluxSet, figs] = visDiffRxnSetActivitySampling(project, ...
compName, rxnsMetId, ...
["Pentose.* & g6p.*"; "Glycolysis.*"], referenceModel);
Warning
The reference model must be the same one used when calling getRxnIDs to retrieve the reaction indices. Using a different reference model will cause index misalignment.
Source code in scr/classes/model_comparison/functions/visDiffRxnSetActivitySampling.m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
visDiffMetSetUsageFBA(project, compName, rxnSets, rxnSetLabels, referenceModel)
Heatmap of metabolite usage across reaction sets based on FBA.
Generates a heatmap showing how much each metabolite participating in the defined reaction sets is used, based on FBA flux values. Usage is defined as the flux sum of all reactions that consume the metabolite within each reaction set.
Input arguments:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
struct
|
Project object from singleModelAnalysis and modelComparison. Both must have been run before calling this function. |
required |
compName
|
string
|
Name of the comparison to visualize. Available comparisons can be listed with project.comparisons. |
required |
rxnSets
|
cell
|
Sets of reaction indices to visualize, typically obtained via getRxnIDs. |
required |
rxnSetLabels
|
string
|
Labels for each reaction set, displayed in the figure. Must be the same length as rxnSets. |
required |
referenceModel
|
string
|
Name of the reference model. Must match the reference model used in the specified comparison and when retrieving reaction IDs with getRxnIDs. |
required |
Output arguments:
| Name | Type | Description |
|---|---|---|
figs
|
figure
|
Figure object generated and displayed by the function. |
Examples:
% Retrieve reactions for two sets, then visualize
[rxnsMetId, producingMet, matched] = getRxnIDs(project, ...
referenceModel, ["Pentose.* & g6p.*"; "Glycolysis.*"]);
figs = visDiffMetSetUsageFBA(project, compName, rxnsMetId, ...
["Pentose.* & g6p.*"; "Glycolysis.*"], referenceModel);
Warning
The reference model must be the same one used when calling getRxnIDs to retrieve the reaction indices. Using a different reference model will cause index misalignment.
Source code in scr/classes/model_comparison/functions/visDiffMetSetUsageFBA.m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | |
visDiffMetSetUsageSampling(project, compName, rxnSets, rxnSetLabels, referenceModel)
Generates a heatmap showing how much each metabolite participating in the defined reaction sets is used, based on sampling solutions. An average is computed over all samples to produce one value per reaction set in the heatmap. Usage is defined as the flux sum of all reactions that consume the metabolite within each reaction set.
Input arguments:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
struct
|
Project object from singleModelAnalysis and modelComparison. Both must have been run before calling this function. |
required |
compName
|
string
|
Name of the comparison to visualize. Available comparisons can be listed with project.comparisons. |
required |
rxnSets
|
cell
|
Sets of reaction indices to visualize, typically obtained via getRxnIDs. |
required |
rxnSetLabels
|
string
|
Labels for each reaction set, displayed in the figure. Must be the same length as rxnSets. |
required |
referenceModel
|
string
|
Name of the reference model. Must match the reference model used in the specified comparison and when retrieving reaction IDs with getRxnIDs. |
required |
Output arguments:
| Name | Type | Description |
|---|---|---|
figs
|
figure
|
Figure object generated and displayed by the function. |
Examples:
% Retrieve reactions for two sets, then visualize
[rxnsMetId, producingMet, matched] = getRxnIDs(project, ...
referenceModel, ["Pentose.* & g6p.*"; "Glycolysis.*"]);
figs = visDiffMetSetUsageSampling(project, compName, rxnsMetId, ...
["Pentose.* & g6p.*"; "Glycolysis.*"], referenceModel);
Warning
The reference model must be the same one used when calling getRxnIDs to retrieve the reaction indices. Using a different reference model will cause index misalignment.
Source code in scr/classes/model_comparison/functions/visDiffMetSetUsageSampling.m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | |
visRxnSetVariability(project, compName, rxnSets, rxnSetLabels, referenceModel)
Generates a heatmap showing how active the defined reactions are across sampling solutions. For each reaction set, the sum of flux values is computed per sample, then averaged over all samples to display one value per model and reaction set in the heatmap.
Input arguments:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
struct
|
Project object from singleModelAnalysis and modelComparison. Both must have been run before calling this function. |
required |
compName
|
string
|
Name of the comparison to visualize. Available comparisons can be listed with project.comparisons. |
required |
rxnSets
|
cell
|
Sets of reaction indices to visualize, typically obtained via getRxnIDs. |
required |
rxnSetLabels
|
string
|
Labels for each reaction set, displayed in the figure. Must be the same length as rxnSets. |
required |
referenceModel
|
string
|
Name of the reference model. Must match the reference model used in the specified comparison and when retrieving reaction IDs with getRxnIDs. |
required |
Output arguments:
| Name | Type | Description |
|---|---|---|
fluxSet
|
struct
|
Flux sum data used to generate the heatmap. |
figs
|
figure
|
Figure object generated and displayed by the function. |
Examples:
% Retrieve reactions for two sets, then visualize
[rxnsMetId, producingMet, matched] = getRxnIDs(project, ...
referenceModel, ["Pentose.* & g6p.*"; "Glycolysis.*"]);
[fluxSet, figs] = visDiffRxnSetActivitySampling(project, ...
compName, rxnsMetId, ...
["Pentose.* & g6p.*"; "Glycolysis.*"], referenceModel);
Warning
The reference model must be the same one used when calling getRxnIDs to retrieve the reaction indices. Using a different reference model will cause index misalignment.
Source code in scr/classes/model_comparison/functions/visRxnSetVariability.m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |
visMetSetVariability(project, compName, rxnSets, rxnSetLabels, referenceModel)
Generates a heatmap showing how much each metabolite participating in the defined reaction sets is used, based on all sampling solutions. The resulting heatmap contains one value per metabolite set per sample. Usage is defined as the flux sum of all reactions that consume the metabolite within each reaction set.
Input arguments:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
struct
|
Project object from singleModelAnalysis and modelComparison. Both must have been run before calling this function. |
required |
compName
|
string
|
Name of the comparison to visualize. Available comparisons can be listed with project.comparisons. |
required |
rxnSets
|
cell
|
Sets of reaction indices to visualize, typically obtained via getRxnIDs. |
required |
rxnSetLabels
|
string
|
Labels for each reaction set, displayed in the figure. Must be the same length as rxnSets. |
required |
referenceModel
|
string
|
Name of the reference model. Must match the reference model used in the specified comparison and when retrieving reaction IDs with getRxnIDs. |
required |
Output arguments:
| Name | Type | Description |
|---|---|---|
figs
|
figure
|
Figure object generated and displayed by the function. |
Examples:
% Retrieve reactions for two sets, then visualize
[rxnsMetId, producingMet, matched] = getRxnIDs(project, ...
referenceModel, ["Pentose.* & g6p.*"; "Glycolysis.*"]);
figs = visMetSetVariability(project, compName, rxnsMetId, ...
["Pentose.* & g6p.*"; "Glycolysis.*"], referenceModel);
Warning
The reference model must be the same one used when calling getRxnIDs to retrieve the reaction indices. Using a different reference model will cause index misalignment.
Source code in scr/classes/model_comparison/functions/visMetSetVariability.m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |
visSingleRxnSamplingDistribution(project, compName, rxnSet, rxnSetLabel, referenceModel, addKLDValues=false)
Generates violin plots showing the distribution of flux values across all sampling solutions for each reaction in the defined set. One violin plot is produced per reaction index in rxnSet.
Input arguments:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
struct
|
Project object from singleModelAnalysis and modelComparison. Both must have been run before calling this function. |
required |
compName
|
string
|
Name of the comparison to visualize. Available comparisons can be listed with project.comparisons. |
required |
rxnSet
|
cell
|
Set of reaction indices to visualize, typically obtained via getRxnIDs. |
required |
rxnSetLabel
|
string
|
Label displayed for this reaction set in the figure. |
required |
referenceModel
|
string
|
Name of the reference model. Must match the reference model used in the specified comparison and when retrieving reaction IDs with getRxnIDs. |
required |
addKLDValues
|
logical
|
If true, display the Kullback-Leibler divergence significance between sampling distributions on the violin plots. Default: false. |
required |
Output arguments:
| Name | Type | Description |
|---|---|---|
fluxSet
|
struct
|
Flux data used to generate the violin plots. |
figs
|
figure
|
Figure object generated and displayed by the function. |
Examples:
% Visualize sampling distribution for a set of reactions
[rxnsMetId, producingMet, matched] = getRxnIDs(project, ...
referenceModel, "Glycolysis.*");
[fluxSet, figs] = visSingleRxnSamplingDistribution(project, ...
compName, rxnsMetId, "Glycolysis", referenceModel);
% Include KLD significance values
[fluxSet, figs] = visSingleRxnSamplingDistribution(project, ...
compName, rxnsMetId, "Glycolysis", referenceModel, true);
Warning
The reference model must be the same one used when calling getRxnIDs to retrieve the reaction indices. Using a different reference model will cause index misalignment.
Source code in scr/classes/model_comparison/functions/visSingleRxnSamplingDistribution.m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | |
visSingleMetSamplingDistribution(project, compName, rxnSet, rxnSetLabel, referenceModel)
Generates a violin plot showing the flux sum value distribution for all metabolites participating in the defined reaction set. Each dot in the violin plot represents one sampling solution.
Input arguments:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
struct
|
Project object from singleModelAnalysis and modelComparison. Both must have been run before calling this function. |
required |
compName
|
string
|
Name of the comparison to visualize. Available comparisons can be listed with project.comparisons. |
required |
rxnSet
|
cell
|
A single set of reaction indices to visualize, typically obtained via getRxnIDs. |
required |
rxnSetLabel
|
string
|
Label displayed for this reaction set in the plot. |
required |
referenceModel
|
string
|
Name of the reference model. Must match the reference model used in the specified comparison and when retrieving reaction IDs with getRxnIDs. |
required |
Output arguments:
| Name | Type | Description |
|---|---|---|
fluxSet
|
struct
|
Flux sum data used to generate the violin plot. |
figs
|
figure
|
Figure object generated and displayed by the function. |
Examples:
% Retrieve reactions for one set, then visualize
[rxnsMetId, producingMet, matched] = getRxnIDs(project, ...
referenceModel, "Glycolysis.*");
[fluxSet, figs] = visSingleMetSamplingDistribution(project, ...
compName, rxnsMetId, "Glycolysis", referenceModel);
Warning
The reference model must be the same one used when calling getRxnIDs to retrieve the reaction indices. Using a different reference model will cause index misalignment.
Source code in scr/classes/model_comparison/functions/visSingleMetSamplingDistribution.m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | |
visSingleRxnFBA(project, comparisonName, idxToVis, FVA=false, thresholdFlux="none", titlePlots="", visiblePlots="on")
Visualizes FBA and FVA values for selected reactions across models in a comparison. By default, only FBA values are shown as a grouped horizontal bar plot. Optionally, FVA boundaries can be displayed as grey boxes around the FBA dots. Reactions are split into a high-flux and low-flux panel using 1D k-means clustering for readability.
Input arguments:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
struct
|
Project object from singleModelAnalysis and modelComparison. |
required |
comparisonName
|
string
|
Name of the comparison to visualize. |
required |
idxToVis
|
cell
|
Indices of the reactions to display in the reference model, typically obtained via getRxnIDs. |
required |
options.FVA
|
logical
|
If true, display FVA boundaries as grey boxes around the FBA dots. Default: false. |
required |
options.thresholdFlux
|
string
|
Flux filtering mode. Valid values: "lower" (positive flux only), "upper" (negative flux only), "none" (non-zero flux only), "all" (include zero-flux reactions). Default: "none". |
required |
options.titlePlots
|
string
|
Custom title for the plots. Used when thresholdFlux is "none" or "all". Default: "". |
required |
options.visiblePlots
|
string
|
Figure visibility, "on" or "off". Default: "on". |
required |
Output arguments:
| Name | Type | Description |
|---|---|---|
fig
|
figure
|
Figure object containing the bar plot and optional table with reaction formulas, medium constraints, model mappings, and gene-protein-reaction rules. |
Examples:
% Visualize FBA values for selected reactions
fig = visSingleRxnFBA(project, compName, rxnIDs);
% Include FVA boundaries and show only positive flux reactions
fig = visSingleRxnFBA(project, compName, rxnIDs, ...
struct('FVA', true, 'thresholdFlux', "lower"));
% Show all reactions including zero-flux ones
fig = visSingleRxnFBA(project, compName, rxnIDs, ...
struct('thresholdFlux', "all", 'titlePlots', "All reactions"));
Note
When all models share the same medium composition, a table is displayed alongside the plot showing reaction formulas, medium constraints, model-specific reaction mappings, and symbol GPR rules.
Source code in scr/classes/model_comparison/functions/visSingleRxnFBA.m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 | |
visualizeSamplingLandscape(project, comparison_name, rxn_to_visualize="biomass_reaction", dim_reduction_type="UMAP", pcs_vis=[1,2], sampling_feature="flux", num_clusters=0, pcs_used_dim_red=0, perform_kmeans=0, thinning=10, n_neighbors=50, overwrite=0, visible_plot="on")
Visualizes sampling solutions in a dimension-reduced space (PCA or UMAP) with reaction flux or flux sum values overlaid as color. PCA is always computed first; UMAP is then applied on the selected principal components. Optionally, k-means clustering can be performed on the PCA-reduced data.
Input arguments:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
struct
|
Project object from singleModelAnalysis and modelComparison. |
required |
comparison_name
|
string
|
Name of the comparison containing the sampling results to visualize. |
required |
rxn_to_visualize
|
string
|
Reaction name whose flux values are displayed as color in the reduced space. Default: "biomass_reaction". |
required |
options.dim_reduction_type
|
string
|
Dimension reduction method, "PCA" or "UMAP". Default: "UMAP". |
required |
options.pcs_vis
|
1-by-2 array
|
Principal components to display when using PCA. Default: [1, 2]. |
required |
options.sampling_feature
|
string
|
Feature space for reduction, "flux" (per-reaction) or "fluxsum" (per-metabolite). Default: "flux". |
required |
options.num_clusters
|
numeric
|
Number of k-means clusters. If 0, defaults to the number of unique model labels. Default: 0. |
required |
options.pcs_used_dim_red
|
numeric
|
Number of PCs fed into UMAP. If 0, automatically determined to reach 70 percent cumulative variance. Default: 0. |
required |
options.perform_kmeans
|
numeric
|
If 1, run k-means clustering on the PCA-reduced data. Default: 0. |
required |
options.thinning
|
numeric
|
Subsampling interval to reduce computational load. Every nth sample is kept. Default: 10. |
required |
options.n_neighbors
|
numeric
|
UMAP n_neighbors parameter. Default: 50. |
required |
options.overwrite
|
numeric
|
If 1, overwrite existing dimension reduction results. Default: 0. |
required |
options.visible_plot
|
string
|
Figure visibility, "on" or "off". Default: "on". |
required |
Output arguments:
| Name | Type | Description |
|---|---|---|
fig_out
|
struct
|
Struct containing the generated figures. Fields include "label" (model labels scatter), "cluster" (k-means cluster scatter, if performed), and a field named after the visualized reaction (flux value colored scatter). |
Examples:
% Default UMAP visualization with biomass reaction flux as color
fig_out = visualizeSamplingLandscape(project, compName);
% Use PCA with custom components and fluxsum features
fig_out = visualizeSamplingLandscape(project, compName, ...
"EX_glc(e)", struct('dim_reduction_type', "PCA", ...
'pcs_vis', [1, 3], 'sampling_feature', "fluxsum"));
% Run UMAP with k-means clustering
fig_out = visualizeSamplingLandscape(project, compName, ...
"biomass_reaction", struct('perform_kmeans', 1, ...
'num_clusters', 3, 'thinning', 5));
Note
PCA is always computed on z-scored, zero-variance-filtered samples. UMAP is applied on the first numPCs principal components of the thinned data. K-means clustering quality is assessed via silhouette score and label homogeneity.
Warning
UMAP requires the UMAP toolbox, which is compatible with MATLAB R2019a through R2024b only. R2025a and later remove Java access to MATLAB figures, breaking the toolbox.
Source code in scr/classes/model_comparison/functions/visualizeSamplingLandscape.m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 | |
prepareDataForIDAREVisualization(project, comparisonName, folderPath, options=[])
Prepares project and comparison data for visualization in the IDARE Cytoscape app. Exports all models as SBML XML files (with GPR rules and compartments stripped) and generates reaction and metabolite data tables containing FBA, FVA, sampling, flux sum, and structural presence information for each model in the comparison.
Input arguments:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
struct
|
Project object from singleModelAnalysis and modelComparison. |
required |
comparisonName
|
string
|
Name of the comparison to export. |
required |
folderPath
|
string
|
Base directory where the timestamped output folder will be created. |
required |
options
|
Reserved for future options. Currently unused. |
required |
Examples:
% Export data for IDARE visualization
prepareDataForIDAREVisualization(project, compName, "C:/output/idare");
Note
Creates a timestamped subfolder inside folderPath with two subdirectories: "models" (containing .mat and .xml files for each model plus the reference model) and "data" (containing reaction_data.xlsx and metabolite_data.xlsx). The XML export uses COBRApy via a Python environment to convert MATLAB models to SBML format.
Warning
Requires a configured Python environment with COBRApy installed. The Python path is hardcoded in the exportToXML helper function and must be updated to match your local conda environment path.
Source code in scr/classes/model_comparison/functions/prepareDataForIDAREVisualization.m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |