densityEnrichment: Visualize the mean density ranking of genes across gene set

View source: R/densityEnrichment.R

densityEnrichmentR Documentation

Visualize the mean density ranking of genes across gene set

Description

This function allows to the user to examine the mean ranking within the groups across the gene set. The visualization uses the density function to display the relative position and distribution of rank.

Usage

densityEnrichment(
  input.data,
  gene.set.use = NULL,
  gene.sets = NULL,
  group.by = NULL,
  palette = "inferno"
)

Arguments

input.data

The single-cell object to use.

gene.set.use

Selected individual gene set.

gene.sets

The gene set library to use to extract the individual gene set information from.

group.by

Categorical parameter to plot along the x.axis. If input is a single-cell object the default will be cluster.

palette

Colors to use in visualization - input any hcl.pals.

Value

ggplot2 object mean rank gene density across groups

Examples

GS <- list(Bcells = c("MS4A1", "CD79B", "CD79A", "IGH1", "IGH2"),
           Tcells = c("CD3E", "CD3D", "CD3G", "CD7","CD8A"))
pbmc_small <- SeuratObject::pbmc_small
                        
densityEnrichment(pbmc_small, 
                  gene.set.use = "Tcells",
                  gene.sets = GS)


ncborcherding/escape documentation built on Nov. 6, 2024, 1:43 p.m.