A hands-on learning guide for CyteTypeR — an R package that automatically annotates your scRNA-seq clusters using the CyteType API.
TL;DR — Feed it a Seurat object with cluster markers, get back cell type annotations + a beautiful interactive report. ✨
Seurat Object ──→ PrepareCyteTypeR() ──→ CyteTypeR API ──→ Annotated Object + HTML Report
│ │ │
clusters extracts predicted cell
markers markers, types added to
UMAP metadata, metadata
coordinates
# Core
install.packages(c("Seurat", "tidyverse"))
# CyteTypeR
devtools::install_github("NygenAnalytics/CyteTypeR")
# Dependencies
install.packages(c("SCpubr", "glmGamPoi", "tictoc"))
remotes::install_github("satijalab/seurat-data")library(Seurat)
library(CyteTypeR)
# 1. Load and preprocess
obj <- LoadData("ifnb")
obj <- SCTransform(obj, vst.flavor = "v2")
obj <- RunPCA(obj)
obj <- RunUMAP(obj, dims = 1:20)
obj <- FindNeighbors(obj, dims = 1:20)
obj <- FindClusters(obj, resolution = 0.4)
# 2. Find markers
markers <- FindAllMarkers(obj, group.by = "seurat_clusters")
# 3. Prepare for CyteTypeR
prepped_data <- PrepareCyteTypeR(obj, markers, n_top_genes = 10)
# 4. Annotate 🎯
annotated_obj <- CyteTypeR(obj, prepped_data, study_context = "PBMC IFNB stimulation")- Clone this repo
- Open
cytetype.Rprojin RStudio (this sets your working directory and ensures reproducibility) - Open and run through
cytetyper_guide.qmdstep by step
| File | Description |
|---|---|
cytetype.Rproj |
🔧 RStudio project file — open this first |
cytetyper_guide.qmd |
📖 Full step-by-step tutorial (Quarto) |
query.json |
🔍 Example API request/response structure |
| Link | |
|---|---|
| 🧪 CyteTypeR (R) | github.com/NygenAnalytics/CyteTypeR |
| 🐍 CyteType (Python) | github.com/NygenAnalytics/CyteType |
| 📊 Example Report | Interactive HTML Report |
Made with ☕ while learning single-cell bioinformatics.