View source: R/drugTimeResponseCurve.R
drugTimeResponseCurve | R Documentation |
This function generates a plot visualizing the relationship between gene expression, time and dose level for the selected tSet. The plot is generated with ggplot2 and can be customized using ggplot plot + function() syntax.
drugTimeResponseCurve( tSet, duration = NULL, cell_lines = NULL, dose = NULL, drugs = NULL, summarize_replicates = TRUE, line_width = 1, point_size = 2.5, verbose = TRUE, ggplot_args = NULL )
tSet |
|
duration |
|
cell_lines |
|
dose |
|
drugs |
|
summarize_replicates |
|
line_width |
|
point_size |
|
verbose |
|
ggplot_args |
|
Plot of the viabilities for each drugs vs time of exposure
library(ggplot2) # Default settings plot <- drugTimeResponseCurve(TGGATESsmall, cell_lines = "Hepatocyte", dose = c("Control", "Low", "Middle"), drugs = treatmentNames(TGGATESsmall)[6], duration = c("2", "8", "24")) # Customize title, x/y labels, x/y limits, colour palette and define # custom ticks for x axis using the function argument ggplot2_args customizations <- list(labs(title= 'My Custom Title', ylab = 'The y-axis'), xlim(c(2, 24)), ylim(c(99,105)), scale_color_brewer(palette="Set1"), scale_x_continuous(breaks=c(2, 8, 24), labels = c("Two", "Eight", "Twenty-Four")) ) if(interactive()) { drugTimeResponseCurve(TGGATESsmall, cell_lines = "Hepatocyte", dose = c("Control", "Low", "Middle"), drugs = treatmentNames(TGGATESsmall)[6], duration = c("2", "8", "24"), ggplot_args = customizations) } # Customize the plot using standard ggplot2 syntax if(interactive()) { plot + labs(title= 'My Custom Title', ylab = 'The y-axis') + xlim(c(2, 24)) + ylim(c(99,105)) + scale_color_brewer(palette="Set1") }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.