PlotDoseResponse: Visualize the Drug Combination Dose-response Data

Description Usage Arguments Value Author(s) Examples

View source: R/plot_wrapper.R

Description

A function to visualize the drug combination dose-response data

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
PlotDoseResponse(
  data,
  block_ids = c(1),
  drugs = c(1, 2),
  adjusted = TRUE,
  statistic = NULL,
  summary_statistic = "mean",
  high_value_color = "#A90217",
  low_value_color = "#2166AC",
  point_color = "#C24B40",
  curve_color = "black",
  text_size_scale = 1,
  heatmap_text_label_size_scale = 1,
  heatmap_text_label_color = "#000000",
  curve_plot_title = NULL,
  heatmap_plot_title = NULL,
  Emin = NA,
  Emax = NA,
  save_file = FALSE,
  file_type = "pdf",
  file_name = NULL,
  width = 12,
  height = 6
)

Arguments

data

A list object generated by function ReshapeData.

block_ids

A vector of characters/integers or NULL. It contains the block IDs for the blocks to visualize. By default, it is NULL so that the visualization of all the drug combinations in input data.

drugs

A vector of characters or integers with length of 2. It contains the index for two drugs to plot. For example, c(1, 2) indicates to plot "drug1" and "drug2" in the input data.

adjusted

A logical value. If it is FALSE, original response matrix will be plotted. If it is TRUE, adjusted response matrix will be plotted.

statistic

A character or NULL. It indicates the statistics printed in the plot while there are replicates in input data. Available values are:

  • sem Standard error of mean;

  • ci 95

If it is NULL, no statistics will be printed.

summary_statistic

A vector of characters or NULL. It indicates the summary statistics printed in heatmap for all the plot_value in whole combination matrix. Available values are:

  • mean Median value for all the responses or synergy scores in the matrix;

  • median Median value for all the responses or synergy scores in the matrix;

  • quantile_90 90 print different sample quantile. For example quantile_50 equal to median.

If it is NULL, no statistics will be printed.

high_value_color

An R color value. It indicates the color for the high values.

low_value_color

An R color value. It indicates the color for low values.

point_color

An R color value. It indicates the color for points in dose response curve plots.

curve_color

An R color value. It indicates the color for curves in dose response curve plots.

text_size_scale

A numeric value. It is used to control the size of text in the plot. All the text size will multiply by this scale factor.

heatmap_text_label_size_scale

A numeric value. It is used to control the size of text labels in the heatmap plot. It only works while plot_type = "heatmap".

heatmap_text_label_color

NULL or an R color value. It is used to control the color of text labels in the heatmap plot. If it is NULL, text label will not be shown.It only works while plot_type = "heatmap".

curve_plot_title

A character value to indicate the plot title for the dose-response curve.

heatmap_plot_title

A character value to indicate the plot title for the heatmap.

Emin

A numeric or NA. the minimal effect of the drug used in the 4-parameter log-logistic function to fit the dose-response curve. If it is not NA, it is fixed the value assigned by the user. Default setting is NA.

Emax

A numeric or NA. the maximal effect of the drug used in the 4-parameter log-logistic function to fit the dose-response curve. If it is not NA, it is fixed the value assigned by the user. Default setting is NA.

save_file

A parameter to specify if the visualization results are saved as pdf files in current working directory or not. If it is FALSE, the results are returned as a list of the plots. It is FALSE by default.

file_type

A character. It indicates the format of files you want to save as. Default is "pdf". Available values are "jpeg", "bmp", "png", "tiff", "pdf", "svg".

file_name

A character vector. It indicates the file names, if user chose to save the plot to local directory.If it is not defined by user, a default name will be assigned.

width

a numeric value. It indicates the width of saved file.

height

a numeric value. It indicates the height of saved file.

Value

A list of plot objects recorded by recordPlot. The plot will be saved into a local file if save_file = TRUE. If save_file = FALSE, the plot will be printed in default graphic device.

Author(s)

Examples

1
2
3
4
5
6
## Not run: 
data("mathews_screening_data")
data <- ReshapeData(mathews_screening_data)
plots <- PlotDoseResponse(data)

## End(Not run)

Example output

dev.new(): using pdf(file="Rplots1.pdf")

synergyfinder documentation built on April 4, 2021, 6 p.m.