plot_hexbin_density {schex}R 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)

## 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)

Arguments

sce

A SingleCellExperiment or Seurat-class 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.

Methods (by class)

Examples

#' # 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)

[Package schex version 1.0.55 Index]