Extraction of a submap from a Cell Designer map (PART 3)

Authors: Ronan M.T. Fleming, Leiden University

Reviewer(s):

INTRODUCTION

Given a generic map of metabolism, creat a derivative map by removing a subset of the reactions.

EQUIPMENT SETUP

To visualise the metabolic maps it is necessary to obtain the version 4.4 of CellDesigner. This software can be freely downloaded from:
http://www.celldesigner.org/download.html

PROCEDURE

1. Import a CellDesigner XML file to MATLAB environment

The transformXML2Map function parses an XML file from Cell Designer (CD) into a Matlab structure. This structure is organised similarly to the structure found in the COnstraint-Base and Reconstruction Analysis (COBRA) models.
Read in a map
[GlyXml, GlyMap] = transformXML2Map('glycolysisAndTCA.xml');
Elapsed time is 1.834226 seconds.

2. Remove some reactions from the map

if 1
rxnRemoveList={'ENO';'PFK';'PGMT';'ABC'};
else
rxnRemoveList={'PGMT'};
end
printLevel=1;
[GlyXmlStructSubset,GlyMapSubset,rxnNotInMap] = removeMapReactions(GlyXml,GlyMap,rxnRemoveList,printLevel);
ABC not present in the map
There is no reaction 'ABC' in the map, so the function alerts that it has not been removed.
rxnRemoveList(rxnNotInMap)
ans = 1×1 cell array {'ABC'}

3. Export the modified map

transformMap2XML(GlyXmlStructSubset,GlyMapSubset,'glycolysisAndTCA_subset.xml');
Elapsed time is 1.317182 seconds.

4. Import the modified map and compare it with the matlab structures

[GlyXmlStructSubset2,GlyMapSubset2] = transformXML2Map('glycolysisAndTCA_subset.xml');
Elapsed time is 1.667602 seconds.
ans = struct with fields:
id: 're2' metaid: 're57' name: 'DPGM'
ans = struct with fields:
id: 're2' metaid: 're57' name: 'DPGM' reversible: 'true'
Compare xml structure
[resultXml, whyXml] = structeq(GlyXmlStructSubset, GlyXmlStructSubset2)
resultXml = logical 0
whyXml = struct with fields:
Reason: 'Properties are different <- Unequal Subcell <- Properties are different <- Unequal Subcell <- Properties are different <- Unequal Subcell <- Properties are different <- Unequal Subcell <- Unequal Subcell <- Properties are different <- Unequal Subcell <- Number of fields are different' Where: '(1).sbml(1).model(1).listOfReactions(1).reaction{2}(1).Attributes'
GlyXmlStructSubset.sbml(1).model(1).listOfReactions(1).reaction{2}(1).Attributes
ans = struct with fields:
id: 're2' metaid: 're57' name: 'DPGM'
GlyXmlStructSubset2.sbml(1).model(1).listOfReactions(1).reaction{2}(1).Attributes
ans = struct with fields:
id: 're2' metaid: 're57' name: 'DPGM' reversible: 'true'
Compare map structure
[resultMap, whyMap] = structeq(GlyMapSubset, GlyMapSubset2)
resultMap = logical 1
whyMap = struct with fields:
Reason: '' Where: ''
 
return

4. Remove reactions from the map directly

fileName = 'glycolysisAndTCA.xml';
printLevel=1;
removeCDReactions(fileName,rxnRemoveList,printLevel)