Cell Type Annotation Using Large Language Models
Cell Type Annotation with Multi-LLM Framework
Anthropic API Processor
Base API Processor Class
Cache Manager Class
Calculate simple consensus without LLM
Check if consensus is reached among models
Clean annotation text by removing prefixes and extra whitespace
Combine results from all phases of consensus annotation
Compare predictions from different models
Set global logger configuration
Create prompt for cell type annotation
Create prompt for checking consensus among model predictions
Create prompt for additional discussion rounds
Create prompt for the initial round of discussion
Create prompt for standardizing cell type names
Custom model manager for mLLMCelltype
DeepSeek API Processor
Package startup message
Package load message
Qwen API Processor
Execute consensus check with retry logic
Extract numeric value from line containing a label
Facilitate discussion for a controversial cluster
Filter out error responses from model round responses
Find majority prediction from response lines
Gemini API Processor
Utility functions for API key management
Get initial predictions from all models
Get the global logger instance
Get response from a specific model
Determine provider from model name
Grok API Processor
Identify controversial clusters based on consensus analysis
Reinitialize global logger with a specific directory
Interactive consensus building for cell type annotation
Get list of registered custom models
Get list of registered custom providers
Convenience functions for logging
Minimax API Processor
Get mLLMCelltype cache location
Clear mLLMCelltype cache
mLLMCelltype: Cell Type Annotation Using Large Language Models
Normalize annotation for comparison
Prompt templates for mLLMCelltype
OpenAI API Processor
OpenRouter API Processor
Parse consensus response from model
Parse flexible format consensus response
Parse standard 4-line consensus response format
Parse text-format model predictions into a named list
Prepare list of models to try for consensus checking
Print summary of consensus results
Process request using Anthropic models
Process controversial clusters through discussion
Process request using custom provider
Process request using DeepSeek models
Process request using Gemini models
Process request using Grok models
Process request using MiniMax models
Process request using OpenAI models
Process request using OpenRouter models
Process request using Qwen models
Process request using StepFun models
Process request using Zhipu models
Register a custom model for a provider
Register a custom LLM provider
URL Utilities for Base URL Resolution
Select the best prediction from consensus results
Standardize cell type names using a language model
StepFun API Processor
Unified Logger for mLLMCelltype Package
Zhipu API Processor
Automated cell type annotation for single-cell RNA sequencing data using consensus predictions from multiple large language models. Integrates with Seurat objects and provides uncertainty quantification for annotations. Supports various LLM providers including OpenAI, Anthropic, and Google. For details see Yang et al. (2025) <doi:10.1101/2025.04.10.647852>.
Useful links