Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

seuratplot

seuratplot is a Seurat 5 plotting and marker-utility package assembled from the supplied legacy functions.

Seurat 5 compatibility

The package now targets Seurat >= 5.0.0 and SeuratObject >= 5.0.0. Expression matrices are read through SeuratObject::LayerData() rather than the defunct slot= interface. The internal layer helper also recognizes split Assay5 layers (for example data.sample1, data.sample2) and joins matching layers on a temporary assay copy when needed.

Other legacy object access has been replaced by supported accessors such as:

  • SeuratObject::Idents()
  • SeuratObject::Embeddings()
  • SeuratObject::Reductions()
  • SeuratObject::Project()
  • SeuratObject::VariableFeatures()
  • SeuratObject::Stdev()

Renamed plotting functions

Short generic names are no longer exported, reducing clashes with Seurat or other packages.

Old name New exported name
plot_dr() ReductionPlot()
umap() UmapPlot()
tsne() TsnePlot()
pca() PcaPlot()
phate() PhatePlot()
highlight() HighlightClusters()
feature() GeneFeaturePlot()
dashboard() ExpressionDashboard()
vln() ViolinPlot()
vlnGrid() ViolinGridPlot()

The old names remain as internal deprecated aliases for source-level compatibility, but they are not exported.

Examples

library(seuratplot)

# Idents(sce) by default, or any metadata column through group.by
UmapPlot(sce, group.by = "seurat_annotations")
TsnePlot(sce, group.by = "sample")
PcaPlot(sce, group.by = "seurat_annotations")

GeneFeaturePlot(
  sce,
  c("CD14", "CD79A"),
  reduction = "umap",
  group.by = "seurat_annotations",
  legend = TRUE
)

ExpressionDashboard(
  sce,
  genes = c("CD14", "LYZ", "S100A8"),
  reduction = "umap",
  group.by = "seurat_annotations"
)

Install

install.packages("seuratplot_0.3.0.tar.gz", repos = NULL, type = "source")

# or
remotes::install_local(
  "seuratplot_0.3.0.tar.gz",
  dependencies = TRUE,
  upgrade = "never"
)

If an older seuratplot version is currently loaded, restart R/RStudio after installation before calling the new functions.

Maintainer

chunlin chunlin.rainbow@gmail.com

Scope

Gene symbol capitalization, mouse-human ortholog conversion, and SYMBOL/ENSEMBL conversion are intentionally not included. Those tasks are better handled by dedicated annotation packages; seuratplot stays focused on Seurat 5 visualization, expression summaries, cluster comparison, cell-cycle visualization, and combinatorial marker selection.

Grouping by metadata

The default grouping remains Idents(seurat). Use group.by to label/group by a metadata column without changing identities.

UmapPlot(sce, group.by = "seurat_annotations")
TsnePlot(sce, group.by = "sample")

GeneFeaturePlot(
  sce,
  c("CD14", "CD79A"),
  reduction = "umap",
  statistic = "mean",
  group.by = "seurat_annotations",
  legend = TRUE
)

For GeneFeaturePlot(), the colour scale still represents expression; group.by determines the group labels shown on the embedding.

Cell-cycle workflow

Cell-cycle scoring uses Seurat::CellCycleScoring() and stores the standard S.Score, G2M.Score, and Phase metadata columns.

sce <- computeCC(sce, species = "hg")

CellCycleScorePlot(sce, group.by = "stim")
CellCycleEmbeddingPlot(sce, reduction = "umap", group.by = "stim")
CellCycleViolinPlot(sce, group.by = "stim")
CellCycleProportionPlot(sce, group.by = "stim")

CellCycleDashboard(
  sce,
  reduction = "umap",
  group.by = "stim"
)

CellCyclePlot() is a convenience dispatcher with type = "dashboard", "score", "embedding", "violin", or "proportion".

About

Seurat 5 Single-Cell Plotting and Marker Utilities

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages