Identifies and visualizes the top expressing genes per cluster in T/B cells, followed by pathway enrichment analysis...
Identifies and visualizes the top expressing genes per cluster in T/B cells, followed by pathway enrichment analysis. Provides quick cluster characterization by highlighting the most highly expressed genes and their biological functions.
SeuratClustering and TOrBCellSelection processes[TopExpressingGenes]
cache = true
[TopExpressingGenes.in]
srtobj = ["SeuratClustering"]
Note: srtobj accepts the output from SeuratClustering or SeuratSubClustering.
[TopExpressingGenes.envs]
# Number of top expressing genes to identify per cluster
n = 250
# Enrichment style
enrich_style = "enrichr" # Options: "enrichr", "clusterprofiler"
# Enrichment databases
dbs = ["KEGG_2021_Human", "MSigDB_Hallmark_2020"]
[TopExpressingGenes.envs.enrich_plots_defaults]
# Plot type: "bar", "dot", "lollipop", "network", "enrichmap", "wordcloud"
plot_type = "bar"
devpars = {res = 100, width = 800, height = 600}
top_term = 10 # Top enriched pathways to show
ncol = 1
[TopExpressingGenes]
[TopExpressingGenes.in]
srtobj = ["SeuratClustering"]
[TopExpressingGenes]
[TopExpressingGenes.in]
srtobj = ["SeuratClustering"]
[TopExpressingGenes.envs]
n = 10
dbs = ["GO_Biological_Process_2025", "Reactome_Pathways_2024"]
[TopExpressingGenes.envs.enrich_plots."Network"]
plot_type = "network"
top_term = 15
[TopExpressingGenes.envs.enrich_plots."Enrichmap"]
plot_type = "enrichmap"
[TopExpressingGenes]
[TopExpressingGenes.in]
srtobj = ["SeuratClustering"]
[TopExpressingGenes.envs]
n = 10
dbs = ["MSigDB_Hallmark_2020"]
[TopExpressingGenes.envs]
n = 250
enrich_style = "clusterprofiler"
[TopExpressingGenes.envs.enrich_plots]
"KEGG" = {plot_type = "bar", dbs = ["KEGG_2021_Human"]}
"Reactome" = {plot_type = "network"}
[TopExpressingGenes.envs]
n = 50
[TopExpressingGenes.envs.enrich_plots."Bar"]
plot_type = "bar"
[TopExpressingGenes.envs.enrich_plots."Word Cloud"]
plot_type = "wordcloud"
| Aspect | TopExpressingGenes | ClusterMarkers |
|---|---|---|
| Finds | Highest expressed genes within clusters | Genes differentially expressed between clusters |
| Meaning | Basal/dominant expression | Distinguishing markers |
| Stat test | None (average expression) | Statistical (Wilcoxon, MAST) |
| Use case | Cluster identity/function | Marker discovery |
| Output | Top N genes | DEGs with p-values/FC |
Recommendation: Use both processes:
TopExpressingGenes: Quick overview of dominant programsClusterMarkers: Rigorous marker identificationSeuratClustering, TOrBCellSelection (for TCR route)n: Positive integer (typically 10-500)dbs: Valid enrichit/Enrichr database names or local GMT pathsenrich_style: "enrichr" or "clusterprofiler"plot_type: Valid scplotter plot typeIssue: Housekeeping genes (RPS, RPL, MT-) dominate
Solutions: Increase n, use ClusterMarkers, filter genes in SeuratPreparing
Issue: No pathways enriched
Solutions: Increase n to 100-500, verify species (UPPERCASE=human, TitleCase=mouse)
Issue: Plots fail to render
Solutions: Reduce top_term (5-15), use simpler plots (bar, dot)
Issue: Process too slow
Solutions: Reduce n, use fewer databases, disable enrichment: dbs = []
KEGG_2021_Human - KEGG pathwaysMSigDB_Hallmark_2020 - Hallmark gene setsGO_Biological_Process_2025 - GO Biological ProcessReactome_Pathways_2024 - Reactome pathwaysbar - Bar chartdot - Dot plotlollipop - Lollipop plotnetwork - Network visualizationenrichmap - Enrichment mapwordcloud - Word cloudenrichr - Fisher's exact testclusterprofiler - Hypergeometric testTopExpressingGenesOfAllCells - Top genes before T/B selectionClusterMarkers - Differential expression analysis