Skip to contents

Import and export

Load snapshots and export modifications

load_snapshot()
Load a snapshot from various sources
export_snapshot()
Export a snapshot to a JSON file
create_snapshot()
Create an empty snapshot
osp_models()
Browse available OSPSuite building block templates

Building blocks

R6 classes wrapping the PK-Sim building blocks and the root snapshot

Snapshot
Snapshot class for OSP snapshots
Compound
Compound class for OSP snapshot compounds
Event
Event class for OSP snapshot events
ExpressionProfile
ExpressionProfile class for OSP snapshot expression profiles
Formulation
Formulation class for OSP snapshot formulations
Individual
Individual class for OSP snapshot individuals
ObserverSet
ObserverSet class for OSP snapshot observer sets
Population
Population class for OSP snapshot populations
Protocol
Protocol class for OSP snapshot protocols
Simulation
Simulation class for OSP snapshot simulations

Leaf and sub-structure types

Reusable R6 leaf classes and sub-structures held inside building blocks

AdvancedParameter
AdvancedParameter class for Population advanced parameters
CalculationMethods
CalculationMethods class for OSP snapshots
CompoundProcessSelection
CompoundProcessSelection class for compound process selections
EventSelection
EventSelection class for Simulation event references
FormulationSelection
FormulationSelection class for Simulation compound formulations
LocalizedParameter
LocalizedParameter class for path-bearing OSP snapshot parameters
Observer
Observer class for OSP snapshot observer sets
ObserverSetSelection
ObserverSetSelection class for Simulation observer-set references
OriginData
OriginData class for OSP snapshot individuals
OutputInterval
OutputInterval class for Simulation output schemas
OutputMapping
OutputMapping class for simulation output-to-observed-data mappings
OutputSchema
OutputSchema class for Simulation output schedules
Parameter
Parameter class for OSP snapshot parameters
Process
Process class for OSP snapshot compound processes
ProtocolSelection
ProtocolSelection class for Simulation compound protocol assignments
Schema
Schema class for OSP advanced protocols
SchemaItem
SchemaItem class for OSP advanced protocols
SolverSettings
SolverSettings class for simulation solver configuration
range()
Create a range object for physiological parameters
Range-class Range
Range class for physiological parameters

Factories

Construct building blocks and leaves from named arguments

create_compound()
Create a new compound
create_compound_process_selection()
Create a compound process selection
create_descriptor_condition()
Create a container criterion for an observer
create_event()
Create a new event
create_event_selection()
Create an event selection for a simulation
create_expression_profile()
Create a new expression profile
create_formula_reference()
Create a formula reference for an observer
create_formulation()
Create a new formulation
create_formulation_selection()
Create a formulation selection for a simulation compound
create_individual()
Create a new individual
create_molecule_list()
Create a molecule list for an observer
create_observed_data()
Create a new observed data set
create_observer()
Create a new observer
create_observer_set()
Create a new observer set
create_observer_set_selection()
Create an observer-set selection for a simulation
create_output_interval()
Create an output interval for a simulation output schema
create_output_mapping()
Create an output-to-observed-data mapping for a simulation
create_output_schema()
Create an output schema for a simulation
create_parameter()
Create a new parameter
create_population()
Create a new population
create_process()
Create a new compound process
create_protocol()
Create a new protocol
create_protocol_selection()
Create a protocol selection for a simulation compound
create_schema()
Create a new schema
create_schema_item()
Create a new schema item
create_solver_settings()
Create a solver settings object for a simulation

Value-object helpers

Bundle a value, unit, and field-specific extras for the create_* factory arguments

lipophilicity()
Lipophilicity value object
fraction_unbound()
Fraction unbound value object
solubility()
Solubility value object
intestinal_permeability()
Intestinal permeability value object
permeability()
Permeability value object
age()
Age value object
weight()
Weight value object
height()
Height value object
gestational_age()
Gestational age value object
time()
Time series value object
values()
Measurement values series value object
error()
Error series value object

Mutators

Add and remove building blocks on a snapshot

add_compound()
Add one or more compounds to a snapshot
add_event()
Add one or more events to a snapshot
add_expression_profile()
Add one or more expression profiles to a snapshot
add_formulation()
Add one or more formulations to a snapshot
add_individual()
Add one or more individuals to a snapshot
add_observed_data()
Add one or more observed-data entries to a snapshot
add_observer_set()
Add one or more observer sets to a snapshot
add_population()
Add one or more populations to a snapshot
add_protocol()
Add one or more protocols to a snapshot
add_simulation()
Build a simulation from a snapshot and attach it
remove_compound()
Remove compounds from a snapshot
remove_event()
Remove events from a snapshot
remove_expression_profile()
Remove expression profiles from a snapshot
remove_formulation()
Remove formulations from a snapshot
remove_individual()
Remove individuals from a snapshot
remove_observed_data()
Remove observed data from a snapshot
remove_observer_set()
Remove observer sets from a snapshot
remove_population()
Remove populations from a snapshot
remove_protocol()
Remove protocols from a snapshot
remove_simulation()
Remove simulations from a snapshot

Tibble exporters

Convert building blocks to tibbles for analysis

as_tibbles()
Convert a snapshot collection to a tibble or list of tibbles
get_compounds_dfs()
Get all compounds in a snapshot as data frames
get_events_dfs()
Get all events in a snapshot as data frames
get_expression_profiles_dfs()
Get all expression profiles in a snapshot as data frames
get_formulations_dfs()
Get all formulations in a snapshot as data frames
get_individuals_dfs()
Get all individuals in a snapshot as data frames
get_observed_data_dfs()
Get all observed data in a snapshot as a tibble
get_observer_sets_dfs()
Get all observer sets in a snapshot as data frames
get_populations_dfs()
Get all populations in a snapshot as data frames
get_protocols_dfs()
Get all protocols in a snapshot as a single consolidated data frame

Observed data

Bridge between PK-Sim observed data and ospsuite

loadDataSetFromSnapshot()
Load DataSet from OSP snapshot observed data

Validators and utilities

Helpers for validation and data conversion

get_default_alternative()
Get the default alternative of a compound property
validate_snapshot()
Validate that an object is a Snapshot
validate_species()
Validate that a species is valid
validate_population()
Validate that a population is valid
validate_gender()
Validate that a gender is valid
validate_unit()
Validate that a unit is valid for a given dimension
convert_ospsuite_time_unit_to_lubridate()
Convert ospsuite time units to lubridate-compatible units
convert_ospsuite_time_to_duration()
Convert time value and unit to lubridate duration

Formatted display methods for building block collections

print(<biliary_clearance>)
Print method for biliary clearance processes
print(<compound_additional_parameters>)
Print method for compound additional parameters
print(<compound_processes>)
S3 print method for compound processes
print(<hepatic_clearance>)
Print method for hepatic clearance processes
print(<induction>)
Print method for induction processes
print(<inhibition>)
Print method for inhibition processes
print(<metabolizing_enzymes>)
Print method for metabolizing enzymes
print(<parameter_collection>)
Print method for parameter collections
print(<physicochemical_property>)
S3 print method for physicochemical properties
print(<protein_binding_partners>)
Print method for protein binding partners
print(<renal_clearance>)
Print method for renal clearance processes
print(<snapshot_collection>)
Generic print method for snapshot collections
print(<transporter_proteins>)
Print method for transporter proteins