Skip to contents

Adds chromosome location, gene biotype, Ensembl ID, and other genomic metadata as columns to the feature-level metadata of a Seurat object. Annotation is fetched from (in order): local cache → biomaRt → AnnotationHub/EnsDb → precomputed download → user-supplied file. Successful results are cached in ~/.cache/R/scSidekick/ so the network call is only made once per species.

Usage

AnnotateFeatures(
  seurat_object,
  species,
  assay = NULL,
  annotation_file = NULL,
  force = FALSE
)

Arguments

seurat_object

A Seurat object.

species

Character. One of "mouse", "human", "zebrafish".

assay

Character. Assay to annotate. Defaults to DefaultAssay().

annotation_file

Character or NULL. Path to a user-supplied TSV/CSV (gene symbol as rowname; any recognized chromosome/start/end column names are accepted). Bypasses all automatic sources when supplied.

force

Logical. Re-annotate even if nk_chr column is already present. Default FALSE.

Value

The Seurat object with new columns in its feature metadata: nk_chr, nk_start, nk_end, nk_strand, nk_biotype, nk_ensembl_id, nk_description.