From c93547240c178d131db0929912ba93d352868042 Mon Sep 17 00:00:00 2001 From: Niklas Neubrand <38315848+niklasneubrand@users.noreply.github.com> Date: Wed, 23 Oct 2024 13:49:51 +0200 Subject: [PATCH] fix normalization of data for PEtab --- arFramework3/ImportExport/arExportPEtab.m | 43 +++++++++++++++++++---- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/arFramework3/ImportExport/arExportPEtab.m b/arFramework3/ImportExport/arExportPEtab.m index 559de8d3..96080253 100644 --- a/arFramework3/ImportExport/arExportPEtab.m +++ b/arFramework3/ImportExport/arExportPEtab.m @@ -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) @@ -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