make_hexbin_label: Group label plot position.

View source: R/make_hexbin_label.R

make_hexbin_labelR Documentation

Group label plot position.

Description

Group label plot position.

Usage

make_hexbin_label(sce, col)

Arguments

sce

A SingleCellExperiment object.

col

The name referring to one column in meta data for which the label position on the plot is calculated for every level. The chosen column needs to be a factor.

Value

A dataframe.

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, 80, dimension_reduction = "PCA")
tenx_pbmc3k$random <- factor(sample(1:3, ncol(tenx_pbmc3k), replace = TRUE))
make_hexbin_label(tenx_pbmc3k, col = "random")

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