Plot box plots for metric for single-agent data grouped by selected variable
Source:R/plot-boxplot_metric.R
plot_boxplot_metric_sa.RdPlot box plots for metric for single-agent data grouped by selected variable
Usage
plot_boxplot_metric_sa(
dt_metrics,
group_var,
normalization_type = "GR",
metric = "xc50",
fit_source = "gDR",
grouped_flag = FALSE,
colored_pts_flag = FALSE,
colors_vec = NULL,
with_inf = FALSE
)Arguments
- dt_metrics
data.table representing data from the
Metricsassay, outputted bygDRutils::convert_se_assay_to_dt(se, "Metrics")and single-agentSummarizedExperiment- group_var
string name of group variable; one of:
"CellLineName"or"DrugName"- normalization_type
string with normalization types to be selected one of: "GR" ("GRvalue") or "RV" ("RelativeViability")
- metric
string name of the metric; one of: "xc50" ("GR50" or "IC50" - respectively depending on
normalization_type), "x_max" ("GR Max" or "E Max") or "x_mean" ("GR Mean" or "RV Mean"), but the values from any numeric column can be displayed- fit_source
string source name for metrics
- grouped_flag
a logical flag whether the boxplots should be grouped and colored by
Tissueforgroup_varset as"CellLineName"anddrug_moa- for"DrugName"- colored_pts_flag
a logical flag whether the points should be colored by grouped variable - for
group_varequal"CellLineName"points will be colored by"DrugName"and similarly vice versa- colors_vec
character vector with colors (name or hex value) to color boxplots; for
grouped_flagset asFALSEonly first from vector will be used- with_inf
a logical flag indicating whether infinite values should be shown on boxplots
Author
Janina Smoła janina.smola@external.roche.com
Examples
mae <- gDRutils::get_synthetic_data("combo_matrix")
se <- mae[[gDRutils::get_supported_experiments("sa")]]
dt_metrics <- gDRutils::convert_se_assay_to_dt(se, "Metrics")
plot_boxplot_metric_sa(dt_metrics,
group_var = "CellLineName")
plot_boxplot_metric_sa(dt_metrics,
group_var = "DrugName")
plot_boxplot_metric_sa(dt_metrics,
group_var = "DrugName",
metric = "x_AOC_range",
colors_vec = "grey",
colored_pts_flag = TRUE)
plot_boxplot_metric_sa(dt_metrics,
group_var = "CellLineName",
normalization_type = "RV",
metric = "x_max",
colors_vec = c("gold", "darkorange", "darkcyan", "darkblue"),
grouped_flag = TRUE)