Learn R Programming

SlimR (version 1.0.7)

Celltype_Annotation_Features: Annotate cell types using features plot with different marker databases

Description

This function dynamically selects the appropriate annotation method based on the gene_list_type parameter. It supports marker databases from Cellmarker2, PanglaoDB, Seurat (via FindAllMarkers), or Excel files.

Usage

Celltype_Annotation_Features(
  seurat_obj,
  gene_list,
  gene_list_type = "Default",
  species = NULL,
  cluster_col = "seurat_clusters",
  assay = "RNA",
  save_path = NULL,
  min_counts = 1,
  metric_names = NULL,
  colour_low = "white",
  colour_high = "navy",
  colour_low_mertic = "white",
  colour_high_mertic = "navy",
  ...
)

Value

Saves cell type annotation PNGs in save_path. Returns invisibly.

Arguments

seurat_obj

A valid Seurat object with cluster annotations in meta.data.

gene_list

A list of data frames containing marker genes and metrics. Format depends on gene_list_type: - Cellmarker2: Generated by Markers_filter_Cellmarker2(). - PanglaoDB: Generated by Markers_filter_PanglaoDB(). - Seurat: Generated by read_seurat_markers(). - Excel: Generated by read_excel_markers().

gene_list_type

Type of marker database to use. Be one of: "Cellmarker2", "PanglaoDB", "Seurat", or "Excel".

species

Species of the dataset: "Human" or "Mouse" for gene name standardization.

cluster_col

Column name in meta.data defining clusters (default: "seurat_clusters").

assay

Assay layer in the Seurat object (default: "RNA").

save_path

Directory to save output PNGs. Must be explicitly specified.

min_counts

Minimum number of counts for Cellmarker2 annotations (default: 1).

metric_names

Optional. Change the row name for the input mertics, not recommended unless necessary. (NULL is used as default parameter; used in "Seurat"/"Excel").

colour_low

Color for lowest expression level. (default = "white")

colour_high

Color for highest expression level. (default = "black")

colour_low_mertic

Color for lowest mertic level. (default = "white")

colour_high_mertic

Color for highest mertic level. (default = "black")

...

Additional parameters passed to the specific annotation function.

See Also

Other Semi_Automated_Annotation_Workflow: Celltype_Annotation_Combined(), Celltype_Annotation_Heatmap()