Releases: esqLABS/esqlabsR
esqlabsR 5.3.0
Breaking changes
-
Function
sensitivityCalculation()
with renamed parameterpkDataFilePath
tosaOutputFilePath
and updated output files to include PK parameter units (#696). -
Function
sensitivityCalculation()
now acceptsvariationRange
as bothabsolute
andrelative
values, specified by thevariationType
parameter. Added support
for passingvariationRange
as a list, allowing individual variations for
each parameter inparameterPaths
(#731).
Major Changes
-
createDefaultProjectConfiguration
is now soft-deprecated in favor of
createProjectConfiguration
. (#692) -
ProjectConfiguration
fields 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)Parameters
folder is nowConfigurations
Populations
folder is nowPopulationsCSV
ApplicationParameters.xslx
file is nowApplications.xlsx
PopulationParameters.xslx
file 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 parameter
customOutputFunctions
, allowing user-defined functions for PK parameter
calculation (#685). -
Function
sensitivitySpiderPlot
now supportsxAxisType
andyAxisType
options for switching between percent and absolute values (#695). -
Function
sensitivityCalculation()
will throw more informative messages
whenoutputPaths
orparameterPaths
is not a character vector or NULL
(#712). -
Embedded Shiny Application were removed. (#736).
Function Visualizer
can
be found in its dedicated
repository while
Unit Converter
is available as a RStudio Addin
here. -
Test ospsuite plotting functions are compatible with
esqlabsPlotConfiguration
(#733).
v5.2.0
Breaking changes
-
{esqlabsR}
now requires{ospsuite}
version 12.1.0 or higher to benefit from
embedded PK-Sim core files. -
Function
exportSteadyStateToXLS
has been removed in favor of
ospsuite::exportSteadyStateToXLS
(#598) -
Function
sensitivitySpiderPlot
overhauled with new parameters.yAxisType
to toggle betweenpercent
andabsolute
values.xAxisScale
and
yAxisScale
to set axis scales tolog
orlin
.yAxisFacetScales
to
choose betweenfree
andfixed
scales for y-axis. Further plot
customization options throughdefaultPlotConfiguration
(#632). -
Function
sensitivityTimeProfiles
with new signature. Introduced parameters
xAxisScale
andyAxisScale
to set axis scales tolog
orlin
. More
plot customization options throughdefaultPlotConfiguration
as described
in the documentation. Plots have improved color palette, scaling and legend
colors (#669). -
Function
sensitivityTimeProfiles
updated. Observed data (single or
multipleDataSet
objects) can now be added to the plots and will be
included automatically in theoutputPath
if the dimensions are convertible
(#674). -
Function
writeExcel()
is no longer exported. (#672)
Major Changes
-
New
sensitivityTornadoPlot
function for generating tornado plots that
evaluate the impact of parameter changes on sensitivity analysis outcomes.
It utilizesparameterFactor
to depict the scaling effects of parameter
modifications. Provides plot customization options through
defaultPlotConfiguration
(#652). -
New function
writeParameterStructureToXLS
to 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 ofParameter
objects, this function
expects the parameter structure as used throughout the package.
Minor improvements and bug fixes
-
Function
createScenarios
gets a new argumentstopIfParameterNotFound
. If
TRUE
(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
Scenario
class gets a new argument
stopIfParameterNotFound
. -
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.3
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, @PavelBal) - Add support for
nsd
argument fromospsuite::plotPopulationTimeProfile()
aggregation methods. A new columnnsd
was added to thePlotConfiguration
sheet in the examplePlot.xlsx
(#544, @Felixmil). - Documentation includes PK-Sim installation instructions (#537, @Felixmil).
- Better error message if some ids are not uniques in the excel configuration files (#568, @Felixmil)
- Handles better empty rows in the excel configuration files (#569, @Felixmil)
- Cleaner NEWS file (#527).
esqlabsR 5.1.0
- New vignette/article about figure creation.
- Plots are using new color palette.
- Some modifications to plot configuration files for better plots.
BREAKING CHANGE
- When importing observed data using the default importer configuration, data
set naming is grouped byStudyId
at 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}"
NEW FUNCTIONALITIES
-
loadObservedData()
gets a new argumentimporterConfiguration
. The user can
now provide a custom importer configuration for loading the data. -
Plots.xlsx, sheet 'plotConfiguration', now uses
xValuesLimits
andyValuesLimits
to 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 usexAxisLimits
andyAxisLimits
. -
Sheet 'plotConfiguration' in the Excel file 'Plots' gets additional column 'aggregation'. The value is passed to
the functionplotPopulationTimeProfile()
. Supported values are listed inospsuite::DataAggregationMethods
.arithmetic
: population results are plotted as arithmetic mean +- arithmetic standard deviationgeometric
: population results are plotted as geometric mean +- geometric standard deviationquantiles
(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 ','. Speficy 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 CHANGES
- When a scenario fails,
runScenarios()
does not crash any more, but a
warning is shown with the name of the failed scenario. The returnedoutputValues
isNULL
. - Throw a warning instead of an error if a path specified in
ProjectConfiguration
does not exist.$outputFolder
existence is not checked anymore. stringToNum()
does not show a warningNAs introduced by coercion
when a value
cannot be converted to a numeric any more. For such values,NA
is silently returned.
BUG FIXES
esqlabsR 5.0.0
New functionalities
-
New function
loadObservedDataFromPKML()
to load data from*.pkml
located in
the "PKML" sub-folder of the "Data" folder. -
New function
createScenarios()
to createScenario
objects fromScenarioConfiguration
objects -
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 ofDataSet
objects) and aProjectConfiguration
objectprojectConfiguration
. -
New function
createDataCombinedFromExcel()
createsDataCombined
objects as
defined in thePlots.xlsx
file. -
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 aPopulation
object for population simulations. -
runScenarios()
gets a new argumentsavePopulationToCSV
, with default valueFALSE
.
BREAKING CHANGES
- Field
setTestParameters
removed fromScenarioConfiguration
- Function
initializeScenario()
has been removed - Definition of simulation time in the
Scenarios.xlsx
file changed. The new expected format
is a triplet of values <StartTime, EndTime, Resolution>, whereResolution
is the number of
simulated points per time unit defined in the columnTimeUnit
. - Field
poinstPerMinute
ofScenarioConfiguration
has been removed. - Function
compareSimulationParameters()
has been removed and replaced bycompareSimulations()
Scenarios
excel file gets additional columnsSteadyStateTime
,SteadyStateTimeUnit
,
PopulationId
,OutputPathsIds
.readScenarioConfigurationFromExcel()
has a new signature and requires a list of
scenarioNames
and aProjectConfiguration
. The output is a named list ofScenarioConfiguration
objects.- Output paths are not set from global variable
OutputPaths
any more but
from the respective field ofScenarioConfgiruation
ProjectConfiguration
does not have field$outputDevice
any more.ScenarioConfiguration
does not storeSimulationRunOptions
any more. Simulation run options must be passed to therunScenarios()
function. Different run options cannot be used within one scenarios run.- Enum
GraphicsDevices
has been removed. - Function
initializeSimulation()
does not have argumentssimulateSteadyState
,steadyStateTime
andsimulationRunOptions
any more.
MAJOR CHANGES
-
New class
Scenario
that represents a scenario created from aScenarioConfiguration
-
ScenarioConfiguration
gets a new fieldoutputPaths
which 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 columnOutputPath
is the full
path to the output, whileOutputPathId
is an identifier that conveniently allows
to select the correct output.
In theScenarios
sheet, 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 .pkml
file
will be produced.
-
ScenarioConfiguration
gets a new fieldpopulationId
, specifying the id of
the population as defined in thePopulationParameters.xlsx
file, sheetDemographics
.
If the field isNULL
, the scenario is simulated as an individual simulation,
otherwise a population simulation is performed. -
ScenarioConfiguration
gets 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/Populations
and
named as thePopulationId
. -
runScenarios()
supports scenario configurations for population simulations -
Target folder for saving
*.pkml
simulations 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
ProjectConfiguration
withcreateDefaultProjectConfiguration()
-
Create
ScenarioConfigurations
, e.g. withreadScenarioConfigurationFromExcel(scenarioNames, projectConfiguration)
-
Run scenarios with
runScenarios(scenarioConfigurations)
-
Alternatively:
-
Create a
ProjectConfiguration
withcreateDefaultProjectConfiguration()
-
Create
ScenarioConfigurations
, e.g. withreadScenarioConfigurationFromExcel(scenarioNames, projectConfiguration)
-
-
ProjectConfiguration
gets 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
ScenarioConfiguration
and applying it to a human model, missing species-specific parameters are applied and the
scaling works properly. Supported scalingsa 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.
MINOR CHANGES
-
Function
stringToNum()
gets additional argumentslloqMode
anduloqMode
that determine how entries of type "<number" and ">number" will be treated. -
readScenarioConfigurationFromExcel()
will read all scenarios defined in the
Scenarios.xlsx
file if no scenario names are specified (argumentscenarioNames = NULL
). -
Function
setApplications()
is deprecated. -
Dark grey frame around legends by default.
Release Version 4.0.128
esqlabsR 4.0.128
MAJOR CHANGES
-
Three new functions to create configuration objects needed for data visualization workflows:
createEsqlabsPlotConfiguration()
createEsqlabsPlotGridConfiguration()
createEsqlabsExportConfiguration()
-
New function
getAllApplicationParameters()
that returns all parameters of
applications in a simulation -
New 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()
.
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 aProjectConfiguration
instead of a
ScenarioConfiguration
. -
DataMapping
,DataMappingConfiguration
,XYData
,DataConfiguration
and
associated functions for creating standard figures are moved toesqlabsRLegacy
package.
Release Version 3.0.89
esqlabsR 3.0.89
NEW FUNCTIONS
-
To carry out and visualize sensitivity analysis:
sensitivityCalculation()
sensitivitySpiderPlot()
sensitivityTimeProfiles()
-
Classes and functions for standard esqLABS simulation workflow:
ProjectConfiguration
ScenarioConfiguration
createDefaultProjectConfiguration()
readScenarioConfigurationFromExcel()
setApplications()
initializeScenario()
initializeScenario()
BREAKING CHANGES
- The package gains a new dependency:
{ospsuite.utils}
.
REQUIRED PACKAGES (install from CRAN):
- jsonlite,
- patchwork,
- purrr,
- R6,
- readr,
- stringr,
- tidyr,
- colorspace,
- dplyr,
- ggplot2,
- hash,
- readxl,
- shiny,
- shinyjs,
- tools,
- vctrs,
- writexl
OPTIONAL PACKAGES (required to build from source):
- knitr,
- rmarkdown,
- testthat,
- vdiffr
esqlabsR Package version 2.0.0
Maintenance and bug fixes
First GitHub release. Includes compatible packages:
- rClr 0.9.1
- ospsuite-r 10.0.72
- esqlabsR 2.0.0
You will also need to install the following packages from CRAN if you are starting with a fresh R installation:
- hash (CRAN)
- R6 (CRAN)
- readxl (CRAN)
- writexl (CRAN)
- vctrs (CRAN)
- shiny (CRAN)
- shinyjs (CRAN)
esqlabsR Package version 1.4.5
First GitHub release. Includes compatible packages:
- rClr 0.9
- ospsuite-r 10
- esqlabsR 1.4.5