AlphaGenome

影片長度:30 分鐘

AlphaGenome 是由 Google DeepMind 開發的先進深度學習模型,這項技術旨在解讀人類基因組的功能調控程式碼。這項模型會以單一鹼基解析度分析大規模 DNA 序列 (最多 100 萬個鹼基對),預測基因變異如何影響分子和生物機制,例如基因表現、染色質可及性和 RNA 剪接。

本文說明如何部署及使用 AlphaGenome,以及使用模型時的硬體和部署需求。

硬體和部署需求

由於 AlphaGenome 的架構較深,且內容視窗為 1 MB,因此模型對硬體和記憶體有嚴格要求。本節涵蓋下列主題:

支援的 VM 和 GPU 設定

AlphaGenome 最少需要一個節點,且可使用搭載 NVIDIA A100 或 H100 加速器的特定機器類型,部署至 Agent Platform 端點。

Agent Platform 端點可順暢擴充。如果需要額外容量來處理增加的請求量,管理員可以設定自動調度,視需要持續新增節點。詳情請參閱「使用自動調度資源功能調度推論節點」。

支援的加速器和機型

管理員必須從下列支援的機型中選取,這些機型提供必要的 80 GB GPU 記憶體:

  • NVIDIA H100 (80 GB):a3-highgpu-1g、a3-highgpu-2g、a3-highgpu-4g、 a3-highgpu-8g
  • NVIDIA A100 (80 GB):a2-ultragpu-1g、a2-ultragpu-2g、a2-ultragpu-4g、 a2-ultragpu-8g
  • NVIDIA H100 Mega (80 GB):a3-megagpu-8g

如需詳細規格,請參閱「設定推論的運算資源」。

配額需求

部署前,管理員必須確保 Cloud de Confiance by S3NS 專案在目標區域中已分配足夠的 GPU 服務配額:

  • aiplatform.googleapis.com/custom_model_serving_nvidia_h100_gpus
  • aiplatform.googleapis.com/custom_model_serving_nvidia_a100_gpus
  • aiplatform.googleapis.com/custom_model_serving_nvidia_h100_mega_gpus
  • compute.googleapis.com/gpus_per_gpu_family

部署 AlphaGenome

您可以從 Model Garden 自行部署 AlphaGenome 模型。如需詳細操作說明,瞭解如何佈建端點基礎架構,以及將模型部署至 Cloud de Confiance by S3NS 專案,請參閱「從 Model Garden 部署開放式模型」。

使用 AlphaGenome

使用者可以透過 Python SDK 或 REST API,以程式輔助方式與已部署的 AlphaGenome 端點互動。

Cloud de Confiance by S3NS

如需完整的 API 參考資料、參數定義和詳細結構定義,請參閱 AlphaGenome 官方說明文件。

先決條件和驗證

部署的端點存取權是透過 Cloud de Confiance by S3NS Identity and Access Management 管理。請確認執行環境 (例如本機終端機、VM 或 Colab) 已透過具有 Agent Platform 使用者 (roles/aiplatform.user) 角色的憑證 (服務帳戶或使用者憑證) 進行驗證。

用量

Python

安裝 SDK

AlphaGenome Cloud SDK 的 Wheel 檔案位於 GoogleCloudPlatform GitHub 存放區。您可以執行下列指令來下載 Wheel 檔案:

# Download the whl file using - 
wget -q https://github.com/GoogleCloudPlatform/vertex-ai-samples/raw/main/notebooks/community/alphagenome/whl/alphagenome_cloud_sdk-0.4.2.11-py3-none-any.whl

# Install the whl file
pip install alphagenome_cloud_sdk-0.4.2.11-py3-none-any.whl

初始化用戶端

您必須先初始化用戶端,才能使用模型:

from alphagenome.models import dna_client
from alphagenome_cloud_sdk.models import dna_client_http

# Create the HTTP client pointing to the Agent Platform endpoint.
# The `service_account` parameter is optional and only required if you are 
# choosing to authenticate via service account impersonation.
dna_model = dna_client_http.create_http_client(
    vertex_ai_url=vertex_ai_url,
    # service_account=service_account  # Uncomment to use service account impersonation
)

預測 DNA 序列的軌跡

使用 predict_sequence 預測原始 DNA 字串的基因體模態:

# Pad a synthetic sequence to 1 MB using 'N' for unknown/padding bases
padded_sequence = 'GATTACA'.center(dna_client.SEQUENCE_LENGTH_1MB, 'N')

output = dna_model.predict_sequence(
    sequence=padded_sequence,
    requested_outputs=[
        dna_client.OutputType.CAGE,   # Transcription Start Sites
        dna_client.OutputType.DNASE,  # Chromatin Accessibility
    ],
    ontology_terms=[
        'UBERON:0002048',             # Lung tissue ontology term
    ]
)

# Access prediction values (shape: sequence_length, num_tracks)
dnase_signals = output.dnase.values
dnase_metadata = output.dnase.metadata

預測參照基因體間隔的軌跡

使用 predict_interval 從參照基因體中的特定染色體區域直接預測模態:

from alphagenome.data.genome import Interval

