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

🛠️ Dnanexus連携

dnanexus-integration

DNAnexusというクラウド上のゲノム解析プラットフォーム

⏱ ボイラープレート実装 半日 → 30分

📺 まず動画で見る(YouTube)

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

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

📜 元の英語説明(参考)

DNAnexus cloud genomics platform. Build apps/applets, manage data (upload/download), dxpy Python SDK, run workflows, FASTQ/BAM/VCF, for genomics pipeline development and execution.

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

一言でいうと

DNAnexusというクラウド上のゲノム解析プラットフォーム

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

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

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

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

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

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して dnanexus-integration.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → dnanexus-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
同梱ファイル
6

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

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

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

📖 Skill本文(日本語訳)

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

[Skill 名] dnanexus-integration

DNAnexus連携

概要

DNAnexusは、生物医学データ分析とゲノミクス向けのクラウドプラットフォームです。アプリ/アプレットの構築とデプロイ、データオブジェクトの管理、ワークフローの実行、そしてゲノミクスパイプラインの開発と実行のためにdxpy Python SDKを使用します。

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

このスキルは、以下の状況で使用してください。

  • DNAnexusのアプリ/アプレットを作成、構築、または変更する場合
  • ファイルやレコードをアップロード、ダウンロード、検索、または整理する場合
  • 解析を実行し、ジョブを監視し、ワークフローを作成する場合
  • プラットフォームと連携するためにdxpyを使用してスクリプトを作成する場合
  • dxapp.jsonを設定し、依存関係を管理し、Dockerを使用する場合
  • FASTQ、BAM、VCF、またはその他のバイオインフォマティクスファイルを処理する場合
  • プロジェクト、権限、またはプラットフォームリソースを管理する場合

主要な機能

このスキルは5つの主要な領域に分かれており、それぞれに詳細なリファレンスドキュメントがあります。

1. アプリ開発

目的: DNAnexusプラットフォーム上で実行される実行可能プログラム(アプリ/アプレット)を作成します。

主な操作:

  • dx-app-wizardでアプリのスケルトンを生成します
  • 適切なエントリポイントを持つPythonまたはBashアプリを作成します
  • 入出力データオブジェクトを処理します
  • dx buildまたはdx build --appでデプロイします
  • プラットフォーム上でアプリをテストします

一般的な使用例:

  • バイオインフォマティクスパイプライン(アライメント、バリアントコーリング)
  • データ処理ワークフロー
  • 品質管理とフィルタリング
  • フォーマット変換ツール

リファレンス: references/app-development.mdを参照してください。

  • 完全なアプリ構造とパターン
  • Pythonエントリポイントデコレータ
  • dxpyによる入出力処理
  • 開発のベストプラクティス
  • よくある問題と解決策

2. データ操作

目的: プラットフォーム上のファイル、レコード、およびその他のデータオブジェクトを管理します。

主な操作:

  • dxpy.upload_local_file()dxpy.download_dxfile()でファイルをアップロード/ダウンロードします
  • メタデータ付きのレコードを作成および管理します
  • 名前、プロパティ、またはタイプでデータオブジェクトを検索します
  • プロジェクト間でデータをクローンします
  • プロジェクトフォルダと権限を管理します

一般的な使用例:

  • シーケンスデータ(FASTQファイル)のアップロード
  • 解析結果の整理
  • 特定のサンプルや実験の検索
  • プロジェクト間のデータのバックアップ
  • 参照ゲノムとアノテーションの管理

リファレンス: references/data-operations.mdを参照してください。

  • 完全なファイルおよびレコード操作
  • データオブジェクトのライフサイクル(オープン/クローズ状態)
  • 検索と発見のパターン
  • プロジェクト管理
  • バッチ操作

3. ジョブ実行

目的: 解析を実行し、実行を監視し、ワークフローをオーケストレーションします。

主な操作:

  • applet.run()またはapp.run()でジョブを起動します
  • ジョブのステータスとログを監視します
  • 並列処理のためにサブジョブを作成します
  • 多段階ワークフローを構築および実行します
  • 出力参照でジョブを連結します

一般的な使用例:

  • シーケンスデータに対するゲノミクス解析の実行
  • 複数のサンプルの並列処理
  • 多段階解析パイプライン
  • 長時間実行される計算の監視
  • 失敗したジョブのデバッグ

