plot_hexbin_density {schex} | R Documentation |
Plot of density of observations from single cell data in bivariate hexagon cells.
plot_hexbin_density(sce, title = NULL, xlab = NULL, ylab = NULL) ## S4 method for signature 'SingleCellExperiment' plot_hexbin_density(sce, title = NULL, xlab = NULL, ylab = NULL) ## S4 method for signature 'Seurat' plot_hexbin_density(sce, title = NULL, xlab = NULL, ylab = NULL)
sce |
A |
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. |
A ggplot2{ggplot}
object.
SingleCellExperiment
: Plot of cell density in hexagon cell for
SingleCellExperiment object.
Seurat
: Plot of cell density in hexagon cell for
Seurat object.
#' # For Seurat object library(Seurat) data("pbmc_small") pbmc_small <- make_hexbin(pbmc_small, 10, dimension_reduction = "PCA") plot_hexbin_density(pbmc_small) ## Not run: library(TENxPBMCData) library(scater) tenx_pbmc3k <- TENxPBMCData(dataset = "pbmc3k") rm_ind <- calcAverage(tenx_pbmc3k)<0.1 tenx_pbmc3k <- tenx_pbmc3k[!rm_ind,] tenx_pbmc3k <- calculateQCMetrics(tenx_pbmc3k) tenx_pbmc3k <- normalize(tenx_pbmc3k) tenx_pbmc3k <- runPCA(tenx_pbmc3k) tenx_pbmc3k <- make_hexbin( tenx_pbmc3k, 20, dimension_reduction = "PCA") plot_hexbin_density(tenx_pbmc3k) ## End(Not run)