Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: disable adding prefix 'M_' and 'R_' in exprotModel function #356

Merged
merged 2 commits into from
Aug 12, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions io/exportModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,13 @@ function exportModel(model,fileName,exportGeneComplexes,supressWarnings)
end

if isfield(modelSBML.species,'metaid')
modelSBML.species(i).metaid=['M_' model.mets{i}];
modelSBML.species(i).metaid=model.mets{i};
end
if isfield(modelSBML.species, 'name')
modelSBML.species(i).name=model.metNames{i};
end
if isfield(modelSBML.species, 'id')
modelSBML.species(i).id=['M_' model.mets{i}];
modelSBML.species(i).id=model.mets{i};
end
if isfield(modelSBML.species, 'compartment')
modelSBML.species(i).compartment=model.comps{model.metComps(i)};
Expand Down Expand Up @@ -329,7 +329,7 @@ function exportModel(model,fileName,exportGeneComplexes,supressWarnings)
end
end
if ~isempty(model.metMiriams{i}) || hasInchi==true
modelSBML.species(i).annotation=['<annotation><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/" xmlns:bqmodel="http://biomodels.net/model-qualifiers/"><rdf:Description rdf:about="#meta_M_' model.mets{i} '">'];
modelSBML.species(i).annotation=['<annotation><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/" xmlns:bqmodel="http://biomodels.net/model-qualifiers/"><rdf:Description rdf:about="#meta_' model.mets{i} '">'];
modelSBML.species(i).annotation=[modelSBML.species(i).annotation '<bqbiol:is><rdf:Bag>'];
if ~isempty(model.metMiriams{i})
modelSBML.species(i).annotation=[modelSBML.species(i).annotation getMiriam(model.metMiriams{i})];
Expand Down Expand Up @@ -475,7 +475,7 @@ function exportModel(model,fileName,exportGeneComplexes,supressWarnings)
end

if isfield(modelSBML.reaction,'metaid')
modelSBML.reaction(i).metaid=['R_' model.rxns{i}];
modelSBML.reaction(i).metaid=model.rxns{i};
end

%Export notes information
Expand Down Expand Up @@ -522,7 +522,7 @@ function exportModel(model,fileName,exportGeneComplexes,supressWarnings)
modelSBML.reaction(i).name=model.rxnNames{i};
end
if isfield(modelSBML.reaction, 'id')
modelSBML.reaction(i).id=['R_' model.rxns{i}];
modelSBML.reaction(i).id=model.rxns{i};
end

%Add the information about reactants and products
Expand Down Expand Up @@ -574,7 +574,7 @@ function exportModel(model,fileName,exportGeneComplexes,supressWarnings)
modelSBML.groups_group.sboTerm = 633;
tmpStruct=modelSBML.groups_group;

rxns=strcat('R_',model.rxns);
rxns=model.rxns;
if ~any(cellfun(@iscell,model.subSystems))
if ~any(~cellfun(@isempty,model.subSystems))
subSystems = {};
Expand Down