jpskill.com
🛠️ 開発・MCP コミュニティ 🔴 エンジニア向け 👤 エンジニア・AI開発者

🛠️ Latchbio連携

latchbio-integration

Latch SDKを使ってバイオインフォマティクスのワークフローを構築し、サーバーレスで実行、さらにNextflowやSnakemakeとの連携も可能にするSkill。

⏱ MCPサーバー実装 1日 → 2時間

📺 まず動画で見る(YouTube)

▶ 【衝撃】最強のAIエージェント「Claude Code」の最新機能・使い方・プログラミングをAIで効率化する超実践術を解説! ↗

※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。

📜 元の英語説明(参考)

Latch platform for bioinformatics workflows. Build pipelines with Latch SDK, @workflow/@task decorators, deploy serverless workflows, LatchFile/LatchDir, Nextflow/Snakemake integration.

🇯🇵 日本人クリエイター向け解説

一言でいうと

Latch SDKを使ってバイオインフォマティクスのワークフローを構築し、サーバーレスで実行、さらにNextflowやSnakemakeとの連携も可能にするSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o latchbio-integration.zip https://jpskill.com/download/4177.zip && unzip -o latchbio-integration.zip && rm latchbio-integration.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/4177.zip -OutFile "$d\latchbio-integration.zip"; Expand-Archive "$d\latchbio-integration.zip" -DestinationPath $d -Force; ri "$d\latchbio-integration.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して latchbio-integration.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → latchbio-integration フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-18
同梱ファイル
5

💬 こう話しかけるだけ — サンプルプロンプト

  • Latchbio Integration を使って、最小構成のサンプルコードを示して
  • Latchbio Integration の主な使い方と注意点を教えて
  • Latchbio Integration を既存プロジェクトに組み込む方法を教えて

これをClaude Code に貼るだけで、このSkillが自動発動します。

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

[Skill 名] latchbio-integration

LatchBio インテグレーション

概要

Latch は、バイオインフォマティクスワークフローをサーバーレスパイプラインとして構築・デプロイするための Python フレームワークです。Flyte をベースにしており、@workflow/@task デコレータでワークフローを作成し、LatchFile/LatchDir でクラウドデータを管理し、リソースを設定し、Nextflow/Snakemake パイプラインを統合できます。

主要な機能

Latch プラットフォームは、主に以下の4つの機能領域を提供します。

1. ワークフローの作成とデプロイ

  • Python デコレータを使用したサーバーレスワークフローの定義
  • ネイティブ Python、Nextflow、Snakemake パイプラインのサポート
  • Docker による自動コンテナ化
  • 自動生成されるノーコードユーザーインターフェース
  • バージョン管理と再現性

2. データ管理

  • クラウドストレージの抽象化 (LatchFile, LatchDir)
  • Registry (プロジェクト → テーブル → レコード) による構造化されたデータ整理
  • リンクと列挙型による型安全なデータ操作
  • ローカルとクラウド間の自動ファイル転送
  • ファイル選択のための Glob パターンマッチング

3. リソース設定

  • 事前設定されたタスクデコレータ (@small_task, @large_task, @small_gpu_task, @large_gpu_task)
  • カスタムリソース仕様 (CPU、メモリ、GPU、ストレージ)
  • GPU サポート (K80、V100、A100)
  • タイムアウトとストレージの設定
  • コスト最適化戦略

4. 検証済みワークフロー

  • 本番環境対応の事前構築済みパイプライン
  • バルク RNA-seq、DESeq2、パスウェイ解析
  • タンパク質構造予測のための AlphaFold と ColabFold
  • シングルセルツール (ArchR、scVelo、emptyDropsR)
  • CRISPR 解析、系統解析など

クイックスタート

インストールとセットアップ

# Latch SDK をインストール
uv pip install latch

# Latch にログイン
latch login

# 新しいワークフローを初期化
latch init my-workflow

# ワークフローをプラットフォームに登録
latch register my-workflow

前提条件:

  • Docker がインストールされ、実行されていること
  • Latch アカウントの認証情報
  • Python 3.8 以降

基本的なワークフローの例

from latch import workflow, small_task
from latch.types import LatchFile

@small_task
def process_file(input_file: LatchFile) -> LatchFile:
    """Process a single file"""
    # Processing logic
    return output_file

@workflow
def my_workflow(input_file: LatchFile) -> LatchFile:
    """
    My bioinformatics workflow

    Args:
        input_file: Input data file
    """
    return process_file(input_file=input_file)

