Skip to content
NygenAnalyticsPublic

Latest commit

 

History

35 Commits

Folders and files

Repository files navigation

CyteTypeR

Agentic, Evidence-Based Cell Type Annotation for Single-Cell RNA-seq in R

R-CMD-check R Version License: BSD 3-Clause

CyteTypeR is an end-to-end cell type annotation system for single-cell RNA sequencing (scRNA-seq), designed for repeatable analysis pipelines rather than one-off prompting. It combines cluster-level marker genes, expression context, study metadata, literature retrieval, ontology mapping, and a dedicated review step in a structured workflow that operates directly on Seurat objects.

For AnnData workflows, use CyteType.

Important

Already installed CyteTypeR? Open R and run devtools::install_github("NygenAnalytics/CyteTypeR", force = TRUE) to update to the latest version before you start.

CyteType requires an API key. Use is free for academic and non-commercial research. Commercial use requires a license.

Why CyteTypeR?

Manual cell type annotation takes weeks and varies between experts. CyteTypeR delivers consistent, expert-level annotations in minutes using a multi-agent AI system where specialized agents collaborate on marker analysis, literature evidence, and Cell Ontology mapping.

Quick Start

1. Install

install.packages("devtools")
devtools::install_github("NygenAnalytics/CyteTypeR")

CyteTypeR needs R 4.2 or newer. See Installation for the dependencies and for updating.

2. Set up your API key

library(CyteTypeR)
SetupCyteTypeR()

This opens passwordless CyteType sign-in in your browser and saves the API key locally for automatic use from R. You can also create or manage API keys in the dashboard.

Already have an API key? Save and validate it locally once:

LoginCyteTypeR()

See Sign in and API keys for remote servers and automation.

2.1. (Optional) Install and use the CLI

Install the cytetyper command into the active R environment:

InstallCyteTypeRCli()

Then authenticate directly from the terminal:

cytetyper setup
cytetyper login        # save an existing key; it can also be piped in
cytetyper dashboard
cytetyper view <JOB_ID>
cytetyper logout

See the command-line reference.

3. Annotate with Seurat

# Assumes a normalized, clustered Seurat object and marker table
prepped_data <- PrepareCyteTypeR(
  seurat_obj,
  marker_genes,
  group_key = "seurat_clusters",
  coordinates_key = "umap"
)

metadata <- list(
  title = 'My scRNA-seq analysis of human pbmc',
  run_label = 'initial_analysis',
  experiment_name = 'pbmc_human_samples_study'
)

annotated_seurat <- CyteTypeR(
  obj = seurat_obj,
  prepped_data = prepped_data,
  study_context = "Human PBMC from a healthy donor",
  metadata = metadata
)

Every cell gets its cluster's label, Cell Ontology term, cell state and reviewer confidence as columns of annotated_seurat@meta.data, and annotated_seurat@misc$cytetype_results has one row per cluster with the evidence behind each label.

Read the complete Seurat workflow.

What You Get

  • Annotations: Cell type, subtype, and activation state for every cluster
  • Cell Ontology mapping: Standardized CL IDs for comparison across studies
  • Confidence and quality control: Confidence values, plus match scores against your existing labels
  • Supporting evidence: Publications and condition-specific references behind each call

Example Report

Each analysis generates an HTML report with annotation decisions, reviewer comments, supporting evidence, and an embedded chat interface connected to your expression data.

CyteType HTML report showing cell type annotations and marker genes

View example report

Benchmarks

Across PBMC, bone marrow, tumor microenvironment, and cross-species datasets, the multi-agent approach outperforms existing annotation methods:

Compared with Improvement
GPTCellType +388%
CellTypist +268%
SingleR +101%

Methods and full results are in the preprint. You can also browse results on atlas-scale datasets.

Resources

Citation

Ahuja G, Antill A, Su Y, Dall'Olio GM, Basnayake S, Karlsson G, Dhapola P. Multi-agent AI enables evidence-based cell annotation in single-cell transcriptomics. bioRxiv 2025. doi: 10.1101/2025.11.06.686964

@article{cytetype2025,
  title={Multi-agent AI enables evidence-based cell annotation in single-cell transcriptomics},
  author={Gautam Ahuja, Alex Antill, Yi Su, Giovanni Marco Dall'Olio, Sukhitha Basnayake, Göran Karlsson, Parashar Dhapola},
  journal={bioRxiv},
  year={2025},
  doi={10.1101/2025.11.06.686964},
  url={https://www.biorxiv.org/content/10.1101/2025.11.06.686964v1}
}

License

The CyteTypeR package is open source software released under the BSD 3-Clause License and maintained by Nygen.

CyteType service terms

Annotation runs on the CyteType service, which requires an API key.

  • Academic and non-commercial use is free within the usage limits. Data generated under academic use is licensed under CC BY-NC-SA 4.0.
  • Commercial use and higher limits require a commercial license from Nygen Analytics AB, which includes commercial rights to the generated data.

For licensing, contact contact@nygen.io.

Releases

Used by

Contributors

Languages