Skip to content

Commit

Permalink
Fix in export functions
Browse files Browse the repository at this point in the history
SBML: init parameters were not assigned correctly
PEtab: log trafo of observables was not correct
  • Loading branch information
niklasneubrand committed Jul 1, 2024
1 parent 1b910bb commit 4275344
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions arFramework3/ImportExport/arExportPEtab.m
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ function arExportPEtab(name, export_SBML)
% reformat to match PEtab requirements
finalCondTab = array2table(transpose(condT{:,:}));
finalCondTab = [condT.Properties.VariableNames', finalCondTab];
finalCondTab.Properties.VariableNames = ['conditionID' finalCondTab{1,2:end}];
if all(qRemove)
finalCondTab.Properties.VariableNames = {'conditionID'};
else
finalCondTab.Properties.VariableNames = ['conditionID' finalCondTab{1,2:end}];
end
finalCondTab = finalCondTab(3:end, :);

% export conditions table
Expand Down Expand Up @@ -202,7 +206,7 @@ function arExportPEtab(name, export_SBML)
rowsToAdd = [table(repmat(IDs.obs{d}(iy), [length(time),1]), 'VariableNames', {'observableId'})];

% convert measurements if necessary (log10, normalize)
if ar.model(m).data(d).logfitting(iy)
if ar.model(m).data(d).logplotting(iy)
measurement = 10.^(ar.model(m).data(d).yExp(:, iy));
else
measurement = ar.model(m).data(d).yExp(:, iy);
Expand Down
4 changes: 2 additions & 2 deletions arFramework3/ImportExport/arExportSBML_FullModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ function arExportSBML_FullModel(m,name)
elseif(sum(qp)==0 || is_set)
qp = ismember(ar.model(m).p, ar.model(m).px0{jx}); %R2013a compatible
if(sum(qp)==1)
% pvalue = char(arSym(ar.model(m).fp{qp}));
pvalue = char(arSym(ar.model(m).p{qp}));
pvalue = char(arSym(ar.model(m).fp{qp}));
% pvalue = char(arSym(ar.model(m).p{qp}));
% if(~isnan(str2num(pvalue))) %#ok
% pvalue = str2num(pvalue); %#ok
% M.species(jx).initialConcentration = pvalue;
Expand Down

0 comments on commit 4275344

Please sign in to comment.