PlotSynergy | R Documentation |
A function to visualize the synergy scores for drug combinations as 2D or 3D interaction landscape over the dose-response matrix.
PlotSynergy( data, type = "2D", method = "ZIP", block_ids = c(1), drugs = c(1, 2), row_range = NULL, col_range = NULL, color_range = NULL, z_range = NULL, axis_line = FALSE, statistic = NULL, summary_statistic = "mean", plot_title = NULL, interpolate_len = 3, high_value_color = "#FF0000", low_value_color = "#00FF00", text_size_scale = 1, heatmap_text_label_size_scale = 1, heatmap_text_label_color = "#000000", grid = TRUE, dynamic = FALSE, display = TRUE, save_file = FALSE, file_type = "pdf", file_name = NULL, file_path = NULL, height = 6, width = 6, units = "in" )
data |
A list object generated by function
|
type |
A character value. It specifies the type of the plot. Available values are:
|
method |
A character value. It indicates which synergy score to be visualized. Available values are "ZIP", "HSA", "Bliss", or "Loewe". |
block_ids |
A parameter to specify which drug combination if there are many drug combinations in the data. By default, it is NULL so that the synergy score visualization of all the drug combinations in the data is returned. |
drugs |
A vector of characters or integers with length of 2. It contains
the index for two drugs to plot. For example, |
row_range |
A vector of two integers. They specify the starting and ending concentration of the drug on y-axis. Use e.g., c(1, 3) to specify that only from 1st to 3rd concentrations of the drug on y-axis are used. By default, it is NULl so all the concentrations are used. |
col_range |
A vector of two integers. They specify the starting and ending concentration of the drug on x-axis. Use e.g., c(1, 3) to specify that only from 1st to 3rd concentrations of the drug on x-axis are used. By default, it is NULl so all the concentrations are used. |
color_range |
A vector of two numeric values. They specify the range
of the color bars. 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 |
z_range |
A vector of two numeric values. They specify the range of
z-axis plotted in 3D surface plot. It doesn't work for 2D or heatmap plots.
Default value is |
axis_line |
A logical value. Whether to show the axis lines and ticks. It doesn't work for heatmap plot. |
statistic |
A character or NULL. It indicates the statistics printed in the plot while there are replicates in input data. Available values are:
If it is |
summary_statistic |
A vector of characters or NULL. It indicates the
summary statistics for all the
If it is |
plot_title |
A character value. It specifies the plot title. If it is
|
interpolate_len |
An integer. It specifies how many values need to be interpolated between two concentrations. It is used to control the smoothness of the synergy surface in the contour plot and surface plot. Note: It only works in 2D and 3D plots. |
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. |
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
|
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 |
grid |
A logical value. It indicates whether to add grids on the pot.
It only works while |
dynamic |
A logic value. It indicates whether to generate interactive plot wit package "plotly" or static plot with package "ggplot2"/"lattice". |
display |
A logic value. It specifies whether to automatically display plots while calling the function. |
save_file |
A logic value. It specifies if the interaction landscapes
is saved by calling ggsave function ("2D" or "heatmap"
plots) or plot saving function defined by |
file_type |
A character value. It indicates the device to use for saving
plots. If |
file_name |
A character vector. It indicates the file names. If it is
not defined by user, a default name will be assigned. Note: It
only works while |
file_path |
A character vector. It indicates the path to save file.
If it is not defined by user, a default name will be assigned.
Note: It only works while |
height |
A numeric value. It indicates the height of the output plot.
Note: It only works while |
width |
A numeric value. It indicates the width of the output plot.
Note: It only works while |
units |
A character value. It indicates the units for |
A list of ggplot objects.
Shuyu Zheng shuyu.zheng@helsinki.fi
Jing Tang jing.tang@helsinki.fi
data("mathews_screening_data") data <- ReshapeData(mathews_screening_data) data <- CalculateSynergy(data) plots <- PlotSynergy(data, "2D", block_ids = NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.