Communitygithub.com

病原體變異株監測

透過 GenSpectrum LAPIS API 查詢即時病原體基因體監測資料,找出正在流行的病毒譜系、它們的生長速度以及攜帶的突變。當問題需要依賴病原體族群的當前狀態,而非記住的既有知識時使用。

病原體變異株監測 是什麼?

此技能讓 AI Agent 能夠透過 GenSpectrum LAPIS API 直接查詢即時病原體基因體監測資料。與其依賴訓練資料中可能過時或錯誤的知識,此技能確保了關於流行譜系、譜系名稱轉換、突變譜以及分析工具適用性的回答,都基於來自公開資料庫(如 GenBank、Pathoplexus)的當前活躍序列計數。它支援廣泛的病原體,包括 SARS-CoV-2、季節性流感、禽流感 H5N1、RSV、Mpox 等,每個實例都可能擁有不同的資料欄位名稱與索引結構。 此技能提供的腳本會自動處理底層 API 的複雜性,例如:解析 Pango 譜系別名與重組體、顧及儀表板索引以決定是否使用萬用字元 (`*`) 進行譜系查詢、根據實例的 schema 使用正確的日期欄位名稱,以及提供報告延遲分析,讓使用者能判斷近期資料的可靠性。它不僅回傳原始數字,還包括統計區間(如 Wilson 分數區間)、資料版本戳記以及明確的警告,指出近期資料或低覆蓋率的週次可能無法支持可靠的趨勢估計。 此技能明確設計用於研究用途,描述的是已收集與提交的序列;它不產生臨床解釋或公共衛生指引,且序列數並非病例數。一個關鍵的指導原則是:永遠不要從記憶中斷定正在流行的譜系或寫出一個譜系名稱,因為 Pango 命名法是一個動態協議:名稱可能被撤回或重新指定。此技能透過在每次使用時查詢即時代碼庫來強制執行此原則。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/K-Dense-AI/scientific-agent-skills/tree/main/skills/pathogen-variant-surveillance

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

病原體變異株監測 (Pathogen Variant Surveillance)

使用時機

任何時候,答案取決於病原體族群現在的樣子:哪些譜系正在流行、某個譜系是否正在增長、一個譜系名稱目前代表什麼,或者一個檢測目標是否仍然匹配。

規則

切勿憑記憶陳述正在流行的譜系,也切勿憑記憶寫出任何譜系名稱。

同時會有三件事情出錯,而只有第一件是普通的知識截止日期問題:

  1. 名稱的問世時間晚於訓練資料。 Pango 指定清單承載超過 6,200 個名稱,且持續增長。
  2. 命名法是一個動態的資料結構,而非靜態的慣例。 XFG 是一個重組體,只能透過 alias_key.json 解析;PQ.17 解別名為 XDV.1.5.1.1.8.1.17。這兩個擴展都無法透過推理得出——映射關係是一個會變動的檔案。
  3. 先前的知識不僅會過時,還會被撤回。 目前 lineage_notes.txt 中有 294 個名稱已被撤回或重新指定。PC.2 現在是 LF.7.9;XFG.20 已被完全撤回。一個記住的譜系事實不僅可能陳舊,更可能完全錯誤。

此技能報告的每一個數字,都是由即時資料庫實例回傳的計數,並標記了其資料版本。

範圍

為研究目的進行的監測資料分析。此技能描述的是已被收集與提交的序列;它不產生臨床解釋、疫情應對建議或公共衛生指導,且序列計數並非病例計數。

實例

一個 API 形式涵蓋所有病原體。--instance 指定一個已驗證的部署;--base-url 可連接到任何其他 LAPIS 實例。

實例主機譜系欄位已建立索引
sars-cov-2lapis.cov-spectrum.org (公開 GenBank 資料)pangoLineage是
h5n1, h3n2, h1n1pdm, influenza-alapis.genspectrum.orgclade否
rsv-a, rsv-b, mpox, measles, dengue, west-nile, hmpv, ebola-zaire, ebola-sudan, cchflapis.pathoplexus.org各異各異

