Learn R Programming

invitroTKstats (version 0.0.14)

create_chem_table: Creates a Standardized Data Table of Chemical Identities

Description

This function creates a data frame summarizing chemical identifiers used for each tested chemical in MS data. Each row in the resulting data frame provides EPA's DSSTox Structure ID (DTXSID), preferred compound name, and the name used by the laboratory.

Usage

create_chem_table(
  input.table,
  dtxsid.col = "DTXSID",
  compound.col = "Compound.Name",
  lab.compound.col = "Lab.Compound.Name",
  verbose = TRUE
)

Value

A data frame containing the chemical identifiers for all unique chemicals in the input data frame. Each row maps a unique chemical, indicated by the DTXSID, to all the preferred compound names and all chemical names used by the laboratory referenced in the input data frame.

Arguments

input.table

(Data Frame) A data frame containing mass-spectrometry peak areas, indication of chemical identity, and analytical chemistry methods. It should contain columns with names specified by the following arguments:

dtxsid.col

(Character) Column name of input.table containing EPA's DSSTox Structure ID (http://comptox.epa.gov/dashboard). (Defaults to "DTXSID".)

compound.col

(Character) Column name of input.table containing the test compound. (Defaults to "Compound.Name".)

lab.compound.col

(Character) Column name of input.table containing the test compound name used by the laboratory. (Defaults to "Lab.Compound.Name".)

verbose

(logical) Indicate whether printed statements should be shown. (Default is TRUE.)

Author

John Wambaugh

Examples

Run this code

library(invitroTKstats)
# Smeltz et al. (2020) data:
##  Clint ##
create_chem_table(
  input.table = invitroTKstats::clint_cheminfo,
  dtxsid.col = "DTXSID",
  compound.col = "Compound",
  lab.compound.col = "Chem.Lab.ID"
  )
## Fup RED ##
create_chem_table(
  input.table = invitroTKstats::fup_red_cheminfo,
  dtxsid.col = "DTXSID",
  compound.col = "Compound",
  lab.compound.col = "Chem.Lab.ID"
  )
## Fup UC ##
create_chem_table(
  input.table = invitroTKstats::fup_uc_cheminfo,
  dtxsid.col = "DTXSID",
  compound.col = "Compound",
  lab.compound.col = "Chem.Lab.ID"
  )
# Honda et al. () data:
## Caco2 ##
create_chem_table(
  input.table = invitroTKstats::caco2_cheminfo,
  dtxsid.col = "DTXSID",
  compound.col = "PREFERRED_NAME",
  lab.compound.col = "test_article"
  )

Run the code above in your browser using DataLab