このスキルを使用する場面

このスキルは、以下のいずれかのシナリオに遭遇した場合に使用してください。

ワークフロー開発:

  • 「RNA-seq 解析用の Latch ワークフローを作成する」
  • 「パイプラインを Latch にデプロイする」
  • 「Nextflow パイプラインを Latch に変換する」
  • 「ワークフローに GPU サポートを追加する」
  • @workflow@task デコレータを扱う場合

データ管理:

  • 「シーケンスデータを Latch Registry で整理する」
  • 「LatchFile と LatchDir の使い方を教えてください」
  • 「Latch でサンプル追跡を設定する」
  • latch:/// パスを扱う場合

リソース設定:

  • 「Latch で AlphaFold 用に GPU を設定する」
  • 「タスクがメモリ不足になる」
  • 「ワークフローのコストを最適化する方法は?」
  • タスクデコレータを扱う場合

検証済みワークフロー:

  • 「Latch で AlphaFold を実行する」
  • 「差次発現解析に DESeq2 を使用する」
  • 「利用可能な事前構築済みワークフロー」
  • latch.verified モジュールを使用する場合

詳細なドキュメント

このスキルには、機能別に整理された包括的なリファレンスドキュメントが含まれています。

references/workflow-creation.md

これを読むべき人:

  • ワークフローの作成と登録
  • タスクの定義とデコレータ
  • Python、Nextflow、Snakemake のサポート
  • 起動プランと条件付きセクション
  • ワークフローの実行 (CLI およびプログラムによる)
  • マルチステップおよび並列パイプライン
  • 登録に関する問題のトラブルシューティング

主要なトピック:

  • latch init および latch register コマンド
  • @workflow および @task デコレータ
  • LatchFile と LatchDir の基本
  • 型アノテーションとドキュメント文字列
  • 事前設定されたパラメータを持つ起動プラン
  • 条件付き UI セクション

references/data-management.md

これを読むべき人:

  • LatchFile と LatchDir を使用したクラウドストレージ
  • Registry システム (プロジェクト、テーブル、レコード)
  • リンクされたレコードとリレーションシップ
  • 列挙型と型付きカラム
  • 一括操作とトランザクション
  • ワークフローとの統合
  • アカウントとワークスペースの管理

主要なトピック:

  • latch:/// パス形式
  • ファイル転送と Glob パターン
  • Registry テーブルの作成とクエリ
  • カラム型 (string、number、file、link、enum)
  • レコードの CRUD 操作
  • ワークフローと Registry の統合

references/resource-configuration.md

これを読むべき人:

  • タスクリソースデコレータ
  • カスタム CPU、メモリ、GPU の設定
  • GPU タイプ (K80、V100、A100)
  • タイムアウトとストレージの設定
  • リソース最適化戦略
  • コスト効率の良いワークフロー設計
  • 監視とデバッグ

主要なトピック:

  • @small_task@large_task@small_gpu_task@large_gpu_task
  • 正確な仕様を持つ @custom_task
  • マルチ GPU 設定
  • ワークロードタイプによるリソース選択
  • プラットフォームの制限とクォータ

references/verified-workflows.md

これを読むべき人:

  • 事前構築済みの本番ワークフロー
  • バルク RNA-seq と DESeq2
  • AlphaFold と ColabFold
  • シングルセル解析 (ArchR、scVelo)
  • CRISPR 編集解析
  • パスウェイエンリッチメント
  • カスタムワークフローとの統合

主要なトピック:

  • latch.verified モジュールのインポート
  • 利用可能な検証済みワークフロー
  • ワークフローのパラメータとオプション
  • 検証済みステップとカスタムステップの組み合わせ
  • バージョン管理

一般的なワークフローパターン

完全な RNA-seq パイプライン

from latch import workflow, small_task, large_task
from latch.types import LatchFile, LatchDir

@small_task
def quality_control(fastq: LatchFile) -> LatchFile:
    """Run FastQC"""
    return qc_output

@large_task
def alignment(fastq: LatchFile, genome: str) -> LatchFile:
    """STAR alignment"""
    return bam_output

@small_task
def quantification(bam: LatchFile) -> LatchFile:
    """featureCounts"""
    return counts

@workflow
def rnaseq_pipeline(
    input_fastq: LatchFile,
    genome: str,
    output_dir: LatchDir
) -> LatchFile:
    """RNA-seq analysis pipeline"""
    qc = quality_control(fastq=input_fastq)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