每個實例的欄位名稱都不相同,且絕不應假設。 每個腳本在運行時都會讀取 /sample/databaseConfig,並從實例實際宣告的欄位中選取採集日期、提交日期和譜系欄位。dateFrom= 在 SARS-CoV-2 上是正確的,但在 H5N1 上會得到 400 錯誤,因為其採集日期是 sampleCollectionDateRangeLower。

腳本

cd skills/pathogen-variant-surveillance/scripts
腳本回答的問題
resolve_lineage.py這個名稱還存在嗎?它代表什麼?它源自哪個譜系?
lineage_prevalence.py這個譜系每週佔所有序列的多少比例?它在增長嗎?
mutation_profile.py它帶有哪些突變?與另一個譜系相比有何不同?
reporting_lag.py資料需要回溯多久才能被信賴?

所有四個腳本都接受 --format table|tsv|json,並將來源資訊(實例、資料版本、已解析的欄位名稱、篩選條件)輸出至 stderr,因此使用 > out.tsv 可以保持資料乾淨並讓來源資訊可視。

從資料開始,而非從記憶中的清單開始

# 不預設名稱:發現該時間窗口內實際流行的譜系
python3 lineage_prevalence.py --top 5 --where country=USA --weeks 12

注意:發現該時間窗口內最常見的 5 個 pangoLineage 值: XFG.1.1, XFG.23.1.3, PY.1.1.1, XFJ.3.1.2, PQ.17

這是回答「目前流行什麼?」時正確的第一個指令。一開始就指定譜系名稱,預設了你已經知道哪些是重要的,而這個技能存在的目的正是為了消除這種假設。

使用名稱前先檢查

python3 resolve_lineage.py XFG.23.1.3 PQ.17 PC.2 NOTALINEAGE
query        status     unaliased                        parent    recombinant_of  descendants  sequences  detail
XFG.23.1.3   current    XFG.23.1.3                       XFG.23.1  LF.7+LP.8.1.2   6            317        S:A1174V, on C29137T branch
PQ.17        current    XDV.1.5.1.1.8.1.17               NB.1.8.1                  23           931        Alias of XDV.1.5.1.1.8.1.17
PC.2         withdrawn  B.1.1.529.2.86.1.1.16.1.7.2.1.2  LF.7.2.1                  4            25         now LF.7.9; Redesignated as LF.7.9
NOTALINEAGE  unknown    NOTALINEAGE                                                0            n/a        no such name in the live nomenclature

(detail 欄位已簡化;實際的每一行還會引用其譜系提案來源。)

如果任何名稱的狀態是「已撤回」(withdrawn) 或「未知」(unknown),腳本會回傳結束代碼 1,這可以作為手稿譜系清單的檢查關卡。請注意 PC.2:它已在源頭被撤回,但仍有 25 條序列帶有此標籤,因為資料庫實例的指定更新滯後於命名更新。這兩個事實都是真實的,且都重要。

盛行率與增長

python3 lineage_prevalence.py

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

adaptyv

How to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user mentions Adaptyv, Foundry API, protein binding assays, protein screening experiments, BLI/SPR assays, thermostability assays, or wants to submit protein sequences for experimental characterization. Also trigger when code imports `adaptyv`, `adaptyv_sdk`, or `FoundryClient`, or references `foundry-api-public.adaptyvbio.com`.

aeon

This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use when working with temporal data, sequential patterns, or time-indexed observations requiring specialized algorithms beyond standard ML approaches. Particularly suited for univariate and multivariate time series analysis with scikit-learn compatible APIs.

alphagenome

Look up precomputed AlphaGenome Atlas effects for any GRCh38 single-nucleotide variant (AVI score with Phred and 18 SHAP feature attributions, plus raw and quantile scores for RNA-seq, DNase, ATAC, ChIP-TF, ChIP-histone, CAGE, PRO-cap, splicing, polyadenylation and contact-map tracks), score variants or scan windows on demand with the AlphaGenome model for human and mouse (variant scoring, in silico mutagenesis, REF-versus-ALT track prediction), and build Atlas website deep links. Use when the user mentions AlphaGenome, AlphaGenome Atlas, AVI or AlphaGenome Variant Impact, DeepMind variant effect prediction, or wants to prioritise or mechanistically interpret non-coding, regulatory, splicing, enhancer, promoter, or chromatin-accessibility effects of SNVs from a VCF, credible set, or region. Research use only; not a clinical tool.

