AGENT SKILL

annotate-cells-with-scgpt-mcp

Transfer cell labels from an approved reference model through an already configured scgpt-annotation MCP service. Use for GPU inference on an AnnData query when the validated harness and model are staged, then check predictions against independent structure and markers; do not substitute it for a marker-only annotation or assume the service is installed.

License 许可
MIT
最近更新
2026-11-14
Stars
★ 0
Forks
2

01 前言 Front Matter

name
annotate-cells-with-scgpt-mcp
license
MIT
metadata
{ "cpus": "4", "tags": "mcp, scgpt-annotation", "image": "docker://ghcr.io/lijinbio/mcp-scgpt-annotation@sha256:7ee18dc0df9f11ebc4cb9cc9ec417d99c2a94b1f664fe3561f78e88b0a954df9", "mem_gb": "48", "status": "community", "compute": "NVIDIA V100 or A30, 4 CPUs, 48 GB requested; 480 cells x 36601 genes; final-image V100 inference 42.5 seconds; earlier A30 validation 40.8 seconds", "version": "0.1.1", "category": "single-cell", "scheduler": "optional", "mcp-server": "scgpt-annotation", "time_limit": "01:00:00", "tested-with": "aiscientist-mcp-scgpt-annotation 0.0.3, common 0.0.4, torch 2.3.0, scGPT 0.2.4, scanpy 1.11.5, anndata 0.11.4; real GPU old/new parity on 480 HECA cells", "requires-gpu": "true", "requires-network": "install", "requires-secrets": "none", "mcp-package-version": "0.0.3" }
description
Transfer cell labels from an approved reference model through an already configured scgpt-annotation MCP service. Use for GPU inference on an AnnData query when the validated harness and model are staged, then check predictions against independent structure and markers; do not substitute it for a marker-only annotation or assume the service is installed.

03 SKILL.md 正文

Annotate cells with the scGPT MCP service

This is reference-model inference with the validated scGPT harness. It does not ask a language model to name cells. Use the client's registered scgpt-annotation tools and advertised names; if unavailable, retain the existing approved scGPT deployment. Do not invent an MCP prefix, download unapproved weights, or change the released standalone workflow's environment. The pinned image is the upstream scgpt-annotation-v0.0.3 release; external assets remain operator supplied.

Verify external assets and GPU

The operator stages the validated step1_preprocess.py, step2_inference.py and helpers, sets SCGPT_REFACTOR, and provides the trained reference through SCGPT_MODEL_DIR. The reference requires best_model.pt, vocab.json, id2type.json, and dev_train_args.yml. Harness and model are external, read-only assets; they are not bundled with this skill. The MCP Python runtime is separate from the validated torch/CUDA scientific interpreter.

Use an authorized .h5ad query from SCGPT_DATASET or SCGPT_READ_ROOTS. An explicit model_dir must be admitted by SCGPT_MODEL_ROOTS. GPU availability is checked by default; SCGPT_REQUIRE_CUDA=0 is an operator diagnostic setting, not evidence of GPU inference.

Run and retrieve the result

Call scgpt_annotate with a stable analysis_id and optional admitted dataset/model_dir. Poll scgpt_job_status(analysis_id, task_id) to COMPLETED for Slurm/local execution. Save the Slurm job ID when present. Inline execution waits inside the caller's GPU allocation. A failed call provides a task ID for inspecting its failure evidence; do not use stale predictions.

Collect predictions_csv under artifact_root, and verify one prediction per expected barcode. The response contains n_cells, n_cell_types, label_counts, species_harmonization, and input_compatibility. Read the per-cell confidence values from the CSV rather than assuming that a high aggregate label count establishes accuracy.

The original case-folding rule is retained: uppercase names are used only when their vocabulary overlap is at least five times the exact match count and at least 1,000 genes greater. A changed rule explicitly reports the cross-species name-based orthology assumption. New AnnData nullable string indices/metadata are converted only in a private working copy when needed by the old scientific environment; input_compatibility records those fields. Expression values and the original query are not rewritten by that storage conversion.

Validate labels independently

Compare barcode-aligned predictions with clustering, canonical positive/discriminating markers, and the expected tissue classes. Inspect low-confidence calls and discordant groups. The known mouse-to-human retinal transfer needs particular care for glial and vascular labels. Retain unassigned or uncertain results rather than forcing agreement. The existing crossvalidate-scgpt-vs-leiden skill remains useful for that separate analysis.

