Skip to main content

CASSIA (Cell type Annotation using Specialized System with Integrated AI) is a Python package for automated cell type annotation in single-cell RNA sequencing data using large language models.

Project description

CASSIA

CASSIA is a Python and R package designed for automated, accurate, and interpretable single-cell RNA-seq cell type annotation using a modular multi-agent LLM framework. CASSIA provides comprehensive annotation workflows that incorporate reasoning, validation, quality scoring, and reporting—alongside optional agents for refinement, uncertainty quantification, and retrieval-augmented generation (RAG).

Highlights

  • 🔬 Reference-free and interpretable LLM-based cell type annotation
  • 🧠 Multi-agent architecture with dedicated agents for annotation, validation, formatting, quality scoring, and reporting
  • 📈 Quality scores (0–100) and optional consensus scoring to quantify annotation reliability
  • 📊 Detailed HTML reports with reasoning and marker validation
  • 💬 Supports OpenAI, Anthropic, OpenRouter APIs and open-source models (e.g., LLaMA 3.2 90B)
  • 🧬 Compatible with markers from Seurat (FindAllMarkers) and Scanpy (tl.rank_genes_groups)
  • 🚀 Optional agents: Annotation Boost, Subclustering, RAG (retrieval-augmented generation), Uncertainty Quantification
  • 🌎 Cross-species annotation capabilities, validated across human, mouse, and non-model organisms
  • 🧪 Web UI also available: https://www.cassiacell.com

Installation

Install the core CASSIA framework:

pip install CASSIA

To enable optional RAG functionality:

pip install CASSIA_rag

Note: For R users, see the R package on GitHub.

Quick Start

# Run the CASSIA pipeline in fast mode
CASSIA.runCASSIA_pipeline(
    output_file_name = "FastAnalysisResults",
    tissue = "large intestine",
    species = "human",
    marker_path = unprocessed_markers,
    max_workers = 6,  # Matches the number of clusters in dataset
    annotation_model = "openai/gpt-4o-2024-11-20", #openai/gpt-4o-2024-11-20
    annotation_provider = "openrouter",
    score_model = "anthropic/claude-3.5-sonnet",
    score_provider = "openrouter",
    score_threshold = 75,
    annotationboost_model="anthropic/claude-3.5-sonnet",
    annotationboost_provider="openrouter"
)

For detailed workflows and agent customization, see the Example.

Contributing

We welcome contributions! Please submit pull requests or open issues via GitHub.

License

MIT License © 2024 Elliot Xie and contributors.

Support

Open an issue on GitHub or visit CASSIAcell.com for help.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cassia-0.3.10.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cassia-0.3.10-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

Details for the file cassia-0.3.10.tar.gz.

File metadata

  • Download URL: cassia-0.3.10.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for cassia-0.3.10.tar.gz
Algorithm Hash digest
SHA256 06bc7790d804fc3597918a6d34615bc0678280533c3127a7593bee2d4ec446b6
MD5 a92bd813f2b43560aed19c11d6c5a4fc
BLAKE2b-256 c0dc450e8a07b0c2984092365676858b1b9b948c645fbf58d4f6a910f8ec17d3

See more details on using hashes here.

File details

Details for the file cassia-0.3.10-py3-none-any.whl.

File metadata

  • Download URL: cassia-0.3.10-py3-none-any.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for cassia-0.3.10-py3-none-any.whl
Algorithm Hash digest
SHA256 d7ad01922dd865c4dc7a86be044b8bfcf3dcd683c8f7140f1459abd6eac40d6a
MD5 9e2c40bc012995c25a3692a47651d255
BLAKE2b-256 e14c3bb44f8e8147b019aad8ffb35f6c80cacd29e76a45cd5bd3556b269d4f4b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page