AutoLabel.KnownMarkers: AutoLabel.KnownMarkers

View source: R/Seurat.Utils.R

AutoLabel.KnownMarkersR Documentation

AutoLabel.KnownMarkers

Description

Creates a new "named identity" column in the metadata of a Seurat object, setting 'Ident' to a clustering output matching the 'res' parameter. This function requires the output table of FindAllMarkers(). If you used StoreAllMarkers(), the output is stored under ⁠@misc$df.markers$res...⁠, which is the default location.

Usage

AutoLabel.KnownMarkers(
  obj = combined.obj,
  topN = 1,
  res = 0.5,
  KnownMarkers = c(`dl-EN` = "KAZN", `ul-EN` = "SATB2", `Immature neurons` = "SLA",
    Interneurons = "DLX6-AS1", Interneurons = "ERBB4", InterN_CGE = "SCGN",
    `Intermediate progenitor` = "EOMES", `S-phase` = "TOP2A", `G2M-phase` = "H4C3", oRG =
    "HOPX", Astrocyte = "S100B", `Hypoxia/Stress` = "DDIT4", Glycolytic = "PDK1",
    Choroid.Plexus = "TTR", `Low-Quality` = "POLR2A", Mesenchyme = "DCN", Choroid.Plexus
    = "TTR"),
  order.by = c("combined.score", "avg_log2FC", "p_val_adj")[1],
  df_markers = obj@misc$df.markers[[paste0("res.", res)]]
)

Arguments

obj

A Seurat object to work with. Default: combined.obj.

topN

The top 'N' genes to consider. Default: 1.

res

The clustering resolution to use. Default: 0.5.

KnownMarkers

A character vector containing known marker genes to be used for annotation. Default: ⁠c("TOP2A", "EOMES", "SLA", "HOPX", "S100B", "DLX6-AS1", "POU5F1", "SALL4", "DDIT4",⁠ ⁠"PDK1", "SATB2", "FEZF2")⁠.

order.by

Specifies the column to sort the output tibble by. Default: 'combined.score' (First among "combined.score", "avg_log2FC", "p_val_adj").

df_markers

The data frame of markers. By default, it is stored under ⁠@misc$df.markers$res...⁠ in the provided Seurat object. Default: combined.obj@misc$df.markers[[paste0("res.", res)]].

See Also

select, slice

Examples

## Not run: 
if (interactive()) {
  combined.obj <- AutoLabel.KnownMarkers()
  DimPlot.ClusterNames(ident = "cl.names.KnownMarkers.0.5")
}

## End(Not run)

vertesy/Seurat.utils documentation built on Dec. 4, 2024, 5:20 p.m.