Plot predicted leave-one-out probabilities
Usage
volcanoPlot(
sce,
target,
group,
p_cutoff = NULL,
fc_cutoff = 1,
assay_type = "tfmfeatures",
stats = NULL,
...
)Arguments
- sce
SingleCellExperimentobject- target
character(1), name of the column of
colData(sce)with the condition of each cell, such as the drug- group
character(1), name of the column of
colData(sce)with the replicate of each cell, such as the patient; the replicates are the folds of the leave-one-out cross-validation- p_cutoff
Cut-off for statistical significance. A horizontal line will be drawn at -log10(p_cutoff). Defaults to 0.01 divided by the number of feature groups. With few patients, permutation p-values cannot fall below this default, because the smallest attainable p-value is one over the number of relabelings.
- fc_cutoff
Cut-off for absolute log2 fold-change. A vertical lines will be drawn at fc_cutoff.
- assay_type
character(1), name of the assay with the features
- stats
Output of
calculateStats; if `NULL`, it is computed from `sce`- ...
Further arguments to
calculateStats, such as `method` or `n_permutations`
Value
ggplot2 object
Examples
set.seed(23)
cell_file <- generateData()
sce <- loadData(cell_file)
sce <- transformScale(sce)
sce$Drug <- as.factor(sce$Drug)
sce$Drug <- relevel(sce$Drug, ref = "D1")
types <- c("AreaShape", "Intensity", "Texture")
sce_single <- predictLOO(
sce,
target = "Drug", group = "Patient",
interest_level = "D7", reference_level = "D1",
types = types,
n_threads = 1
)
# p-values from the t-distribution keep the example fast; the default
# permutation test refits all models for every relabeling of the patients
volcanoPlot(sce_single,
target = "Drug", group = "Patient",
p_cutoff = 0.05, fc_cutoff = 0.5, method = "t"
)