esqlabsR 5.5.1
Minor improvements and bug fixes
- Improved Excel validation for plot configurations with clearer error messages (#848). When axis limits (xAxisLimits, yAxisLimits, xValuesLimits, yValuesLimits) are incorrectly formatted (e.g., space-separated “72 80” instead of comma-separated “72, 80”), users now receive specific error messages indicating the field name, plot ID, and correct format. Uses ospsuite.utils validation functions internally.
- Enhanced
createScenarioConfigurationsFromPKML()with vector argument support - all parameters now support named vectors and vector recycling for flexible scenario creation. (#890) - Added support for named vectors in
outputPathsparameter across scenario functions - names serve as aliases for output paths, e.g.,c("plasma" = "Organism|VenousBlood|Plasma|Drug|Concentration in container"). (#890) - Added Excel append functionality to
exportParametersToXLS()- newappendparameter allows adding parameters to existing Excel files without overwriting. (#890) - Added Excel sheet name sanitization for application protocols - protocol names are automatically sanitized to comply with Excel naming rules, removing invalid characters and truncating long names. (#890)
- Improved
.validateCharVector()to enforce atomic character vectors (#881). - Parenthesis in parameter sheet names are ignored, allowing separating sheet names with spaces (#883).
- Used
cliFormatfunction for consistent and maintainable message formatting (#900). - Fixed an issue where PK parameter calculations failed when no baseline data (
ParameterFactor == 1) was available due to simulation error. These cases are now skipped with a warning.
esqlabsR 5.5.0
Breaking changes
Protein ontogenies for individuals and populations are now defined in one column
Protein Ontogeniesin the sheetsIndividualBiometrics(for individuals) orDemographics(for populations). The columnsProteinandOntogenyare no longer supported. The new columnProtein Ontogeniesis a comma-separated list of protein names and ontogeny names pairs. For example:CYP3A4:CYP3A4,CYP2D6:CYP2C8will create a CYP3A4 ontogeny for the protein CYP3A4 and a CYP2D6 ontogeny for the protein CYP2C8. (#825)The function
createDataCombinedFromExcel()gets a new signature. The argumentsfileandsheetare removed. The file from which theDataCombinedobjects are created is now passed as part of theProjectConfigurationpassed asprojectConfigurationargument, the sheet is alwaysDataCombined.The function
createDataCombinedFromExcel()gets a new argumentplotGridNames. TheplotGridNamesargument is a character vector of names of the plots specified in the sheetplotGrids. The function will then create and returnDataCombinedused in the specified plots. The new argument can be combined withdataCombinedNames.Useful in combination with the new argumentdataCombinedListof the functioncreatePlotsFromExcel().Argument
dataCombinedNames = NULLof the functioncreateDataCombinedFromExcel()does not createDataCombinedfor all entries in the excel file any more. IfdataCombinedNames = NULL,plotGridNamesmust be specified. If both arguments areNULL, an empty list is returned.
Major changes
User-defined parameters passed to the
createScenarios()orScenario$new()in thecustomParamsargument are applied last. Up to this version, they were overwritten by the administration protocol (#817).-
Project Configuration Version Control - Added comprehensive snapshot and restore functionality for project configurations:
-
snapshotProjectConfiguration()exports all Excel configuration files to a single JSON file for version control -
restoreProjectConfiguration()recreates Excel files from JSON snapshots for easy project sharing -
projectConfigurationStatus()checks synchronization between Excel files and JSON snapshots - Perfect for team collaboration, Git version control, and project backup strategies
- Comprehensive documentation for version control features is now included in
vignette("project-structure").
-
createPlotsFromExcel()now accepts a (named) list ofDataCombinedobjects as input to create plots defined in theplotGridNamesargument. MissingDataCombinedwill be created from the Excel file (default behavior).New
saveSensitivityCalculation()andloadSensitivityCalculation()functions to save and restore sensitivity analysis results (#862).Add
createScenarioConfigurationsFromPKML()andaddScenarioConfigurationsToExcel()functions that automate scenario creation and writing to Excel from PKML files (#853).Added species-specific parameter sheets for the species Beagle, Dog, Minipig, and Mouse. It is now possible to create scenarios for each species implemented in PK-Sim (except for the experimental cat and cattle) from the base human simulation.
Minor improvements and bug fixes
-
readScenarioConfigurationFromExcel()ignores rows whereScenario_nameis empty. - Fixed a bug when the dimension in the y-axis label of
sensitivityTimeProfiles()did not match the unit (#823). -
sensitivityTimeProfiles()accepts aDataSetor a list ofDataSetobjects forobservedData(#831). -
sensitivityTornadoPlot()accepts a newxAxisZoomRangeparameter to control the visible x-axis range in the plot (#840). - When creating a scenario, the name of the scenario is set as the name of the simulation. This way, when saving the simulation to PKML and loading in MoBi, the loaded simulation will have the updated name.
- Fixed a bug in
createPlotsFromExcel()when subtitle of PlotConfiguration was not applied (#845). - Added example usage of
sensitivityTornadoPlot()to the sensitivity analysis vignette (#847). - New vignette on sensitivity analysis plot customization (#858).
- Corrected x-axis label in
sensitivityTornadoPlot()to reflect changes in PK parameter (#861). - Better error message when
SteadyState = TRUEandSteadyStateTimebut notSteadyStateTimeUnitis defined in the scenario configuration (#863). -
createPlotsFromExcel()does not fail whenplotGridshas notitlecolumn. (#860) - The package
ospsuite.utilsis imported but not the direct dependency. (#836)
esqlabsR 5.4.0
Breaking changes
{esqlabsR}
now requires{ospsuite.utils}` version >= 1.7.0.-
The Importer configuration provided with the template project has been updated to include
Genderin the naming pattern. The new naming pattern is as follows:{Study Id}_{Molecule}_{Subject Id}_{Species}_{Gender}_{Organ}_{Compartment}_{Dose}_{Route}_{Group Id}.This change will only affect new projects initailized with the new package version. Keep in mind that
Plots.xlsxfiles created with the old naming pattern will not work with the new configuration. You will have to manually add theGendernaming section (if no gender was specified in the observed data excel sheet, simply add an additional_) after theSpeciessection to the names of the data sets specified in theDataCombinedsheet of thePlots.xlsxfile. -
Snake case functions have been renamed to follow camelCase convention. This includes:
-
init_project()function has been renamed toinitProject(), -
esqlabs_colors()function has been renamed toesqlabsColors().
-
The functions
hillFunction(),foldChangeFunction(), andsineFunction()have been removed.The function
escapeForRegex()has been removed from the package.
Major changes
ProjectConfiguration.xslxconfiguration file now support environment variables. When creating project configuration usingcreateProjectConfiguration()or when modifying the projectConfiguration object directly, the package will look for matching environment variables and build the paths accordingly. A message is shown to the user to make this transparent.Complete
sensitivitySpiderPlotdocumentation (#799)parameterPathsinsensitivityCalculation()can now be a named vector. The names will be stored and used as custom labels in all relevant plotting functions (#811).
Minor improvements and bug fixes
Improved print outputs for all classes
Classes do not inherit from the deprecated
Printableclass from the ospsuite.utils package.Print methods for all classes are now implemented using the
ospPrint\*functions introduced in version 1.7.0. of the ospsuite.utils package.Fix when
createPlotsFromExcelorcreateDataCombinedFromExcelwould return wrong names of DataCombined for which the output path for a simulation scenario is not defined (#800).
Minor improvements and bug fixes
Fix warnings related to NSE evaluation (#762)
Figures defined for the export in the
exportConfigurationsheet of thePlots.xlsxfile are now exported to the subfolderFigures\<Current Time Stamp>of theResultsfolder defined in theProjectConfiguration(#778).Fix warning cannot be displayed when no individual model parameters are displayed.
sensitivityCalculation()now supports non-default PK parameters, e.g., user-defined PK-Parameters (see https://www.open-systems-pharmacology.org/OSPSuite-R/articles/pk-analysis.html#user-defined-pk-parameters for how to create user-defined PK parameters). (#788)Fix
extendPopulationFromXLS()did not created correct parameter paths (#769).
esqlabsR 5.3.0
Breaking changes
- Function
sensitivityCalculation()with renamed parameterpkDataFilePathtosaOutputFilePathand updated output files to include PK parameter units (#696). - Function
sensitivityCalculation()now acceptsvariationRangeas bothabsoluteandrelativevalues, specified by thevariationTypeparameter. Added support for passingvariationRangeas a list, allowing individual variations for each parameter inparameterPaths(#731).
Major Changes
-
createDefaultProjectConfigurationis now soft-deprecated in favor ofcreateProjectConfiguration. (#692) -
ProjectConfigurationfields have been renamed to be more consistant and easier to understand. (#692) - Files and folders names in project directory have been harmonized and improved (#692)
-
Parametersfolder is nowConfigurations -
Populationsfolder is nowPopulationsCSV -
ApplicationParameters.xslxfile is nowApplications.xlsx -
PopulationParameters.xslxfile is nowPopulations.xlsx - Previous directory structure is still supported but deprecated.
-
-
{ospsuite.parameteridentification}is not longer a dependency of esqlabsR.
Minor improvements and bug fixes
When an application protocol defined for a scenario is not found in the excel file, an error is thrown.
Handle simulation failures in
sensitivityCalculation(#694).Function
sensitivityCalculation()supports new parametercustomOutputFunctions, allowing user-defined functions for PK parameter calculation (#685).Function
sensitivitySpiderPlotnow supportsxAxisTypeandyAxisTypeoptions for switching between percent and absolute values (#695).Function
sensitivityCalculation()will throw more informative messages whenoutputPathsorparameterPathsis not a character vector or NULL (#712).Minor improvements and bug fixes (#720).
Embedded Shiny Application were removed. (#736).
Function Visualizercan be found in its dedicated repository whileUnit Converteris available as a RStudio Addin here.Test ospsuite plotting functions are compatible with
esqlabsPlotConfiguration(#733).
esqlabsR 5.2.0
Breaking changes
esqlabsR now requires ospsuite version 12.1.0 or higher to benefit from embedded PK-Sim core files.
Function
exportSteadyStateToXLShas been removed in favor ofospsuite::exportSteadyStateToXLS(#598)Function
sensitivitySpiderPlotoverhauled with new parameters.yAxisTypeto toggle betweenpercentandabsolutevalues.xAxisScaleandyAxisScaleto set axis scales tologorlin.yAxisFacetScalesto choose betweenfreeandfixedscales for y-axis. Further plot customization options throughdefaultPlotConfiguration(#632).-
Function
sensitivityTimeProfileswith new signature and enhanced visuals:-
xAxisScaleandyAxisScaleto set axis scales tologorlin(#669). -
xUnitsandyUnitsto change units in the plot (#688). - Enhanced plot customization options through
defaultPlotConfigurationas described in the documentation (#669). - Support for adding
observedData(single or multipleDataSetobjects) to the plots (#674).
-
Function
writeExcel()is no longer exported. (#672)
Major Changes
New
sensitivityTornadoPlotfunction for generating tornado plots that evaluate the impact of parameter changes on sensitivity analysis outcomes. It utilizesparameterFactorto depict the scaling effects of parameter modifications. Provides plot customization options throughdefaultPlotConfiguration(#652).New function
writeParameterStructureToXLSto write a list of parameter paths, values, and units (e.g., imported using thereadParametersFromXLS()function) to an Excel file. In contrast toexportParametersToXLS(), which writes an excel file for a list ofParameterobjects, this function expects the parameter structure as used throughout the package.
Minor improvements and bug fixes
Function
createScenariosgets a new argumentstopIfParameterNotFound. IfTRUE(default), a scenario will not be created and an error is thrown if any user-defined parameter (e.g., provided in Excel files) is not found in the simulation. IfFALSE, non-existing parameters are ignored. (#559)Constructor of a
Scenarioclass gets a new argumentstopIfParameterNotFound.More explicit error is shown if x/yOffsetsUnit is not set when x/yOffset is defined.
Plotting functions have improved dynamic axis breaks, limits calculation, and labeling (#691).
esqlabsR 5.1.2
Minor improvements and bug fixes
- Fixes a bug where scenario results could not be saved or loaded when scenario name contains a slash or a backslash (#548)
- Add support for
nsdargument fromospsuite::plotPopulationTimeProfile()aggregation methods. A new columnnsdwas added to thePlotConfigurationsheet in the examplePlot.xlsx(#544). - Documentation includes PK-Sim installation instructions (#537).
- Better error message if some ids are not unique in the excel configuration files (#568)
- Handles better empty rows in the excel configuration files (#569)
- Cleaner NEWS file (#527).
esqlabsR 5.1.0
Breaking Changes
- When importing observed data using the default importer configuration, data set naming is grouped by
StudyIdat the first place.- Before:
{Molecule}_{Study Id}_{Subject Id}_{Species}_{Organ}_{Compartment}_{Dose}_{Route}_{Group Id} - After:
{Study Id}_{Molecule}_{Subject Id}_{Species}_{Organ}_{Compartment}_{Dose}_{Route}_{Group Id}This will result in different data set names, and plots specifying the data sets by the old naming will fail. For compatibility, use custom importer configuration with the old naming:
importerConfiguration <- ospsuite::loadDataImporterConfiguration( configurationFilePath = projectConfiguration$dataImporterConfigurationFile ) importerConfiguration$namingPattern <- "{Molecule}_{Study Id}_{Subject Id}_{Species}_{Organ}_{Compartment}_{Dose}_{Route}_{Group Id}" - Before:
Major changes
loadObservedData()gets a new argumentimporterConfiguration. The user can now provide a custom importer configuration for loading the data.Plots.xlsx, sheet ‘plotConfiguration’, now uses
xValuesLimitsandyValuesLimitsto set axis limits of the plots by default. This approach filters data outside of the limits. See https://ggplot2.tidyverse.org/reference/coord_cartesian.html#ref-examples for more details. The user can still usexAxisLimitsandyAxisLimits.-
Sheet ‘plotConfiguration’ in the Excel file ‘Plots’ gets additional column ‘aggregation’. The value is passed to the function
plotPopulationTimeProfile(). Supported values are listed inospsuite::DataAggregationMethods.-
arithmetic: population results are plotted as arithmetic mean +- arithmetic standard deviation -
geometric: population results are plotted as geometric mean +- geometric standard deviation -
quantiles(default): population results are plotted as quantiles defined in the columnquantiles.
-
Protein ontogenies can be defined for populations and individuals. To specify ontogenies for proteins in the simulation, list the proteins you want to define ontogenies for in the column ‘Protein’ of files ‘PopulationParameters.xlsx’ or ‘Individuals.xlsx’, separated by a ‘,’. Specify the ontogenies available in PK-Sim (see article https://www.open-systems-pharmacology.org/OSPSuite-R/articles/create-individual.html#adding-enzyme-ontogenies) in the column ‘Ontogenies’. The number of entries in the both columns must be equal.
Excel file ‘PopulationParameters.xlsx’ gets additional columns ‘Protein’ and ‘Ontogeny’.
Excel file ‘Individuals.xlsx’ gets additional columns ‘Protein’ and ‘Ontogeny’.
Minor improvements and bug fixes
When a scenario fails,
runScenarios()does not crash any more, but a warning is shown with the name of the failed scenario. The returnedoutputValuesisNULL.Throw a warning instead of an error if a path specified in
ProjectConfigurationdoes not exist.$outputFolderexistence is not checked anymore.stringToNum()does not show a warningNAs introduced by coercionwhen a value cannot be converted to a numeric any more. For such values,NAis silently returned.exportParametersToXLS - ignore parameters with NaN (#480)
Show a meaningful error when no time unit is specified for a scenario (#483)
New vignette/article about figure creation.
Plots are using new color palette.
Some modifications to plot configuration files for better plots. (#456)
esqlabsR 5.0.0
Breaking Changes
Field
setTestParametersremoved fromScenarioConfigurationFunction
initializeScenario()has been removed.Definition of simulation time in the
Scenarios.xlsxfile changed. The new expected format is a triplet of values <StartTime, EndTime, Resolution>, whereResolutionis the number of simulated points per time unit defined in the columnTimeUnit.Field
poinstPerMinuteofScenarioConfigurationhas been removed.Function
compareSimulationParameters()has been removed and replaced bycompareSimulations()Scenariosexcel file gets additional columnsSteadyStateTime,SteadyStateTimeUnit,PopulationId,OutputPathsIds.readScenarioConfigurationFromExcel()has a new signature and requires a list ofscenarioNamesand aProjectConfiguration. The output is a named list ofScenarioConfigurationobjects.Output paths are not set from global variable
OutputPathsany more but from the respective field ofScenarioConfgiruationProjectConfigurationdoes not have field$outputDeviceany more.ScenarioConfigurationdoes not storeSimulationRunOptionsany more. Simulation run options must be passed to therunScenarios()function. Different run options cannot be used within one scenarios run.Enum
GraphicsDeviceshas been removed.Function
initializeSimulation()does not have argumentssimulateSteadyState,steadyStateTimeandsimulationRunOptionsany more.
Major changes
New class
Scenariothat represents a scenario created from aScenarioConfiguration.ScenarioConfigurationgets a new fieldoutputPathswhich is a list of output paths for which the results will be calculated. IfNULL(default), outputs as defined in the simulation are used.Paths of model outputs are defined in the excel file
Scenarios.xlsx. In the sheetOutputPaths, create an entry for each output. The columnOutputPathis the full path to the output, whileOutputPathIdis an identifier that conveniently allows to select the correct output.
In theScenariossheet, enter the IDs of all paths the outputs should be generated for, separated by a,, e.g.Aciclovir_PVB, Aciclovir_fat_cell. If no outputs are specified, the outputs as defined in the simulation.pkmlfile will be produced.ScenarioConfigurationgets a new fieldpopulationId, specifying the id of the population as defined in thePopulationParameters.xlsxfile, sheetDemographics. If the field isNULL, the scenario is simulated as an individual simulation, otherwise a population simulation is performed.ScenarioConfigurationgets a new fieldreadPopulationFromCSV. IfFALSE(default), a new population is created from defined population demographics. IfTRUE, a simulation will be imported from a csv sheet located in the folderParameters/Populationsand named as thePopulationId.runScenarios()supports scenario configurations for population simulations.Target folder for saving
*.pkmlsimulations whenrunScenarios(scenarioConfigurations, saveSimulationsToPKML = TRUE)changed fromModels/Simulations/<DateSuffix>toResults/SimulationResults/<DateSuffix>.sensitivityCalculation()- fixed bug in wrong calculation of sensitivity values. Please be aware that the results produced by earlier versions are wrong.-
The workflow for running scenarios changed to:
- Create a
ProjectConfigurationwithcreateDefaultProjectConfiguration() - Create
ScenarioConfigurations, e.g. with readScenarioConfigurationFromExcel(scenarioNames, projectConfiguration)` - Run scenarios with
runScenarios(scenarioConfigurations)Alternatively: - Create a
ProjectConfigurationwithcreateDefaultProjectConfiguration() - Create
ScenarioConfigurations, e.g. with
- Create a
readScenarioConfigurationFromExcel(scenarioNames, projectConfiguration)
-
ProjectConfigurationgets a new fieldplotsFile. It is the name of the excel file with plot definitions and must be located in theparamsFolder. - When defining an individual of other species than human in
ScenarioConfigurationand applying it to a human model, missing species-specific parameters are applied and the scaling works properly. Supported scalings are: Human to rat, human to monkey, human to rabbit. -
initializeSimulation()does not perform steady-state run any more. This is done as part of therunScenarios()function. - New function
loadObservedDataFromPKML()to load data from*.pkmllocated in the “PKML” sub-folder of the “Data” folder. - New function
createScenarios()to createScenarioobjects fromScenarioConfigurationobjects. - Plots can be created by calling the new function
createPlotsFromExcel(). It requires as input parameterssimulatedScenarios(a list of simulated scenarios as returned byrunScenarios()),observedData(a list ofDataSetobjects) and aProjectConfigurationobjectprojectConfiguration. - New function
createDataCombinedFromExcel()createsDataCombinedobjects as defined in thePlots.xlsxfile. - New function
saveScenarioResults()to save results produced by therunScenarios()function to csv files and corresponding simulations to pkml files. - New function
loadScenarioResults()to load results from csv files into a structure as produced by therunScenarios()function. - New function
compareSimulation()to compare two simulations for differences. -
runScenarios()also returns aPopulationobject for population simulations. -
runScenarios()gets a new argumentsavePopulationToCSV, with default valueFALSE. -
esqlabsRextends thetlf::ExportConfigurationclass to dynamically calculate the height of the exported figure from the number of rows and the new parameterheightPerRow.
Minor changes and bug fixes
Function
stringToNum()gets additional argumentslloqModeanduloqModethat determine how entries of type “<number” and “>number” will be treated.readScenarioConfigurationFromExcel()will read all scenarios defined in theScenarios.xlsxfile if no scenario names are specified (argumentscenarioNames = NULL).Function
setApplications()is deprecated.Dark gray frame around legends by default.
esqlabsR 4.0.0
Breaking changes
The package requires R version >=4.1.
-
The package gains new dependencies:
Function
getSteadyState()has been moved to package{ospsuite.parameteridentification}.Function
loadObservedData()requires aProjectConfigurationinstead of aScenarioConfiguration.DataMapping,DataMappingConfiguration,XYData,DataConfigurationand associated functions for creating standard figures are moved toesqlabsRLegacypackage.
Major changes
-
Three new functions to create configuration objects needed for data visualization workflows:
New function
getAllApplicationParameters()that returns all parameters of applications in a simulationNew function
exportParametersToXLS()to write parameter information into an excel file that can be loaded in MoBi or R using thereadParametersFromXLS()function.New function
writeExcel()that is a wrapper for creating a directory (if not present) and writing to excel file usingwritexl::write_xlsx().
esqlabsR 3.0.0
Major changes
-
To carry out and visualize sensitivity analysis:
-
Classes and functions for standard esqLABS simulation workflow:
ProjectConfigurationScenarioConfigurationcreateDefaultProjectConfiguration()readScenarioConfigurationFromExcel()setApplications()initializeScenario()
Maintenance and bug fixes.
The package gains a new dependency:
{ospsuite.utils}.
