PlotDoseResponse: Visualize the Drug Combination Dose-response Data

View source: R/plot_wrapper.R

PlotDoseResponseR Documentation

Visualize the Drug Combination Dose-response Data

Description

A function to visualize the drug combination dose-response data

Usage

PlotDoseResponse(
  data,
  block_ids = c(1),
  drugs = c(1, 2),
  adjusted = TRUE,
  statistic = NULL,
  summary_statistic = "mean",
  high_value_color = "#FF0000",
  low_value_color = "#00FF00",
  point_color = "#C24B40",
  curve_color = "black",
  curve_ylim = NULL,
  curve_grid = TRUE,
  text_size_scale = 1,
  heatmap_text_label_size_scale = 1,
  heatmap_text_label_color = "#000000",
  heatmap_color_range = NULL,
  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 and the p-value if it is valid;

  • 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.

curve_ylim

A vector of two numeric values or NULL. It is used to set the y limits (y1, y2) of the dose-response curve plot. Note that y1 > y2 is allowed and leads to a ‘reversed axis’. With the default value, NULL, the function will automatically set the y axis.

curve_grid

A logical value. It indicates whether to add grids on the dose-response curve pot.

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".

heatmap_color_range

A vector of two numeric values. They specify the range of the color bar in heatmap plot. The first item (lower bounder) must be less than the second one (upper bounder). The plotted values larger than defined upper bounder will be filled in color high_value_color. The plotted values less than defined lower bounder will be filled in color low_value_color. If the defined range includes 0, value 0 will be filled in color "white". By default, it is set as NULL which means the function will automatically set the color range according to the plotted values.

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

## Not run: 
data("mathews_screening_data")
data <- ReshapeData(mathews_screening_data)
plots <- PlotDoseResponse(data)

## End(Not run)

shuyuzheng/synergyfinder documentation built on Feb. 20, 2023, 11:33 p.m.