extractConcTime_DB: Extract concentration-time data from a Simcyp Simulator...

View source: R/extractConcTime_DB.R

extractConcTime_DBR Documentation

Extract concentration-time data from a Simcyp Simulator database file – UNDER CONSTRUCTION!!!

Description

Extract concentration-time data from a Simcyp Simulator database file – UNDER CONSTRUCTION!!!

Usage

extractConcTime_DB(
  sim_data_file,
  existing_exp_details = NA,
  compoundToExtract = "substrate",
  tissue = "plasma",
  obs_to_sim_assignment = "use existing_exp_details",
  conc_units = "ng/mL",
  returnAggregateOrIndiv = "aggregate"
)

Arguments

sim_data_file

name of the Excel file containing the simulated concentration-time data, in quotes; must be an output file from the Simcyp simulator

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.

compoundToExtract

For which compound do you want to extract concentration-time 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

  • "conjugated protein" for DAR1-DARmax for an antibody-drug conjugate; observed data with DV listed as "Conjugated Protein Plasma Total" will match these simulated data,

  • "total protein" for DAR0-DARmax for an ADC; observed data with DV listed as "Total Protein Conjugate Plasma Total" will match these simulated data,

  • "released payload" for the released drug from an ADC, which shows up as primary metabolite 1 in Simulator output files.

Note: If your compound is a therapeutic protein or ADC, we haven't tested this very thoroughly, so please be extra careful to check that you're getting the correct data.

tissue

From which tissue should the desired concentrations be extracted? Default is plasma for typical plasma concentration-time data. All options: "plasma", "blood", "peripheral plasma", "portal vein plasma", "Kp,uu,brain", "Kp,uu,ICF", or "Kp,uu,ISF". We're working on adding more.

obs_to_sim_assignment

the assignment of which observed files go with which simulated files. (NA, which is the default, means no observed data will be extracted.) There are four ways to supply this:

"use existing_exp_details"

If you have already extracted the simulation experimental details with the function extractExpDetails_mult and you included observed data overlay files in your simulations, as long as those XML files have their corresponding Excel files in the same location, we can use that information to figure out which observed Excel file should go with which simulation. Note that this does require you to supply something for the argument existing_exp_details to work.

a character vector of the observed data files, each in quotes and encapsulated with c(...)

If all the observed data can be compared to all the simulated data, then an example of acceptable input would be: obs_to_sim_assignment = "obsdata1.xlsx". However, if you would like to specify which observed file goes with which simulated file, you can do this with a named character vector, e.g., c("obsdata1.xlsx" = "simfileA.xlsx", "obsdata2.xlsx" = "simfileB.xlsx"). If one observed file needs to match more than one simulated file but not all the simulated files, you can do that by separating the simulated files with commas, e.g., obs_to_sim_assignment = c("obs data 1.xlsx" = "mdz-5mg-qd.xlsx, mdz-5mg-qd-fa08.xlsx", "obs data 2.xlsx" = "mdz-5mg-qd-cancer.xlsx, mdz-5mg-qd-cancer-fa08.xlsx"). Pay close attention to the position of commas and quotes there! This can get a bit confusing, in our opinions, so you may want to try the other options if you need to link specific observed and simulated files; they can be easier to follow but require more typing.

a data.frame with one column for the observed files and one column for the simulated files they each match

The data.frame must have column names of "ObsFile" and "File" for the observed and simulated files, respectively. Here's an example of acceptable input: obs_to_sim_assignment = data.frame(ObsFile = c("obsdata1.xlsx", "obsdata2.xlsx"), File = c("simfileA.xlsx", "simfileB.xlsx")) Each row should contain one observed file and one simulated file, so if you want to compare a single observed file to multiple simulated files, you'll need to repeat the observed file, e.g., obs_to_sim_assignment = data.frame(ObsFile = c("obsdata1.xlsx", "obsdata2.xlsx", "obsdata2.xlsx", "obsdata2.xlsx"), File = c("simfileA.xlsx", "simfileB.xlsx", "simfileC.xlsx", "simfileD.xlsx"))

a csv file with one column for the observed files and one column for the simulated files they each match

The setup of this csv file should be just like that described for supplying a data.frame, so one row for each pair of simulated and observed files you want to compare to each other. Supply this as a character string, like this: obs_to_sim_assignment = "My obs to sim assignments.csv"

For whichever option you choose, the observed files' paths should be included if they are located somewhere other than your working directory. The observed data files should be for the Excel file that it is ready to be converted to an XML file, not the file that contains only the digitized time and concentration data. This function assumes that the dosing intervals for the observed data match those in the simulated data. See "Details" for more info.

conc_units

desired concentration units; options are the same as the ones in the Excel form for PE data entry: "ng/mL" (default), "mg/L", "mg/mL", "µg/L" (or "ug/L"), "µg/mL" (or "ug/mL"), "ng/L", "µM" (or "uM"), or "nM".

returnAggregateOrIndiv

Return aggregate and/or individual simulated concentration-time data? Options are "aggregate", "individual", or "both" (default). Aggregated data are not calculated here but are pulled from the simulator output rows labeled as "Population Statistics".

Value

a data.frame of concentration-time data

Examples

# none yet

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