View source: R/Visualizations_Seurat_based.R
TopGenes_Boxplot | R Documentation |
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.
TopGenes_Boxplot(SerObj, showGenes = 20, title = "")
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. |
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.
# Assuming 'SerObj' is your SingleCellExperiment object:
TopGenes_Boxplot_ggplot(SerObj, showGenes = 20, title = "Top 20 Expressed Genes")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.