Description Usage Arguments Value Author(s) Examples
View source: R/plot_multi_drugs.R
This function will generate a group of bar plots for one drug combination
block. Each panel (columns) visualize the concentrations for all the drugs
and metrics specified by plot_values
. Each row represents a data point
in the combination data. The data point specified by highlight_row
will be highlighted in different color.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | PlotMultiDrugBar(
data,
plot_block = 1,
plot_value = c("response", "response_origin"),
sort_by = "response",
highlight_row = NULL,
pos_value_color = "#CC3311",
neg_value_color = "#448BD4",
highlight_pos_color = "#A90217",
highlight_neg_color = "#2166AC",
panel_title_size = 10,
axis_text_size = 10,
highlight_label_size = 2,
data_table = FALSE
)
|
data |
A list object generated by function |
plot_block |
A character/integer. It indicates the block ID for the block to visualize. |
plot_value |
A vector of characters. It contains the name of one or more
metrics to be visualized. If the
If the
|
sort_by |
A character. It indicates by which metric the bars (data
points) will be sorted. It could be one of the available values for
|
highlight_row |
A vector of numeric values with the length same as the number of drugs in selected block. It contains the concentrations for "drug1", "drug2", ... The data point selected by these concentrations will be highlighted in the plot. |
pos_value_color |
An R color value. It indicates the color for the positive values. |
neg_value_color |
An R color value. It indicates the color for the negative values. |
highlight_pos_color |
An R color value. It indicates the highlight color for the positive values. |
highlight_neg_color |
An R color value. It indicates the highlight color for the negative values. |
panel_title_size |
A numeric value. It indicates the size of panel titles in unit "mm". |
axis_text_size |
A numeric value. It indicates the size of axis texts in unit "mm". |
highlight_label_size |
A numeric value. It indicates the size of the labels for highlighted rows in unit "mm". |
data_table |
A logic value. If it is |
A ggplot object. If data_table = TRUE
, the output will be a
list containing a ggplot object and a data frame used for plotting.
Shuyu Zheng shuyu.zheng@helsinki.fi
Jing Tang jing.tang@helsinki.fi
1 2 3 4 5 6 7 8 9 10 | data("NCATS_10023_data")
data <- ReshapeData(NCATS_10023_data)
data <- CalculateSynergy(data, method = c("HSA"))
p <- PlotMultiDrugBar(data,
plot_block = 1,
plot_value = c("response", "HSA_ref", "HSA_synergy"),
highlight_row = c(0, 0, 0),
sort_by = "HSA_synergy"
)
p
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.