# Define a genomic interval and resize it to the 1Mb context window
interval = Interval(
    chromosome='chr19',
    start=40991281,
    end=41018398,
    strand='.',
    name='CYP2B6'
).resize(dna_client.SEQUENCE_LENGTH_1MB)

output = dna_model.predict_interval(
    interval=interval,
    requested_outputs=[dna_client.OutputType.RNA_SEQ],
    ontology_terms=['UBERON:0001114']  # Right liver lobe
)

評估變異影響 (電腦模擬突變)

使用 score_variant 比較參考 (REF) 序列的預測表達與替代 (ALT) 突變序列:

from alphagenome.data import genome
from alphagenome.models import variant_scorers

# Define the genetic variant
variant = genome.Variant(
    chromosome='chr22',
    position=36201698,
    reference_bases='A',
    alternate_bases='C',
)

# Select the variant scoring method for RNA-Seq
variant_scorer = variant_scorers.RECOMMENDED_VARIANT_SCORERS['RNA_SEQ']

# Execute the scoring
variant_scores = dna_model.score_variant(
    interval=variant.reference_interval.resize(dna_client.SEQUENCE_LENGTH_1MB),
    variant=variant,
    variant_scorers=[variant_scorer],
    fix_negative_strand=True
)

# Output is returned as an AnnData object containing raw and quantile scores
print("Scores shape:", variant_scores[0].X.shape)

REST

用戶端可以使用標準 REST 用戶端工具 (例如 curl) 查詢已部署的端點:

# Set your base endpoint URL
export ENDPOINT_URL="https://<your-endpoint-url>"

# (Optional) If you choose to impersonate a service account, set this variable
# export SERVICE_ACCOUNT="your-service-account-email@your-project.iam.gserviceaccount.com"

# Generate an OAuth2 access token using your current credentials
# If using service account impersonation, append: --impersonate-service-account=$SERVICE_ACCOUNT
export TOKEN=$(gcloud auth print-access-token)

curl -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/alphagenome-003",
    "instances": [
      {
        "request_type": "predict_interval",
        "data": {
          "interval": {
            "chromosome": "chr19",
            "start": "40480552",
            "end": "41529128",
            "strand": "STRAND_UNSTRANDED"
          },
          "organism": "ORGANISM_HOMO_SAPIENS",
          "requestedOutputs": ["OUTPUT_TYPE_ATAC"]
        }
      }
    ]
  }' \
  ${ENDPOINT_URL}:streamRawPredict

請注意,AlphaGenome 端點需要在基本端點網址後方附加 streamRawPredict 動作。

定價

AlphaGenome 須付費訂閱。如要瞭解 AlphaGenome 的價格,請洽詢銷售專家 Cloud de Confiance by S3NS 或與您的帳戶團隊合作 Cloud de Confiance by S3NS。

您必須支付用於代管模型的基礎架構費用,包括 Agent Platform 端點,以及模型部署所在的 GPU 執行個體。詳情請參閱 Agent Platform 定價。

限制

AlphaGenome 具有下列限制:

  • 僅供研究使用:AlphaGenome 僅為研究工具,不適用於臨床診斷,也未通過相關核准。
  • 1 MB 脈絡範圍:如果基因體互動的距離超過 1 MB,就無法在單一預測查詢中擷取。
  • 不支援微調:不支援使用私人訓練資料集微調 AlphaGenome 基礎模型。這個模型僅供推論使用。

科學參考目錄

為支援科學家和開發人員社群,下表列出 AlphaGenome 的主要參考資料、文獻和資源:

資源類型 標題和連結 說明
同儕審查論文 Advancing regulatory variant effect prediction with AlphaGenome,《Nature》(2026 年 1 月) 主要科學出版品,詳細說明模型的架構、評估和效能基準。
預先發布文章 AlphaGenome:透過統一的 DNA 序列模型,提升調控變異效果預測準確度,bioRxiv (2025 年 7 月) 初步的同儕審查前手稿。
公告 AlphaGenome:運用 AI 深入瞭解基因組,Google DeepMind 網誌 (2025 年 6 月) 這篇高階版網誌文章說明瞭模型對基因體學的影響。
API 說明文件 AlphaGenome 說明文件 Python SDK 和 HTTP API 架構的技術文件。
影片逐步操作說明 AlphaGenome:運用 AI 深入瞭解基因組 影片逐步說明模型功能和基本互動流程。(影片長度:30 分鐘)
快速入門筆記本 AlphaGenome 快速入門 Colab 筆記本 這份筆記本提供 SDK 初始化和變體效果評分的可執行範例。

支援和意見回饋

如需 AlphaGenome 支援,請參閱下列連結:

  • 基因體科學和模型輸出支援:如要討論生物學、模型預測、可解讀性,或是與 Google DeepMind 互動,請前往 alphagenomecommunity.com 加入公開的 AlphaGenome 和 EDM 社群論壇。
  • 基礎架構和平台支援:如有Cloud de Confiance by S3NS 配額、加速器、用戶端程式庫問題、帳單等相關問題,請與您的帳戶團隊聯絡,或向標準Cloud de Confiance by S3NS 支援團隊提交支援要求。