LatchBio Integration

Overview

Latch is a Python framework for building and deploying bioinformatics workflows as serverless pipelines. Built on Flyte, create workflows with @workflow/@task decorators, manage cloud data with LatchFile/LatchDir, configure resources, and integrate Nextflow/Snakemake pipelines.

Core Capabilities

The Latch platform provides four main areas of functionality:

1. Workflow Creation and Deployment

  • Define serverless workflows using Python decorators
  • Support for native Python, Nextflow, and Snakemake pipelines
  • Automatic containerization with Docker
  • Auto-generated no-code user interfaces
  • Version control and reproducibility

2. Data Management

  • Cloud storage abstractions (LatchFile, LatchDir)
  • Structured data organization with Registry (Projects → Tables → Records)
  • Type-safe data operations with links and enums
  • Automatic file transfer between local and cloud
  • Glob pattern matching for file selection

3. Resource Configuration

  • Pre-configured task decorators (@small_task, @large_task, @small_gpu_task, @large_gpu_task)
  • Custom resource specifications (CPU, memory, GPU, storage)
  • GPU support (K80, V100, A100)
  • Timeout and storage configuration
  • Cost optimization strategies

4. Verified Workflows

  • Production-ready pre-built pipelines
  • Bulk RNA-seq, DESeq2, pathway analysis
  • AlphaFold and ColabFold for protein structure prediction
  • Single-cell tools (ArchR, scVelo, emptyDropsR)
  • CRISPR analysis, phylogenetics, and more

Quick Start

Installation and Setup

# Install Latch SDK
uv pip install latch

# Login to Latch
latch login

# Initialize a new workflow
latch init my-workflow

# Register workflow to platform
latch register my-workflow

Prerequisites:

  • Docker installed and running
  • Latch account credentials
  • Python 3.8+

Basic Workflow Example

from latch import workflow, small_task
from latch.types import LatchFile

@small_task
def process_file(input_file: LatchFile) -> LatchFile:
    """Process a single file"""
    # Processing logic
    return output_file

@workflow
def my_workflow(input_file: LatchFile) -> LatchFile:
    """
    My bioinformatics workflow

    Args:
        input_file: Input data file
    """
    return process_file(input_file=input_file)

When to Use This Skill

This skill should be used when encountering any of the following scenarios:

Workflow Development:

  • "Create a Latch workflow for RNA-seq analysis"
  • "Deploy my pipeline to Latch"
  • "Convert my Nextflow pipeline to Latch"
  • "Add GPU support to my workflow"
  • Working with @workflow, @task decorators

Data Management:

  • "Organize my sequencing data in Latch Registry"
  • "How do I use LatchFile and LatchDir?"
  • "Set up sample tracking in Latch"
  • Working with latch:/// paths

Resource Configuration:

  • "Configure GPU for AlphaFold on Latch"
  • "My task is running out of memory"
  • "How do I optimize workflow costs?"
  • Working with task decorators

Verified Workflows:

  • "Run AlphaFold on Latch"
  • "Use DESeq2 for differential expression"
  • "Available pre-built workflows"
  • Using latch.verified module

Detailed Documentation

This skill includes comprehensive reference documentation organized by capability:

references/workflow-creation.md

Read this for:

  • Creating and registering workflows
  • Task definition and decorators
  • Supporting Python, Nextflow, Snakemake
  • Launch plans and conditional sections
  • Workflow execution (CLI and programmatic)
  • Multi-step and parallel pipelines
  • Troubleshooting registration issues

Key topics:

  • latch init and latch register commands
  • @workflow and @task decorators
  • LatchFile and LatchDir basics
  • Type annotations and docstrings
  • Launch plans with preset parameters
  • Conditional UI sections

references/data-management.md

Read this for:

  • Cloud storage with LatchFile and LatchDir
  • Registry system (Projects, Tables, Records)
  • Linked records and relationships
  • Enum and typed columns
  • Bulk operations and transactions
  • Integration with workflows
  • Account and workspace management

Key topics:

  • latch:/// path format
  • File transfer and glob patterns
  • Creating and querying Registry tables
  • Column types (string, number, file, link, enum)
  • Record CRUD operations
  • Workflow-Registry integration

references/resource-configuration.md

Read this for:

  • Task resource decorators
  • Custom CPU, memory, GPU configuration
  • GPU types (K80, V100, A100)
  • Timeout and storage settings
  • Resource optimization strategies
  • Cost-effective workflow design
  • Monitoring and debugging