リファレンス: references/job-execution.mdを参照してください。

  • 完全なジョブのライフサイクルと状態
  • ワークフローの作成とオーケストレーション
  • 並列実行パターン
  • ジョブの監視とデバッグ
  • リソース管理

4. Python SDK (dxpy)

目的: Pythonを介してDNAnexusプラットフォームにプログラムでアクセスします。

主な操作:

  • データオブジェクトハンドラ(DXFile、DXRecord、DXAppletなど)を操作します
  • 一般的なタスクに高レベル関数を使用します
  • 高度な操作のために直接API呼び出しを行います
  • オブジェクト間にリンクと参照を作成します
  • プラットフォームリソースを検索および発見します

一般的な使用例:

  • データ管理のための自動化スクリプト
  • カスタム解析パイプライン
  • バッチ処理ワークフロー
  • 外部ツールとの統合
  • データ移行と整理

リファレンス: references/python-sdk.mdを参照してください。

  • 完全なdxpyクラスリファレンス
  • 高レベルユーティリティ関数
  • APIメソッドドキュメント
  • エラー処理パターン
  • 一般的なコードパターン

5. 設定と依存関係

目的: アプリのメタデータを設定し、依存関係を管理します。

主な操作:

  • 入力、出力、および実行仕様を含むdxapp.jsonを作成します
  • システムパッケージをインストールします(execDepends)
  • カスタムツールとリソースをバンドルします
  • 共有依存関係にアセットを使用します
  • Dockerコンテナを統合します
  • インスタンスタイプとタイムアウトを設定します

一般的な使用例:

  • アプリの入出力仕様の定義
  • バイオインフォマティクスツール(samtools、bwaなど)のインストール
  • Pythonパッケージの依存関係の管理
  • 複雑な環境のためのDockerイメージの使用
  • 計算リソースの選択

リファレンス: references/configuration.mdを参照してください。

  • 完全なdxapp.json仕様
  • 依存関係管理戦略
  • Docker統合パターン
  • 地域およびリソース設定
  • 設定例

クイックスタートの例

データのアップロードと解析

import dxpy

# Upload input file
input_file = dxpy.upload_local_file("sample.fastq", project="project-xxxx")

# Run analysis
job = dxpy.DXApplet("applet-xxxx").run({
    "reads": dxpy.dxlink(input_file.get_id())
})

# Wait for completion
job.wait_on_done()

# Download results
output_id = job.describe()["output"]["aligned_reads"]["$dnanexus_link"]
dxpy.download_dxfile(output_id, "aligned.bam")

ファイルの検索とダウンロード

import dxpy

# Find BAM files from a specific experiment
files = dxpy.find_data_objects(
    classname="file",
    name="*.bam",
    properties={"experiment": "exp001"},
    project="project-xxxx"
)

# Download each file
for file_result in files:
    file_obj = dxpy.DXFile(file_result["id"])
    filename = file_obj.describe()["name"]
    dxpy.download_dxfile(file_result["id"], filename)

シンプルなアプリの作成

# src/my-app.py
import dxpy
import subprocess

