tcplCytoPt: Calculate the cytotoxicity point based on the "burst"...

View source: R/tcplCytoPt.R

tcplCytoPtR Documentation

Calculate the cytotoxicity point based on the "burst" endpoints

Description

tcplCytoPt calculates the cytotoxicity point and average cytotoxicity distribution based on the activity in the "burst" assay endpoints.

Usage

tcplCytoPt(
  chid = NULL,
  aeid = NULL,
  flag = TRUE,
  min.test = TRUE,
  default.pt = 3
)

Arguments

chid

Integer, chemical ID values to subset on

aeid

Integer, assay endpoint ID values to override the "burst assay" definitions

flag

Integer, mc6_mthd_id values to be passed to tcplSubsetChid

min.test

Integer or Boolean, the number of tested assay endpoints required for a chemical to be used in calculating the "global MAD."

default.pt

Numeric of length 1, the default cytotoxicity point value

Details

tcplCytoPt provides estimates for chemical-specific cytotoxicity distributions (more information available in the vignette.) Before calculating the cytotoxicity distributions, the level 5 data is subsetted by the tcplSubsetChid function.

The 'chid' parameter specifies a subset of chemicals to use in the calculations, given by chemical ID (chid). The 'aeid' parameter specifies which assays to use in calculating the cytotoxicity point and distribution. By default tcplCytoPt will use all available chemicals and the assay endpoints defined by the 'burst_assay' field in the "assay_component_endpoint" table. The examples show how to identify the "burst" endpoints.

tcplCytoPt returns the cytotoxicity point (the AC50 values of the active "burst" endpoints), the corresponding MAD, and the global MAD (median of the calculated MAD values). Not every chemical must be tested in every "burst" endpoint. The 'min.test' parameter allows the user to specify a minimum number of tested assay endpoints as a requirement for MAD values to be included in the global MAD calculation. For example, suppose the user supplies 10 "burst" assays. The user can choose to require a chemical to be tested in at least 5 of those assays for it's MAD value to be included in the global MAD calculation. Having chemicals with many less "burst" endpoints tested may inflate or deflate the global MAD calculation. By default (values of TRUE or NULL), tcplCytoPt requires a chemical to be tested in at least 80% of the given "burst" assays. The user can also provide 'min.test' values of FALSE (indicating to include all MAD values), or a number (indicating a specific number of endpoints).

Chemicals without at least 2 active "burst" assays do not have a MAD value, and the cytotoxicity point is defined by the 'default.pt' parameter. The default value for 'default.pt' is 3.

The resulting data.table has the following fields:

  1. "chid" – The chemical ID.

  2. "code" – The chemical code.

  3. "chnm" – The chemical name.

  4. "casn" – The chemical CASRN.

  5. "med" – The median of the "burst" endpoint log(AC50)

  6. "mad" – The MAD of the "burst" endpoint log(AC50) values.

  7. "ntst" – The number of "burst" endpoints tested.

  8. "nhit" – The number of active "burst" endpoints.

  9. "used_in_global_mad_calc" – TRUE/FALSE, whether the mad value was used in the global MAD calculation.

  10. "global_mad" – The median of the "mad" values where "used_in_global_mad_calc" is TRUE.

  11. "cyto_pt" – The cytotoxicity point, or the value in "med" when "nhit" is at least 2.

  12. "cyto_pt_um" – 10^\mathit{cyto\_pt}

  13. "lower_bnd_um" – 10^{\mathit{cyto\_pt} - 3\mathit{global\_mad}}

Value

A data.table with the cytotoxicity distribution for each chemical. The definition of the field names are listed under "details."

Examples

## Store the current config settings, so they can be reloaded at the end 
## of the examples
conf_store <- tcplConfList()
tcplConfDefault()

## Can only calculate the cytotox burst if using the MySQL database and
## TCPL_DRVR == 'MySQL'

if (getOption("TCPL_DRVR") == "MySQL") {

## Load the "burst" endpoints -- none are defined in the example dataset
tcplLoadAeid(fld = "burst_assay", val = 1)

## Calculate the cytotoxicity distributions using both example endpoints
tcplCytoPt(aeid = 1:2)

## The above example does not calculate a global MAD, because no chemical
## hit both endpoints. (This makes sense, because both endpoints are 
## derived from one component, where one endpoint is acitivity in the
## up direction, and the other is activity in the down direction.)
## Note, the cyto_pt is also 3 for all chemicals, because the function
## requires at least two endpoints to calculate a cytotoxicity point. If 
## the user wishes to use one assay, this function is not necessary. 

## Changing 'default.pt' will change cyto_pt in the resulting data.table
tcplCytoPt(aeid = 1:2, default.pt = 6)
}

## Reset configuration
options(conf_store)


tcpl documentation built on Oct. 7, 2023, 1:06 a.m.