plot_hexbin_fc {schex} | R Documentation |
Plot of fold change of selected gene in single cell data using bivariate hexagon cells.
plot_hexbin_fc( sce, col, mod = "RNA", type, feature, title = NULL, xlab = NULL, ylab = NULL, colors )
sce |
A |
col |
A string referring to the name of one column in the meta data of sce by which to compare. Note this factor can only contain two levels. |
mod |
A string referring to the name of one column in the meta data of sce by which to compare. Note this factor can only contain two levels. |
type |
A string referring to the name of one column in the meta data of sce by which to compare. Note this factor can only contain two levels. |
feature |
A string referring to the name of one feature. |
title |
A string containing the title of the plot. |
xlab |
A string containing the title of the x axis. |
ylab |
A string containing the title of the y axis. |
colors |
A vector of strings specifying which colors to use for plotting the different levels in the selected column of the meta data. |
This function plots fold change within each
hexagon, which are calculated with make_hexbin
.
Note that the fold change is only accurate if the condition
investigated is within the same individual. For conditions across
different individuals different methods that account for
individual-specific effects are required.
A ggplot2{ggplot}
object.
#' # For Seurat object library(Seurat) data("pbmc_small") pbmc_small <- make_hexbin(pbmc_small, 10, dimension_reduction = "PCA") pbmc_small$test <- as.factor(sample(1:2, dim(pbmc_small)[2], replace=TRUE)) plot_hexbin_fc(pbmc_small, col="test", feature="CA2", type="scale.data")