SeuratMarkers: Sanitize Seurat markers

SeuratMarkersR Documentation

Sanitize Seurat markers

Description

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 signature 'data.frame'
SeuratMarkers(object, ranges, alphaThreshold = 0.05)

## S4 method for signature '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) or NULL. Adjusted P value ("alpha") cutoff. If left NULL, will use the cutoff defined in the object.

Details

For Seurat::FindAllMarkers() return, rownames are correctly returned in the gene column.

Value

SeuratMarkers.

Note

Updated 2022-06-09.

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
    )
}))
x <- SeuratMarkers(object = markers, ranges = ranges)
summary(x)

## `FindAllMarkers()` return.
invisible(capture.output(suppressWarnings({
    markers <- Seurat::FindAllMarkers(object)
})))
x <- SeuratMarkersPerCluster(object = markers, ranges = ranges)
summary(x)

acidgenomics/r-pointillism documentation built on Oct. 13, 2023, 3:13 p.m.