Learn R Programming

mLLMCelltype (version 1.3.2)

Cell Type Annotation Using Large Language Models

Description

Automated cell type annotation for single-cell RNA sequencing data using consensus predictions from multiple large language models (LLMs). LLMs are artificial intelligence models trained on vast text corpora to understand and generate human-like text. This package integrates with 'Seurat' objects and provides uncertainty quantification for annotations. Supports various LLM providers including 'OpenAI', 'Anthropic', and 'Google'. The package leverages these models through their respective APIs (Application Programming Interfaces) , , and . For details see Yang et al. (2025) .

Copy Link

Version

Install

install.packages('mLLMCelltype')

Version

1.3.2

License

MIT + file LICENSE

Maintainer

Chen Yang

Last Published

September 2nd, 2025

Functions in mLLMCelltype (1.3.2)

configure_logger

Set global logger configuration
StepFunProcessor

StepFun API Processor
clean_annotation

Clean annotation text by removing prefixes and extra whitespace
UnifiedLogger

Unified Logger for mLLMCelltype Package
compare_model_predictions

Compare predictions from different models
ZhipuProcessor

Zhipu API Processor
annotate_cell_types

Cell Type Annotation with Multi-LLM Framework
check_consensus

Check if consensus is reached among models
combine_results

Combine results from all phases of consensus annotation
calculate_simple_consensus

Calculate simple consensus without LLM
create_initial_discussion_prompt

Create prompt for the initial round of discussion
create_discussion_prompt

Create prompt for additional discussion rounds
extract_labeled_value

Extract numeric value from line containing a label
execute_consensus_check

Execute consensus check with retry logic
get_api_key

Utility functions for API key management
list_custom_models

Get list of registered custom models
interactive_consensus_annotation

Interactive consensus building for cell type annotation
get_logger

Get the global logger instance
custom_providers

Custom model manager for mLLMCelltype
create_annotation_prompt

Prompt templates for mLLMCelltype
get_initial_predictions

Get initial predictions from all models
create_standardization_prompt

Create prompt for standardizing cell type names
find_majority_prediction

Find majority prediction from response lines
facilitate_cluster_discussion

Facilitate discussion for a controversial cluster
get_model_response

Get response from a specific model
logging_functions

Convenience functions for logging
list_custom_providers

Get list of registered custom providers
print_consensus_summary

Print summary of consensus results
.onAttach

Package startup message
parse_consensus_response

Parse consensus response from model
get_provider

Determine provider from model name
.onLoad

Package load message
process_anthropic

Process request using Anthropic models
process_openrouter

Process request using OpenRouter models
process_controversial_clusters

Process controversial clusters through discussion
create_consensus_check_prompt

Create prompt for checking consensus among model predictions
process_grok

Process request using Grok models
process_qwen

Process request using Qwen models
process_openai

Process request using OpenAI models
process_gemini

Process request using Gemini models
parse_standard_format

Parse standard 4-line consensus response format
process_deepseek

Process request using DeepSeek models
prepare_models_list

Prepare list of models to try for consensus checking
parse_flexible_format

Parse flexible format consensus response
identify_controversial_clusters

Identify controversial clusters based on consensus analysis
process_minimax

Process request using Minimax models
register_custom_provider

Register a custom LLM provider
register_custom_model

Register a custom model for a provider
process_custom

Process request using custom provider
process_stepfun

Process request using StepFun models
standardize_cell_type_names

Standardize cell type names using a language model
mLLMCelltype-package

mLLMCelltype: Cell Type Annotation Using Large Language Models
resolve_provider_base_url

URL Utilities for Base URL Resolution
validate_base_url

Validate base URL format
process_zhipu

Process request using Zhipu models
summarize_discussion

Summarize discussion and determine final cell type
sanitize_base_url

Sanitize base URL
normalize_annotation

Normalize annotation for comparison
select_best_prediction

Select the best prediction from consensus results
OpenAIProcessor

OpenAI API Processor
AnthropicProcessor

Anthropic API Processor
GrokProcessor

Grok API Processor
BaseAPIProcessor

Base API Processor Class
CacheManager

Cache Manager Class
MinimaxProcessor

Minimax API Processor
GeminiProcessor

Gemini API Processor
OpenRouterProcessor

OpenRouter API Processor
QwenProcessor

Qwen API Processor
DeepSeekProcessor

DeepSeek API Processor