TopGenes_Boxplot: Plot Top Expressed Genes

View source: R/Visualizations_Seurat_based.R

TopGenes_BoxplotR Documentation

Plot Top Expressed Genes

Description

This function plots the percentage of total counts per cell for the most expressed genes in a given SingleCellExperiment object or a similar object containing gene expression data. It uses ggplot2 for plotting, providing a more customizable and visually appealing output compared to base R graphics. The genes are ordered by their expression levels, and only the specified number of top expressed genes are displayed.

Usage

TopGenes_Boxplot(SerObj, showGenes = 20, title = "")

Arguments

SerObj

A SingleCellExperiment object or a similar object that contains gene expression data. The function expects this object to have a count matrix accessible via 'GetAssayData(SerObj, layer = "counts")'.

showGenes

An integer specifying the number of top expressed genes to display. Defaults to 20.

title

A character string representing the plot title. Optional.

Value

A ggplot object representing the boxplot of the specified number of top expressed genes. This object can be further modified or directly displayed using ggplot2 functions.

Examples

# Assuming 'SerObj' is your SingleCellExperiment object:
TopGenes_Boxplot_ggplot(SerObj, showGenes = 20, title = "Top 20 Expressed Genes")


eisascience/scCustFx documentation built on June 2, 2025, 3:59 a.m.