rank_tcpl: function to calculate ranking score, TAA, med_diff, EC values...

Description Usage Arguments Value Examples

View source: R/functions_tcpl_based.R

Description

calculate ranking score, TAA, med_diff, absolute EC values, AC50, based on the hill model in tcpl package

Usage

1
2
rank_tcpl(tcpl_models, spid_chnm_table = NULL, med_taa = NULL,
  med_med_diff = NULL)

Arguments

tcpl_models

the list object returned by 'fit_curve_tcpl' function

spid_chnm_table

a reference table with 'spid' and the corresponding chemical name 'chnm' column, and the CAS number 'casn' column.

med_taa

the median TAA value from reference chemical, if not supplied, then ranking score won't be calculated.

med_med_diff

the median Median-Difference from reference chemical, if not supplied, then ranking score won't be calculated.

Value

a dataframe containing ranking metrics for each chemical (spid)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## start with normalized data
demo_md <- fit_curve_tcpl(demo_mc_norm, assay_info =
list(prim_assay = "Primary", toxi_assay = "Cytotox"))
demo_rank <- rank_tcpl(demo_md)


## 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)
# calculate TAA and Med_diff only
demo_rank <- rank_tcpl(demo_md, med_taa = NULL, med_med_diff = NULL)

## calculate ranking score with specified median TAA and meidan Med_Difference
demo_rank <- rank_tcpl(demo_md, med_taa = 150, med_med_diff = 92)

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

Related to rank_tcpl in toxplot...