Skip to content

Commit

Permalink
fix normalization of data for PEtab
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasneubrand committed Oct 23, 2024
1 parent cc3031f commit c935472
Showing 1 changed file with 36 additions and 7 deletions.
43 changes: 36 additions & 7 deletions arFramework3/ImportExport/arExportPEtab.m
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,14 @@ function arExportPEtab(name, export_SBML)
else
measurement = ar.model(m).data(d).yExp(:, iy);
end
if ar.model(m).data(d).normalize(iy) == 1
if ~threwNormWarning
warning('Normalization of experimental measurements is not supported in PEtab. Measurement values in ar.model(:).data(:).yExpRaw will be normalized before export.')
threwNormWarning = 1;
end
measurement = measurement/max(measurement);
end
% ar.model.yExp is already normalized, if normalization is active. Doing it again causes problems.
% if ar.model(m).data(d).normalize(iy) == 1
% if ~threwNormWarning
% warning('Normalization of experimental measurements is not supported in PEtab. Measurement values in ar.model(:).data(:).yExpRaw will be normalized before export.')
% threwNormWarning = 1;
% end
% measurement = measurement/max(measurement);
% end

% skip if measurement contains only NaN
if sum(isnan(measurement)) == numel(measurement)
Expand Down Expand Up @@ -314,6 +315,34 @@ function writeParameterTable(IDs)

end

% function writeVisualisationTable(m, IDs)
% %% Visualisation Table
% % this is a very simple implementation, only covers the basic features like:
% % - combining datasets
% % - lin/log10 trafo
% % - time-course / dose-response

% % plotId, plotName, datasetId, xValues, xLabel, xScale, yValues, yLabel, yScale

% global ar

% for jp = 1:length(ar.model(m).plot)
% plotId = sprintf('M%i_Plot%i', m, jp);
% plotName = ar.model(m).plot(jp).name;

% dLink = ar.model(m).plot(jp).dLink;
% for jd = 1:length(dLink)
% d = dLink(jd);
% s
% end


% end



% end


function writeYAMLfile(IDs)
%% YAML File
Expand Down

0 comments on commit c935472

Please sign in to comment.