plot_hexbin_density: Plot of density of observations from single cell data in...

View source: R/plot_hexbin_density.R

plot_hexbin_densityR Documentation

Plot of density of observations from single cell data in bivariate hexagon cells.

Description

Plot of density of observations from single cell data in bivariate hexagon cells.

Usage

plot_hexbin_density(sce, title = NULL, xlab = NULL, ylab = NULL)

Arguments

sce

A SingleCellExperiment object.

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.

Value

A ggplot2{ggplot} object.

Examples

# For SingleCellExperiment object
library(TENxPBMCData)
library(scater)
tenx_pbmc3k <- TENxPBMCData(dataset = "pbmc3k")
rm_ind <- calculateAverage(tenx_pbmc3k) < 0.1
tenx_pbmc3k <- tenx_pbmc3k[!rm_ind, ]
tenx_pbmc3k <- logNormCounts(tenx_pbmc3k)
tenx_pbmc3k <- runPCA(tenx_pbmc3k)
tenx_pbmc3k <- make_hexbin(tenx_pbmc3k, 10, dimension_reduction = "PCA")
plot_hexbin_density(tenx_pbmc3k)

SaskiaFreytag/schex documentation built on Feb. 4, 2024, 7:49 p.m.