Catalog PyPI
PACKAGE EXPLORERView in registry

agentype

PyPI

统一的细胞类型分析工具包,集成四个专业Agent提供完整的细胞类型注释流程

annotationbioinformaticscell-typecelltypistgenomicsmcprna-seqsctypesingle-cellsingler
Versions collected1
Direct dependencies57From release 1.1.0
Last observed21 Oct, 09:01 UTC

README

Version 1.1.0 documentation

AgentType

LLM-powered automatic cell type annotation toolkit for single-cell RNA sequencing

PyPI version Python Version License: MIT

中文文档

Installation

pip install agentype

Optional dependencies:

# CellTypist annotation algorithm
pip install agentype[annotation]

# Full installation
pip install agentype[annotation,ml,viz]

Configuration

Create agentype_config.json:

{
  "llm": {
    "api_key": "your-api-key",
    "api_base": "https://api.openai.com/v1",
    "model": "gpt-4o"
  },
  "project": {
    "language": "en",
    "enable_streaming": true,
    "enable_logging": true
  }
}

Or configure via environment variables:

export OPENAI_API_KEY="your-api-key"
export OPENAI_API_BASE="https://api.openai.com/v1"
export OPENAI_MODEL="gpt-4o"

Quick Start

from agentype.api.main_workflow import process_workflow_sync

result = process_workflow_sync(
    input_data="path/to/data.rds",      # supports RDS, H5AD, H5, CSV
    tissue_type="PBMC",                  # tissue type
    cluster_column="seurat_clusters",    # cluster label column
    api_key="your-api-key",
    api_base="https://api.openai.com/v1",
    model="gpt-4o",
    output_dir="./outputs",
    language="en",                       # 'en' or 'zh'
    enable_streaming=True,
    enable_llm_logging=True,
)

if result["success"]:
    print(f"Session ID:       {result['session_id']}")
    print(f"Iterations:       {result['total_iterations']}")
    print(f"Output files:     {result['output_file_paths']}")
else:
    print(f"Error:            {result['error']}")

Parameters

ParameterTypeDescription
input_datastrPath to input file
tissue_typestrTissue type, e.g. "PBMC", "Liver"
cluster_columnstrColumn name of cluster labels in the data
speciesstr | NoneSpecies; auto-detected when None
api_keystrLLM API key
api_basestrLLM API base URL
modelstrModel name
output_dirstrDirectory for output files
languagestrPrompt language: "en" or "zh"
enable_streamingboolEnable streaming output
enable_thinkingboolEnable thinking mode
enable_llm_loggingboolEnable LLM call logging

Return Value

FieldTypeDescription
successboolWhether the run succeeded
session_idstrSession ID for this run
total_iterationsintNumber of agent iterations
output_file_pathsdictOutput paths, including rds_file
result_filestrPath to the summary result file
token_statsdictToken usage statistics
errorstrError message on failure

Using Individual Agents

AppAgent — cell type annotation:

from agentype.appagent.tools.celltypist_simple import celltypist_annotation

result = celltypist_annotation(
    adata_path="data.h5ad",
    model_name="Immune_All_Low.pkl",
    species="human"
)

SubAgent — cell marker gene query:

from agentype.subagent.tools.fetchers.cellmarker_fetcher import search_cell_markers

markers = search_cell_markers(
    gene_symbols=["CD4", "CD8A", "CD3E"],
    tissue_type="Blood"
)

DataAgent — data format conversion:

from agentype.dataagent.tools.data_converters import convert_rds_to_h5ad

h5ad_path = convert_rds_to_h5ad(
    rds_path="data.rds",
    output_path="output.h5ad"
)

CLI Tools

celltype-server          # Start all MCP servers
celltype-manage status   # Show project status
celltype-manage config   # Show current configuration

License

MIT License

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.1.020 Apr 202657

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
agentype/celltype-agent

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 09:01 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:0481bc86273be8c838b2ad0ac867e1026b69f8abd0c952044fe656523d8ebe2c