Skip to content

Commit

Permalink
fix: remove prefix c_ and remaining R_
Browse files Browse the repository at this point in the history
  • Loading branch information
haowang-bioinfo committed Aug 12, 2021
1 parent 202087d commit 1c0e32f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions io/exportModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,6 @@ function exportModel(model,fileName,exportGeneComplexes,supressWarnings)
end

if isfield(modelSBML.compartment,'metaid')
if ~isnan(str2double(model.comps(i)))
EM='The compartment IDs are in numeric format. For the compliance with SBML specifications, compartment IDs will be preceded with "c_" string';
dispEM(EM,false);
model.comps(i)=strcat('c_',model.comps(i));
end
modelSBML.compartment(i).metaid=model.comps{i};
end
%Prepare Miriam strings
Expand Down Expand Up @@ -507,7 +502,7 @@ function exportModel(model,fileName,exportGeneComplexes,supressWarnings)

%Export annotation information from rxnMiriams
if (~isempty(model.rxnMiriams{i}) && isfield(modelSBML.reaction(i),'annotation')) || ~isempty(model.eccodes{i})
modelSBML.reaction(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_R_' model.rxns{i} '">'];
modelSBML.reaction(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.rxns{i} '">'];
modelSBML.reaction(i).annotation=[modelSBML.reaction(i).annotation '<bqbiol:is><rdf:Bag>'];
if ~isempty(model.eccodes{i})
eccodes=regexp(model.eccodes{i},';','split');
Expand Down

0 comments on commit 1c0e32f

Please sign in to comment.