A real V100 run on 480 public human-retina cells matched the original deployed harness's barcode-aligned predictions and confidence values with zero differences at tolerance 1e-6, using identical weights, scientific image and prepared query. Matched A30 runs also agreed exactly between old and new workflows. Comparing A30 with V100 preserved all 480 labels but changed 35 confidence values by at most 0.0026; record the GPU when comparing confidence. Nullable-string compatibility was exercised on a new AnnData checkpoint. This is migration parity, not an accuracy benchmark or proof that a different model/species transfer is valid. Record the actual model/harness/image identities, GPU, task IDs, cell counts, compatibility changes and collected outputs.

04 同仓库更多 Skills

lijinbio
lijinbio/aiscientist-skills

verb-object-with-tool

One or two sentences on what the skill does and when to use it. Name the tool, the input it takes and the output it produces, then list the situations that should trigger it (for example "Use when setting up X, writing a Y config, or diagnosing a failed Z run").

★ 0
lijinbio
lijinbio/aiscientist-skills

write-variant-tables

Write the five standard variant-annotation result tables - consequence, impact and ClinVar-significance distributions, a ClinVar pathogenic and likely-pathogenic list, and a shortlist of rare, damaging variants not in ClinVar - plus a JSON summary, from an annotated per-variant TSV (VEP consequence and impact, SIFT, PolyPhen, max population AF, rsID, ClinVar significance), in pure Python without re-parsing the VCF or re-running VEP. Use when a study needs these tables with a different rarity cutoff, impact set or damaging-predictor rule, or when rebuilding them from an existing annotation table. In AiScientist, annotate_variants already writes the default tables, so use this only for a custom cut.

★ 0
lijinbio
lijinbio/aiscientist-skills

rank-phenotype-differentials-with-mcp

Map clinical phenotype text to grounded HPO terms and rank a research differential through an already configured phenotype-diagnosis MCP service with LIRICAL and optional literature adjudication. Use for explicit service-based analysis while preserving negation, uncertainty and original probabilities; retain the established workflow when the service is unavailable.

★ 0
lijinbio
lijinbio/aiscientist-skills

qc-vcf-callset

Judge whether a germline VCF callset is trustworthy before interpreting any variant - Ti/Tv, Het/Hom, SNP, indel and multiallelic counts, sample count and genotype call rate from bcftools stats (falling back to cyvcf2, then to a plain-Python Ti/Tv scan) - and flag values outside the expected human WGS or WES ranges. Writes tables/vcf_qc_summary.csv and data/vcf_qc.json with a qc_flags list. Use when a VCF (one sample or a cohort) arrives for annotation or prioritization, when a Ti/Tv or Het/Hom value needs interpreting, or when deciding whether downstream variant tables must carry a low-confidence caveat.

★ 0
lijinbio
lijinbio/aiscientist-skills

prioritize-clinical-variants

Rank annotated variants into research-triage tiers (ClinVar pathogenic, likely pathogenic, VUS favouring pathogenic, VUS, likely benign, benign) from ClinVar significance used verbatim, gnomAD allele frequency against a dominant or recessive disease-model cutoff and the ACMG BA1 5 percent rule, and in-silico predictors (SIFT, PolyPhen, REVEL, CADD, AlphaMissense) as supporting evidence only. Pure Python; reads a per-variant annotation TSV and writes a tier-sorted CSV with the evidence for each tier plus a JSON of tier counts. Use when a rare-variant list from VEP, ClinVar and gnomAD annotation must be ordered for review (which variants to look at first) or when choosing the disease model and cutoffs for that ordering. Research triage only, NOT a clinical ACMG/AMP classification.

★ 0
lijinbio
lijinbio/aiscientist-skills

normalize-vcf-with-bcftools

Normalize a VCF with bcftools norm before annotation or ClinVar/gnomAD matching - split multiallelic sites into biallelic records, atomize MNPs into SNPs, then left-align and trim indels against the reference FASTA of the same build - writing an indexed normalized.vcf.gz and a JSON of record counts before and after. Use when a VCF not known to be normalized (especially an indel-heavy one) will be matched against ClinVar, gnomAD or dbSNP, compared between callers or loaded into PLINK, or when a known pathogenic indel comes back as not in ClinVar. In AiScientist, the offline annotate_variants path already normalizes, so do not plan it as a separate step there.

★ 0