View source: R/annotateDetails.R
annotateDetails | R Documentation |
annotateDetails
uses output from either
extractExpDetails
or extractExpDetails_mult
,
formats it, adds columns for
which compound the information pertains to (substrate, inhibitor, etc.),
which section of the Simcyp Simulator this detail is found in (physchem, absorption, distribution, etc.),
notes describing what the detail is, and
which sheet in the Simulator output Excel file or in the Simulator workspace the information was pulled from.
It will also optionally filter the data to return only
specifically requested information. If you find yourself overwhelmed at the
amount of information, we recommend looking at just one compound at a time.
You can set the compoundID
argument to just the compound ID you want
– "substrate", "inhibitor 1", etc. – or set the compound
argument to
just the compound you want – "midazolam" or "Client Drug X" – and that will
also help make things less overwhelming and easier to find. For detailed
instructions and examples, please see the SharePoint file "Simcyp PBPKConsult
R Files - Simcyp PBPKConsult R Files/SimcypConsultancy function examples and
instructions/Checking simulation experimental
details/Checking-simulation-experimental-details.docx". (Sorry, we are unable
to include a link to it here.)
annotateDetails(
existing_exp_details,
compoundID = NA,
compound = NA,
template_sim = NA,
sims_to_include = NA,
show_only_diff_from_template = FALSE,
simulator_section = NA,
detail_set = "all",
find_matching_details = NA,
show_compound_col = TRUE,
omit_all_missing = TRUE,
file_order = NA,
return_list = FALSE,
save_output = NA,
output_tab_name = "Simulation experimental details",
filename_text = NA
)
existing_exp_details |
output from |
compoundID |
optionally supply one or more of "substrate", "primary
metabolite 1", "primary metabolite 2", "secondary metabolite", "inhibitor
1", "inhibitor 2", or "inhibitor 1 metabolite" to return information
only on that/those compound(s). Remember to contain more than one
compound ID with |
compound |
optionally supply a specific compound name or part of a
specific compound name to get all possible compounds that match that and
only compounds that match that. Regular expressions are acceptable
here, e.g., |
template_sim |
optionally include a specific file name – it must be one
of the files included in the object you supply for
|
sims_to_include |
optionally specify which simulation files you'd like to include in the annotated output. Acceptable input:
|
show_only_diff_from_template |
TRUE or FALSE (default) to show only the details that differ from the template simulation, which reduces the number of rows in your output and can make it easier to find what has changed between simulations |
simulator_section |
optionally supply a specific simulator section or
sections from which to find simulation experimental details and then return
only those details. Options are "Absorption", "Distribution",
"Elimination", "Transport", "Interaction", "Phys Chem and Blood Binding",
"Population", or "Trial Design". Not case sensitive. If you want more than
one, enclose them with |
detail_set |
optionally supply a set of details and this will return only those details. Options:
Not case sensitive. |
find_matching_details |
optionally supply a string of text to search for in the column "Detail". Regular expressions are supported here, so use, e.g.,
An example: |
show_compound_col |
TRUE (default), FALSE, or "concatenate" for whether to include in the results the column "Compound", which is the compound's specific name in each simulation. Why would you ever omit this? If you have a compound with a slightly different name across multiple simulations, e.g., "DrugX" and "Drug X", and "Drug X - reduced Ki", you'll get a new row for every possible combination of "Compound" and "Detail", which might not make for easy comparisons. For example, a Ki value for "DrugX" will be in one row and the same Ki value for "Drug X" will be on a separate row. Try setting this to TRUE when you have similarly named compounds that really should be compared and see how that compares to the default. If you set this to "concatenate", you'll get all the possible compound names together; in the example we just gave, you would see "DrugX, Drug X, or Drug X - reduced Ki" listed as the compound. |
omit_all_missing |
TRUE (default) or FALSE for whether to omit a detail if the values are NA for all files |
file_order |
optionally specify the order in which files should be shown
in the annotated output, e.g., |
return_list |
TRUE or FALSE (default) for whether to return the entire
list of information from |
save_output |
optionally save the output by supplying a csv or Excel file name in quotes here, e.g., "Simulation details.csv" or "Simulation details.xlsx". Do not include any slashes, dollar signs, or periods in the file name. If you leave off the file extension, it will be saved as a csv file. |
output_tab_name |
the tab name to use when saving the output as an Excel
file. If you specify a tab that does not already exist in the Excel file
you specified with |
filename_text |
SOON TO BE DEPRECATED optionally specify a string of text to use for looking at only a subset of files. |
Returns a data.frame of simulation experimental details including the following columns:
the simulator section this detail is from, e.g., "absorption" or "elimination"
the source of the data; this will be a sheet name in an Excel output file or a workspace or database file
an explanation of what this detail is
the simulator compound ID that this information pertains to, e.g., "substrate" or "inhibitor 1"
the name of the compound in the simulator, e.g., "Sim-Midazolam"
the specific experimental detail
If all of the files have the exact same value for this particular combination of detail, compound, and compound ID, that value will show up in this column. The idea is that this makes it easy to check that everything that should be the same in a plethora of simulations actually is the same.
the extracted simulator experimental details for each file will show up in their own columns
annotateDetails(existing_exp_details = MDZdetails)
# Get annotated details regarding absorption.
annotateDetails(existing_exp_details = MDZdetails, simulator_section = "absorption")
# Get annotated details on whatever was used as inhibitor 1
annotateDetails(existing_exp_details = MDZdetails, compoundID = "inhibitor 1")
# Get annotated details for any compounds with "midaz" or "keto" in the name.
annotateDetails(existing_exp_details = MDZdetails, compound = "midaz|keto")
# Get (most of) the details to put into a table of simulation inputs:
annotateDetails(existing_exp_details = MDZdetails, detail_set = "Simcyp inputs")
# Combine multiple options to get just a few specific details:
annotateDetails(existing_exp_details = MDZdetails,
simulator_section = "absorption",
compound = "midaz|keto",
compoundID = "substrate")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.