This generator function is designed to take the original return from a Seurat marker analysis and add corresponding gene annotations.
Usage
SeuratMarkers(object, ...)
SeuratMarkersPerCluster(object, ...)
# S4 method for class 'data.frame'
SeuratMarkers(object, ranges, alphaThreshold = 0.05)
# S4 method for class 'data.frame'
SeuratMarkersPerCluster(object, ranges, alphaThreshold = 0.05)Arguments
- object
Unmodified Seurat marker return
data.frame.SeuratMarkers():Seurat::FindMarkers().SeuratMarkersPerCluster():Seurat::FindAllMarkers().
- ...
Additional arguments.
- ranges
GenomicRanges. Gene annotations. Names must correspond to the rownames. The function will automatically subset the ranges and arrange them alphabetically.- alphaThreshold
numeric(1)orNULL. Adjusted P value ("alpha") cutoff. If leftNULL, will use the cutoff defined in the object.
Details
For Seurat::FindAllMarkers() return, rownames are correctly returned
in the gene column.
Examples
data(Seurat, package = "AcidTest")
## Seurat ====
object <- Seurat
ranges <- rowRanges(object)
## `FindMarkers()` return.
invisible(capture.output({
markers <- Seurat::FindMarkers(
object = object,
ident.1 = "1",
ident.2 = NULL
)
}))
#> For a (much!) faster implementation of the Wilcoxon Rank Sum Test,
#> (default method for FindMarkers) please install the presto package
#> --------------------------------------------
#> install.packages('devtools')
#> devtools::install_github('immunogenomics/presto')
#> --------------------------------------------
#> After installation of presto, Seurat will automatically use the more
#> efficient implementation (no further action necessary).
#> This message will be shown once per session
x <- SeuratMarkers(object = markers, ranges = ranges)
#> ℹ `FindMarkers()` return detected.
summary(x)
#> alphaThreshold: 0.05
#> organism: Homo sapiens
#> genomeBuild: GRCh37
#> date: 2026-07-29
## `FindAllMarkers()` return.
invisible(capture.output(suppressWarnings({
markers <- Seurat::FindAllMarkers(object)
})))
#> Calculating cluster 0
#> Calculating cluster 1
#> Calculating cluster 2
x <- SeuratMarkersPerCluster(object = markers, ranges = ranges)
#> ℹ `FindAllMarkers()` return detected.
summary(x)
#> 3 clusters
#> organism: Homo sapiens
#> genomeBuild: GRCh37