extractPK: Extract PK data for specific parameters from a simulator...

View source: R/extractPK.R

extractPKR Documentation

Extract PK data for specific parameters from a simulator output Excel file

Description

Pull calculated PK parameters from a Simcyp simulation output Excel file. A data.frame of all possible PK parameters may be found by typing view(PKParameterDefinitions) into the console.

Usage

extractPK(
  sim_data_file,
  PKparameters = NA,
  sheet = NA,
  compoundToExtract = "substrate",
  tissue = "plasma",
  existing_exp_details = NA,
  returnAggregateOrIndiv = "aggregate",
  includeTrialInfo = TRUE,
  returnExpDetails = FALSE,
  checkDataSource = TRUE
)

Arguments

sim_data_file

name of the Excel file containing the simulator output, in quotes

PKparameters

PK parameters you want to extract from the simulator output file. Options are:

"all"

all possible parameters

"AUC tab"

only those parameters on the "AUC" tab (default). For V21 or later, this will look for tabs named something like "Int AUC 1st_CI(Sub)(CPlasma)" for the 1st dose of the substrate, for example, and pull all possible parameters there. For V21, and earlier, this will pull data from the tab literally named "AUC" or the "AUC_CI" tab or "AUC_SD" tab if a tab named "AUC"is not present.

"Absorption tab"

only those parameters on the "Absorption" or "Overall Fa Fg" tab

"Regional ADAM"

regional fraction absorbed and fraction metabolized from intestinal segments; only applies to ADAM models where the tab "Regional ADAM Fractions (Sub)" is included in the Excel file and currently only applies to substrate

a vector of any combination of specific, individual parameters, each surrounded by quotes and encapsulated with c(...)

An example: c("Cmax_dose1", "AUCtau_last"). To see the full set of possible parameters to extract, enter view(PKParameterDefinitions) into the console. Not case sensitive. If you use "_first" instead of "_dose1", that will also work.

sheet

optionally specify the name of the sheet where you'd like to pull the PK data, in quotes; for example, specify the tab where you have a user-defined AUC integration. Note: Unless you want a very specific Excel sheet that's not what the usual sheet name would be for a first or last dose, this function will work best if this is left as NA. Also, since we don't know which dose these data were for, you'll see that the output parameter names do not include the suffixes "_last" or "_dose1".

compoundToExtract

For which compound do you want to extract PK data? Options are:

  • "substrate" (default),

  • "primary metabolite 1",

  • "primary metabolite 2",

  • "secondary metabolite",

  • "inhibitor 1" – this can be an inducer, inhibitor, activator, or suppresesor, but it's labeled as "Inhibitor 1" in the simulator,

  • "inhibitor 2" for the 2nd inhibitor listed in the simulation,

  • "inhibitor 1 metabolite" for the primary metabolite of inhibitor 1

tissue

For which tissue would you like the PK parameters to be pulled? Options are "plasma" (default), "unbound plasma", "blood", "unbound blood", "peripheral plasma", or "peripheral blood". NOTE: PK for peripheral sampling is not as well tested as for other tissues and is only set up for V21+. Please check your results carefully.

existing_exp_details

If you have already run extractExpDetails_mult or extractExpDetails to get all the details from the "Input Sheet" (e.g., when you ran extractExpDetails you said exp_details = "Input Sheet" or exp_details = "all"), you can save some processing time by supplying that object here, unquoted. If left as NA, this function will run extractExpDetails behind the scenes to figure out some information about your experimental set up.

returnAggregateOrIndiv

return aggregate (default) and/or individual PK parameters? Options are "aggregate", "individual", or "both". For aggregate data, values are pulled from simulator output – not calculated – and the output will be a data.frame with the PK parameters in columns and the statistics reported exactly as in the simulator output file.

includeTrialInfo

TRUE or FALSE (default) for whether to include which individual and trial the data describe. This only applies when returnAggregateOrIndiv is "individual" or "both".

returnExpDetails

TRUE or FALSE: Since, behind the scenes, this function extracts experimental details from the "Summary" tab of the simulator output file, would you like those details to be returned here? If set to TRUE, output will be a list of 1. the requested PK data, 2. the experimental details provided on the Summary tab, and, if you have set checkDataSource to TRUE, 3. info for checking the data. (See "checkDataSource".)

checkDataSource

TRUE (default) or FALSE for whether to include in the output a data.frame that lists exactly where the data were pulled from the simulator output file. Useful for QCing.

Value

Depending on the options selected, returns a list of numerical vectors or a list of data.frames: "individual" and "aggregate". If checkDataSource is TRUE, this will also return a data.frame named "QC" that indicates where in the simulator output file the data came from.

Examples


sim_data_file <- "../Example simulator output MD + inhibitor.xlsx"
extractPK(sim_data_file)
extractPK(sim_data_file, PKparameters = "Absorption tab")
extractPK(sim_data_file, PKparameters = c("AUCinf_dose1", "Cmax_dose1"))



shirewoman2/Consultancy documentation built on Feb. 18, 2025, 10 p.m.