- New
runSimulationsFromSnapshot()
to run simulations from.json
snapshots files, - New
convertSnapshot()
to convert project snapshots between.json
and.pksim5
files.
- The package fully supports Linux.
- The package loses dependency
{rClr}
and gains{rSharp}
. - The package does not require a local installation of PK-Sim any more. All required dependencies are shipped with the package.
- The single argument of the
getBaseUnit()
function is now namedquantityOrDimension
(wasdimension
previously). It can now use objects of classQuantity
as inputs, to be consistent with thetoBaseUnit()
function.
- The package gains
{openxlsx}
and{lifecyle}
dependencies. - Added a function
getSteadyState()
to calculate steady state values for simulations. This function is of particular use for models of endogenous substrates, where changing a parameter value (e.g., the production rate) will change the steady-state values of the substrate. The steady-state is considered to be the last values of the molecules amounts and state variable parameters in the simulation with sufficiently long simulation time, i.e., where the rates of the processes do not (significantly) change. The steady-state is NOT analytically calculated or estimated in any other way than simulating for the given time. - Added a function
exportSteadyStateToXLS()
to export steady state values calculated for one simulation using thegetSteadyState()
to an Excel file that can be imported in MoBi. - Lower limit of quantification (LLOQ) is plotted as dotted lines for
plotIndividualTimeProfile()
andplotPopulationTimeProfile()
. plotPopulationTimeProfile()
provides two new aggregations methods:arithmetic
andgeometric
average and the ability to chose the number of standard deviations to display around the mean through thensd
argument.- Function
calculateResiduals()
uses natural logarithm (log()
) when calculating residuals withscaling = "log"
as opposed tolog10()
as it was done before. This also affects figures created byplotObservedVsSimulated()
,plotResidualsVsSimulated()
, andplotResidualsVsTime()
. (#1091, #1087). plotPopulationTimeProfile()
has a newaggregation
argument that allow the user to choose between quantiles, arithmetic and geometric aggregations of y.
- Named
Simulation
lists can be passed torunSimulations()
so that the results are returned as a named list using the same names instead of the simulation id. If no name is provided, the simulation id is used as before. (#1383) - The order of columns of the data frame returned by
DataCombined$toDataFrame()
has changed. DataCombined$toDataFrame()
shows the data in the order as the data sets were added and not alphabetically sorted.DataCombined$removeGroupAssignment()
does not show a warning if specified name is not present in theDataCombined
.DataCombined$removeGroupAssignment()
does not produce an error if specified names are not unique.- Fixed Passing font size options from plotConfiguration objects to tlf objects (#1198)
- Legend now have transparent background by default and can be customized
through new
DefaultPlotConfiguration
fields (#1216) plotObsVsPred()
now have foldDistance argument set toNULL
by default (previously 2). The function will not add any fold lines on the plot by default but display identity line. Set this argument toFALSE
to not draw any lines.DefaultPlotConfiguration
has a new setting:displayLLOQ
(default TRUE) to control plotting of LLOQ lines.DefaultPlotConfiguration
'sxLimits
andyLimits
arguments are deprecated and replaced byxAxisLimits
andyAxisLimits
. Use them to zoom in the plot while preserving all data points. UsexValuesLimits
andyValuesLimits
to filter out data point outside of these range. More detailed explanations here.addSimulationResults
andaddDataSets
methods of theDataCombined
class now support an optionalsilent
argument which silences the checks for data set names. If you expect to replace data sets inDataCombined
objects repeatedly, consider switching the parameter from the defaultFALSE
value toTRUE
.simulationResultsToDataFrame()
is faster than before (#1317, @Felixmil).DataCombined
gets a new methodsetDataTypes()
to change data types (observed or simulated) for existing data sets. This method is useful when you want to enforce a certain data type, e.g., for adding artificial data set as simulated results.- New function
setOutputs()
to change outputs ofSimulationBatch
objects. It combinesclearOutputs()
andsetOutputs()
in one function. - New simulations life cycle flowcharts in the
vignette("efficient-calculations")
vignette. - New internal function
.setEndSimulationTime()
to set the end time of the simulation. The function will either extend or shorten the simulation time to the specified end time. - Using
runSimulation()
is now soft deprecated in favor ofrunSimulations()
.
-
Adds new visualization functions:
plotObservedVsSimulated()
for observed versus simulated data scatter plot.plotResidualsVsTime()
for time versus residuals data scatter plot.plotResidualsVsSimulated()
for simulated versus residuals data scatter plot.
-
Adds new helper functions to work with
DataCombined
objects:convertUnits()
to convert datasets inDataCombined
to common units.calculateResiduals()
to calculate residuals for datasets inDataCombined
.
-
The class
SimulationBatch
gets a new propertyid
. -
The output of
runSimulationBatches()
is now a named list with names being the ids ofSimulationBatch
. -
calculateResiduals()
now useslog(base = 10)
for calculation of residuals in logarithmic scale instead iflog(base = exp(1))
-
calculateResiduals()
does also return residuals for entries where simulated or observed value is 0 in logarithmic scale. These values were ignored in previous versions. If the observed or simulated value is zero or negative, it is replaced by an arbitrary small valuegetOSPSuiteSetting("LOG_SAFE_EPSILON")
(1e-20 by default).
SimulationBatch$addRunValues()
will throw an error when any start value isNaN
.SimulatioBatch
gets methodsgetVariableParameters()
andgetVariableMolecules()
that return list of parameter resp. molecule paths that are defined variable.
-
Signature for
toUnit
function has changed.molWeight
is now the fifth, whilesourceUnit
is the fourth parameter (#837). -
DataImporterConfiguration
: fieldstimeUnitFromColumn
andmeasurementUnitFromColumn
are renamed toisTimeUnitFromColumn
andisMeasurementUnitFromColumn
-
The constructor for
DataImporterConfiguration
does not accept a path to a configuration file any more. Use the functionloadDataImporterConfiguration()
to create a configuration object from a file. -
The constructor for
DataSet
objects requires aname
argument. -
All
validate*()
helper functions and"%||%"
infix operators are no longer exported. Please have a look at the new utility package, from which these functions are now exported: https://www.open-systems-pharmacology.org/OSPSuite.RUtils/. -
The
pkAnalysesAsDataFrame()
function changes column data types forQuantityPath
,Parameter
, andUnit
fromfactor
tocharacter
(#673).
-
Adds new
DataCombined
class that combines observed data (DataSet
) and simulated data (SimulationResults
) into a single object. Especially important is the$toDataFrame()
method of this object that returns a data frame containing combined data from observed and simulated data, which can be further used for visualizations or other analysis. -
Adds new visualization functions:
-
plotIndividualTimeProfile()
andplotPopulationTimeProfile()
to create time-profile plots. -
Adds a new class
DefaultPlotConfiguration
to provide plot configurations for plotting functions. -
Adds
simulationResultsToDataFrame()
function to convertSimulationResults
objects into a data frame. -
All
*ToDataFrame()
functions also get*ToTibble()
variants to extract a tibble data frame instead of a classical data frame. -
Following functions are marked for deprecation and will be removed in future releases:
pkAnalysesAsDataFrame()
is nowpkAnalysesToDataFrame()
populationAsDataFrame()
is nowpopulationToDataFrame()
Version compatible with the OSPSuite V10.
- Enable Batch Simulation Run (#444).
- Export of population to CSV (#423).
- Support aging data for population calculation (#295).
- Enums to look up units and dimensions (#478).
- Support R4 (#531).
- extend setParameterValuesByPath function (#541).
- DataSet: load from PKML (#575).
- Efficient calculations, see this vignette.
- Cannot calculate PK-Parameters of a population when one individual simulation failed (#436).
- Usability issue when creating a population (#473).
- Unnecessary Debug output in some plot tasks (#503).
- uniqueEntities: Error when passing only one entity (#515).
- R-Toolbox bug? getAllParametersMatching(). (#428).
- Add CL parameter to the list of StandardPKPArameters (#582).
- toBaseUnit and toUnit should support null as input (and return null). (#583).
- ospsuite::toBaseUnit should be case insensitive (#614).
- Integer variables not handled by some functions (#553).
- Version compatible with the OSPSuite V9.
- Initial Release