Key topics:

  • @small_task, @large_task, @small_gpu_task, @large_gpu_task
  • @custom_task with precise specifications
  • Multi-GPU configuration
  • Resource selection by workload type
  • Platform limits and quotas

references/verified-workflows.md

Read this for:

  • Pre-built production workflows
  • Bulk RNA-seq and DESeq2
  • AlphaFold and ColabFold
  • Single-cell analysis (ArchR, scVelo)
  • CRISPR editing analysis
  • Pathway enrichment
  • Integration with custom workflows

Key topics:

  • latch.verified module imports
  • Available verified workflows
  • Workflow parameters and options
  • Combining verified and custom steps
  • Version management

Common Workflow Patterns

Complete RNA-seq Pipeline

from latch import workflow, small_task, large_task
from latch.types import LatchFile, LatchDir

@small_task
def quality_control(fastq: LatchFile) -> LatchFile:
    """Run FastQC"""
    return qc_output

@large_task
def alignment(fastq: LatchFile, genome: str) -> LatchFile:
    """STAR alignment"""
    return bam_output

@small_task
def quantification(bam: LatchFile) -> LatchFile:
    """featureCounts"""
    return counts

@workflow
def rnaseq_pipeline(
    input_fastq: LatchFile,
    genome: str,
    output_dir: LatchDir
) -> LatchFile:
    """RNA-seq analysis pipeline"""
    qc = quality_control(fastq=input_fastq)
    aligned = alignment(fastq=qc, genome=genome)
    return quantification(bam=aligned)

GPU-Accelerated Workflow

from latch import workflow, small_task, large_gpu_task
from latch.types import LatchFile

@small_task
def preprocess(input_file: LatchFile) -> LatchFile:
    """Prepare data"""
    return processed

@large_gpu_task
def gpu_computation(data: LatchFile) -> LatchFile:
    """GPU-accelerated analysis"""
    return results

@workflow
def gpu_pipeline(input_file: LatchFile) -> LatchFile:
    """Pipeline with GPU tasks"""
    preprocessed = preprocess(input_file=input_file)
    return gpu_computation(data=preprocessed)

Registry-Integrated Workflow

from latch import workflow, small_task
from latch.registry.table import Table
from latch.registry.record import Record
from latch.types import LatchFile

@small_task
def process_and_track(sample_id: str, table_id: str) -> str:
    """Process sample and update Registry"""
    # Get sample from registry
    table = Table.get(table_id=table_id)
    records = Record.list(table_id=table_id, filter={"sample_id": sample_id})
    sample = records[0]

    # Process
    input_file = sample.values["fastq_file"]
    output = process(input_file)

    # Update registry
    sample.update(values={"status": "completed", "result": output})
    return "Success"

@workflow
def registry_workflow(sample_id: str, table_id: str):
    """Workflow integrated with Registry"""
    return process_and_track(sample_id=sample_id, table_id=table_id)

Best Practices

Workflow Design

  1. Use type annotations for all parameters
  2. Write clear docstrings (appear in UI)
  3. Start with standard task decorators, scale up if needed
  4. Break complex workflows into modular tasks
  5. Implement proper error handling

Data Management

  1. Use consistent folder structures
  2. Define Registry schemas before bulk entry
  3. Use linked records for relationships
  4. Store metadata in Registry for traceability

Resource Configuration

  1. Right-size resources (don't over-allocate)
  2. Use GPU only when algorithms support it
  3. Monitor execution metrics and optimize
  4. Design for parallel execution when possible

Development Workflow

  1. Test locally with Docker before registration
  2. Use version control for workflow code
  3. Document resource requirements
  4. Profile workflows to determine actual needs

Troubleshooting

Common Issues

Registration Failures:

  • Ensure Docker is running
  • Check authentication with latch login
  • Verify all dependencies in Dockerfile
  • Use --verbose flag for detailed logs

Resource Problems:

  • Out of memory: Increase memory in task decorator
  • Timeouts: Increase timeout parameter
  • Storage issues: Increase ephemeral storage_gib

Data Access:

  • Use correct latch:/// path format
  • Verify file exists in workspace
  • Check permissions for shared workspaces

Type Errors:

  • Add type annotations to all parameters
  • Use LatchFile/LatchDir for file/directory parameters
  • Ensure workflow return type matches actual return

Additional Resources

Support

For issues or questions:

  1. Check documentation links above
  2. Search GitHub issues
  3. Ask in Slack community
  4. Contact support@latch.bio

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。