analytical-method-validation

Plan, execute, and document validation, verification, and transfer of analytical procedures under the governing framework - ICH Q2(R2) and Q14, USP <1220>/<1225>/<1226>, ICH M10 bioanalytical, CLSI EP, or ISO/IEC 17025. Use for HPLC, LC-MS/MS, GC, CE, ICP-MS, dissolution, qNMR, qPCR, NIR, and ligand binding or cell-based assays whenever the question is whether a procedure is fit for its intended purpose. Triggers include

anndata

Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.

arbor

Autonomously improve a real artifact (code, training recipe, agent harness, data pipeline, prompt) against an objective and an evaluator, using Hypothesis Tree Refinement (HTR) from the Arbor paper. Use this whenever someone wants to iteratively optimize something over many experiments without overfitting — e.g.

arboreto

Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk RNA-seq, single-cell RNA-seq) to identify transcription factor-target gene relationships and regulatory interactions. Supports distributed computation for large-scale datasets.

astropy

Core Python library for astronomy and astrophysics workflows that need Astropy APIs, including units/quantities, coordinates, FITS I/O, tables, time systems, WCS, and cosmology. Use when implementing or debugging astronomical data analysis code with Astropy.

autoskill

Observe the user

benchling-integration

Benchling Python SDK and REST API integration for registry entities, inventory, ELN entries, workflows, Benchling Apps, and Data Warehouse queries. Use when automating lab data with benchling-sdk or the v2 API.

bgpt-paper-search

Search scientific papers and retrieve structured experimental data extracted from full-text studies via the BGPT MCP server. Returns 25+ fields per paper including methods, results, sample sizes, quality scores, and conclusions. Use for literature reviews, evidence synthesis, and finding experimental details not available in abstracts alone.

bids

>

biopython

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.

bioservices

Unified Python interface to 40+ bioinformatics services. Use when querying multiple databases (UniProt, KEGG, ChEMBL, Reactome) in a single workflow with consistent API. Best for cross-database analysis, ID mapping across services. For quick single-database lookups use gget; for sequence/file manipulation use biopython.

bulk-rnaseq

End-to-end bulk RNA-seq orchestrator — takes raw FASTQ reads through QC and trimming (FastQC, fastp/Trim Galore), alignment and quantification (STAR, Salmon, featureCounts), assembles a gene-level counts matrix, then hands off to differential expression (pydeseq2), pathway/GSEA enrichment (pathway-enrichment), and publication figures (scientific-visualization). Use whenever the user has bulk RNA-seq reads or quant output and wants a complete, reproducible differential-expression workflow — e.g.

cellxgene-census

Query the CZ CELLxGENE Census programmatically for versioned public single-cell and spatial transcriptomics data. Use when you need population-scale cell metadata, gene expression slices, Census summary counts, source H5AD URIs/downloads, embeddings, spatial Census data, or reference atlas comparisons across organisms, tissues, diseases, assays, and cell types. For analyzing your own local single-cell data use scanpy, anndata, or scvi-tools.

cirq

Google quantum computing framework. Use when targeting Google Quantum AI hardware, designing noise-aware circuits, or running quantum characterization experiments. Best for Google hardware, noise modeling, and low-level circuit design. For IBM hardware use qiskit; for quantum ML with autodiff use pennylane; for physics simulations use qutip.

citation-management

Comprehensive citation management for academic research. Search OpenAlex, PubMed, and Google Scholar for papers, extract accurate metadata, validate citations, and generate properly formatted BibTeX entries. This skill should be used when you need to find papers, verify citation information, convert DOIs to BibTeX, or ensure reference accuracy in scientific writing.

clinical-decision-support

Prepare and validate research-only clinical decision-support evaluation, evidence-profile, cohort, survival, biomarker/model, privacy, and governance artifacts. Use for aggregate or synthetic research documentation and traceability—not patient care or live clinical operation.

clinical-reports

Create safety-bounded draft structures and run local deterministic checks for clinical case, diagnostic, trial, safety, and aggregate research reports. Use only with synthetic, de-identified, or aggregate inputs and verified source-fact manifests; every output requires qualified review.

相關技能