plot_tcpl: Plot dose-resonse curves based on the tcpl hill model

Description Usage Arguments Value Examples

View source: R/functions_tcpl_based.R

Description

Produce the plot for the dose-response curves and data points for both primary and toxicity assay. The direction of the data and dose-resonse curves are presented as the original data, rather than the uptrend direction required by the 'tcpl' function. Plots are sorted by the ranking_score.

Usage

1
2
plot_tcpl(tcpl_models, rank_table = NULL, spid_chnm_table = NULL,
  notation = FALSE, cunit = "M")

Arguments

tcpl_models

the list object created by 'fit_curve_tcpl' function

rank_table

the data.frame output from 'rank_tcpl' function

spid_chnm_table

the spid, chnm, casn info table

notation

value can be TRUE or FALSE, determine whehter to show potency metrics on the plot

cunit

the unit of concentration, on default is "M" (molar).

Value

list of ggplot2 objects, each corresponding to one spid.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## produce plots without notations
demo_md <- fit_curve_tcpl(demo_mc_norm, assay_info =
list(prim_assay = "Primary", toxi_assay = "Cytotox"))
plots <- plot_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)
#produce plots with notations
demo_plots <- plot_tcpl(demo_md, demo_rank, notation = TRUE)

##produce plots with notations, with changed concentration unit displayed on the plot
demo_plots <- plot_tcpl(demo_md, demo_rank, notation = TRUE, cunit = "uM")

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

Related to plot_tcpl in toxplot...