@dxpy.entry_point('main')
def main(input_file, quality_threshold=30):
    # Download input
    dxpy.download_dxfile(input_file["$dnanexus_link"], "input.fastq")

    # Process
    subprocess.check_call([
        "quality_filter",
        "--input", "input.fastq",
        "--output", "filtered.fastq",
        "--threshold", str(quality_thres
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

DNAnexus Integration

Overview

DNAnexus is a cloud platform for biomedical data analysis and genomics. Build and deploy apps/applets, manage data objects, run workflows, and use the dxpy Python SDK for genomics pipeline development and execution.

When to Use This Skill

This skill should be used when:

  • Creating, building, or modifying DNAnexus apps/applets
  • Uploading, downloading, searching, or organizing files and records
  • Running analyses, monitoring jobs, creating workflows
  • Writing scripts using dxpy to interact with the platform
  • Setting up dxapp.json, managing dependencies, using Docker
  • Processing FASTQ, BAM, VCF, or other bioinformatics files
  • Managing projects, permissions, or platform resources

Core Capabilities

The skill is organized into five main areas, each with detailed reference documentation:

1. App Development

Purpose: Create executable programs (apps/applets) that run on the DNAnexus platform.

Key Operations:

  • Generate app skeleton with dx-app-wizard
  • Write Python or Bash apps with proper entry points
  • Handle input/output data objects
  • Deploy with dx build or dx build --app
  • Test apps on the platform

Common Use Cases:

  • Bioinformatics pipelines (alignment, variant calling)
  • Data processing workflows
  • Quality control and filtering
  • Format conversion tools

Reference: See references/app-development.md for:

  • Complete app structure and patterns
  • Python entry point decorators
  • Input/output handling with dxpy
  • Development best practices
  • Common issues and solutions

2. Data Operations

Purpose: Manage files, records, and other data objects on the platform.

Key Operations:

  • Upload/download files with dxpy.upload_local_file() and dxpy.download_dxfile()
  • Create and manage records with metadata
  • Search for data objects by name, properties, or type
  • Clone data between projects
  • Manage project folders and permissions

Common Use Cases:

  • Uploading sequencing data (FASTQ files)
  • Organizing analysis results
  • Searching for specific samples or experiments
  • Backing up data across projects
  • Managing reference genomes and annotations

Reference: See references/data-operations.md for:

  • Complete file and record operations
  • Data object lifecycle (open/closed states)
  • Search and discovery patterns
  • Project management
  • Batch operations

3. Job Execution

Purpose: Run analyses, monitor execution, and orchestrate workflows.

Key Operations:

  • Launch jobs with applet.run() or app.run()
  • Monitor job status and logs
  • Create subjobs for parallel processing
  • Build and run multi-step workflows
  • Chain jobs with output references

Common Use Cases:

  • Running genomics analyses on sequencing data
  • Parallel processing of multiple samples
  • Multi-step analysis pipelines
  • Monitoring long-running computations
  • Debugging failed jobs

Reference: See references/job-execution.md for:

  • Complete job lifecycle and states
  • Workflow creation and orchestration
  • Parallel execution patterns
  • Job monitoring and debugging
  • Resource management

4. Python SDK (dxpy)

Purpose: Programmatic access to DNAnexus platform through Python.

Key Operations:

  • Work with data object handlers (DXFile, DXRecord, DXApplet, etc.)
  • Use high-level functions for common tasks
  • Make direct API calls for advanced operations
  • Create links and references between objects
  • Search and discover platform resources

Common Use Cases:

  • Automation scripts for data management
  • Custom analysis pipelines
  • Batch processing workflows
  • Integration with external tools
  • Data migration and organization

Reference: See references/python-sdk.md for:

  • Complete dxpy class reference
  • High-level utility functions
  • API method documentation
  • Error handling patterns
  • Common code patterns

5. Configuration and Dependencies

Purpose: Configure app metadata and manage dependencies.

Key Operations:

  • Write dxapp.json with inputs, outputs, and run specs
  • Install system packages (execDepends)
  • Bundle custom tools and resources
  • Use assets for shared dependencies
  • Integrate Docker containers
  • Configure instance types and timeouts

Common Use Cases:

  • Defining app input/output specifications
  • Installing bioinformatics tools (samtools, bwa, etc.)
  • Managing Python package dependencies
  • Using Docker images for complex environments
  • Selecting computational resources

Reference: See references/configuration.md for:

  • Complete dxapp.json specification
  • Dependency management strategies
  • Docker integration patterns
  • Regional and resource configuration
  • Example configurations

Quick Start Examples

Upload and Analyze Data

import dxpy

# Upload input file
input_file = dxpy.upload_local_file("sample.fastq", project="project-xxxx")

# Run analysis
job = dxpy.DXApplet("applet-xxxx").run({
    "reads": dxpy.dxlink(input_file.get_id())
})

# Wait for completion
job.wait_on_done()

# Download results
output_id = job.describe()["output"]["aligned_reads"]["$dnanexus_link"]
dxpy.download_dxfile(output_id, "aligned.bam")

Search and Download Files

import dxpy

# Find BAM files from a specific experiment
files = dxpy.find_data_objects(
    classname="file",
    name="*.bam",
    properties={"experiment": "exp001"},
    project="project-xxxx"
)

# Download each file
for file_result in files:
    file_obj = dxpy.DXFile(file_result["id"])
    filename = file_obj.describe()["name"]
    dxpy.download_dxfile(file_result["id"], filename)

Create Simple App

# src/my-app.py
import dxpy
import subprocess

@dxpy.entry_point('main')
def main(input_file, quality_threshold=30):
    # Download input
    dxpy.download_dxfile(input_file["$dnanexus_link"], "input.fastq")

    # Process
    subprocess.check_call([
        "quality_filter",
        "--input", "input.fastq",
        "--output", "filtered.fastq",
        "--threshold", str(quality_threshold)
    ])

    # Upload output
    output_file = dxpy.upload_local_file("filtered.fastq")

    return {
        "filtered_reads": dxpy.dxlink(output_file)
    }

dxpy.run()

Workflow Decision Tree

When working with DNAnexus, follow this decision tree:

  1. Need to create a new executable?

    • Yes → Use App Development (references/app-development.md)
    • No → Continue to step 2
  2. Need to manage files or data?

    • Yes → Use Data Operations (references/data-operations.md)
    • No → Continue to step 3
  3. Need to run an analysis or workflow?

    • Yes → Use Job Execution (references/job-execution.md)
    • No → Continue to step 4
  4. Writing Python scripts for automation?

    • Yes → Use Python SDK (references/python-sdk.md)
    • No → Continue to step 5
  5. Configuring app settings or dependencies?

    • Yes → Use Configuration (references/configuration.md)

Often you'll need multiple capabilities together (e.g., app development + configuration, or data operations + job execution).

Installation and Authentication

Install dxpy

uv pip install dxpy

Login to DNAnexus

dx login

This authenticates your session and sets up access to projects and data.

Verify Installation

dx --version
dx whoami

Common Patterns

Pattern 1: Batch Processing

Process multiple files with the same analysis:

# Find all FASTQ files
files = dxpy.find_data_objects(
    classname="file",
    name="*.fastq",
    project="project-xxxx"
)

# Launch parallel jobs
jobs = []
for file_result in files:
    job = dxpy.DXApplet("applet-xxxx").run({
        "input": dxpy.dxlink(file_result["id"])
    })
    jobs.append(job)

# Wait for all completions
for job in jobs:
    job.wait_on_done()

Pattern 2: Multi-Step Pipeline

Chain multiple analyses together:

# Step 1: Quality control
qc_job = qc_applet.run({"reads": input_file})

# Step 2: Alignment (uses QC output)
align_job = align_applet.run({
    "reads": qc_job.get_output_ref("filtered_reads")
})

# Step 3: Variant calling (uses alignment output)
variant_job = variant_applet.run({
    "bam": align_job.get_output_ref("aligned_bam")
})

Pattern 3: Data Organization

Organize analysis results systematically:

# Create organized folder structure
dxpy.api.project_new_folder(
    "project-xxxx",
    {"folder": "/experiments/exp001/results", "parents": True}
)

# Upload with metadata
result_file = dxpy.upload_local_file(
    "results.txt",
    project="project-xxxx",
    folder="/experiments/exp001/results",
    properties={
        "experiment": "exp001",
        "sample": "sample1",
        "analysis_date": "2025-10-20"
    },
    tags=["validated", "published"]
)

Best Practices

  1. Error Handling: Always wrap API calls in try-except blocks
  2. Resource Management: Choose appropriate instance types for workloads
  3. Data Organization: Use consistent folder structures and metadata
  4. Cost Optimization: Archive old data, use appropriate storage classes
  5. Documentation: Include clear descriptions in dxapp.json
  6. Testing: Test apps with various input types before production use
  7. Version Control: Use semantic versioning for apps
  8. Security: Never hardcode credentials in source code
  9. Logging: Include informative log messages for debugging
  10. Cleanup: Remove temporary files and failed jobs

Resources

This skill includes detailed reference documentation:

references/

  • app-development.md - Complete guide to building and deploying apps/applets
  • data-operations.md - File management, records, search, and project operations
  • job-execution.md - Running jobs, workflows, monitoring, and parallel processing
  • python-sdk.md - Comprehensive dxpy library reference with all classes and functions
  • configuration.md - dxapp.json specification and dependency management

Load these references when you need detailed information about specific operations or when working on complex tasks.

Getting Help

同梱ファイル

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