fit_curve_tcpl: fit dose-resopnse curve using tcpl hill model

Description Usage Arguments Value Examples

View source: R/functions_tcpl_based.R

Description

Curve fitting using the tcplFit function in 'tcpl' package. Chemicals are modelled based on spid. If you want to model the same chemical (e.g. positive controls), then assign different spid to this chemical so the function can separate them out. Absolute IC20 and absolute IC50 are calculated as well.

Usage

1
fit_curve_tcpl(df, assay_info, prim_cutoff = 20, toxi_cutoff = 20)

Arguments

df

input data contain normalized assay readings

assay_info

predefined names for primary and cytotoxicity assays, use NULL if either one of the assay does not need to be modeled.

prim_cutoff

significance cutoff for primary assay (eg. 3sigma or 3bMAD)

toxi_cutoff

significance cutoff for cytotoxicity assay (eg. 3sigma or 3bMAD)

Value

A list object containing modeling results, the corresponding data for each chemical.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## fit curve with default significant threshold 20

demo_md <- fit_curve_tcpl(demo_mc_norm, assay_info =
list(prim_assay = "Primary", toxi_assay = "Cytotox"))

## start from raw data
# define assay
assay_info <- list(prim_assay = "Primary",toxi_assay = "Cytotox")
# data normalization
demo_mc_norm <- normalize_per_plate(demo_mc, nctrl = "DMSO")
# filter out two test chemicals
demo_mc_norm <- dplyr::filter(demo_mc_norm, spid %in% c("TP0001502B05", "TP0001502B01"))
# fit curve with default 20% threshold
demo_md <- fit_curve_tcpl(demo_mc_norm, assay_info)

## fit curve with specified significance threshold
demo_md <- fit_curve_tcpl(demo_mc_norm, assay_info, prim_cutoff = 25, toxi_cutoff = 25)

toxplot documentation built on April 3, 2018, 9:04 a.m.