jpskill.com
💼 ビジネス コミュニティ

sragent

Sequence Read Archive (SRA)のデータを活用し、論文検索やゲノムメタデータの分析を、アクセッション番号変換やBigQueryを用いた検索、シングルセル解析技術の特定などと組み合わせて効率的に行うSkill。

📜 元の英語説明(参考)

Query the Sequence Read Archive (SRA), retrieve scientific publications, and analyze genomics metadata using the SRAgent toolkit. Supports accession conversion (GSE→SRX→SRR), BigQuery metadata queries, manuscript downloads from multiple sources, and scRNA-seq technology identification. Use when working with SRA/GEO datasets, finding publications, or analyzing single-cell sequencing experiments.

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

一言でいうと

Sequence Read Archive (SRA)のデータを活用し、論文検索やゲノムメタデータの分析を、アクセッション番号変換やBigQueryを用いた検索、シングルセル解析技術の特定などと組み合わせて効率的に行うSkill。

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

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

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

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

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

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

📖 Skill本文(日本語訳)

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

SRAgent: Sequence Read Archive のデータと論文検索

概要

SRAgent は、NCBI Sequence Read Archive (SRA) および Gene Expression Omnibus (GEO) データベースを扱うための、エージェントを活用したワークフローシステムです。 ゲノミクスデータセットに関する文献の発見、メタデータの抽出、および論文の検索を自動化します。

セットアップ手順

1. SRAgent のインストール

SRAgent は Python ≥3.11 を必要とします。SRAgent がすでにインストールされているか確認してください。

which SRAgent

SRAgent がインストールされていない場合は、以下の手順に従ってください。

uv を使用してインストールします。

# リポジトリをクローン
git clone https://github.com/ArcInstitute/SRAgent.git
cd SRAgent

# uv で仮想環境を作成してアクティブ化
uv venv
source .venv/bin/activate

# パッケージをインストール
uv pip install .

インストールを確認します。

SRAgent --help

2. 環境変数の設定

以下の環境変数が必要です。

  • OPENAI_API_KEY=sk-openai-...
    • OpenAI モデルを使用するために必要です
  • ANTHROPIC_API_KEY=sk-ant-...
    • Claude モデルを使用するために必要です
  • DYNACONF
    • Claude と OpenAI モデルを切り替えるために必要です
  • EMAIL=user@example.com
    • Entrez API を使用するために必要です
  • NCBI_API_KEY=your-ncbi-key
    • Entrez API 使用時のレート制限を緩和するために任意で設定できます
  • CORE_API_KEY=your-core-key
    • CORE API から論文をダウンロードするために任意で設定できます
  • GCP_PROJECT_ID=your-project-id
    • Google BigQuery を使用するために必要です
  • GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json
    • Google BigQuery を使用するために必要です

環境変数がまだ設定されていない場合は、環境変数を設定するようにユーザーに促します: export MY_SECRET_VAR=my-secret-value

3. 設定の構成

SRAgent は設定ファイル (settings.yml) を使用して、モデルと動作を構成します。 デフォルト設定はほとんどのユーザーに適していますが、カスタマイズすることもできます。

オプション A: デフォルト設定を使用する

特別な操作は不要です。SRAgent には適切なデフォルト設定が付属しています。

オプション B: カスタム設定ファイル

必要に応じて変更できる設定ファイルの例については、./references/example-settings.yml を参照してください。

4. セットアップの確認

構成をテストします。

# どのモデルが使用されているかを確認
python -c "from SRAgent.agents.utils import load_settings; s = load_settings(); print(s['models']['default'])"

# 基本的な機能をテスト
SRAgent entrez "Convert GSE121737 to SRX accessions"

主要な機能

1. アクセッション変換

異なるゲノミクスデータベースのアクセッション形式を変換します。

  • GEO Series: GSE → SRA Study (SRP)
  • SRA Study: SRP/PRJNA → SRA Experiments (SRX*)
  • SRA Experiment: SRX/ERX → SRA Runs (SRR/ERR)

2. メタデータ抽出

SRA/GEO から包括的なメタデータをクエリします。

  • シーケンシングプラットフォーム (Illumina, PacBio, Oxford Nanopore)
  • ライブラリー調製技術 (10X Genomics, Smart-seq, など)
  • 生物、組織、細胞の種類
  • 研究デザインと実験の詳細
  • シングルセル vs バルク RNA-seq の識別

3. BigQuery 分析

NCBI の BigQuery データセットを活用して、大規模なクエリを実行します。

  • バッチアクセッション変換
  • 研究全体の技術識別
  • プラットフォーム、アッセイタイプ、生物によるフィルタリング
  • 研究/実験/実行の関係マッピング

4. 論文検索

論文を自動的に検索してダウンロードします。

  • SRA アクセッションを PubMed 論文にリンク
  • PubMed レコードから DOI を抽出
  • 複数のソースからフルテキスト PDF をダウンロード:
    • プレプリントサーバー (arXiv, bioRxiv, medRxiv)
    • CORE API
    • Europe PMC
    • Unpaywall
  • CSV 入力によるバッチ処理

この Skill を使用する状況

ユーザーが以下の場合に SRAgent を使用します。

  • SRA、GEO、またはゲノミクスアクセッション (GSE, SRP, SRX, SRR) について言及している
  • アクセッション形式を変換する必要がある
  • シーケンシング実験に関するメタデータを必要とする
  • データセットに関連付けられた論文を検索またはダウンロードする必要がある
  • Sequence Read Archive (SRA)、European Nucleotide Archive (ENA)、または Gene Expression Omnibus (GEO) を参照している

利用可能なコマンド

コマンド 1: SRAgent entrez

目的: 低レベルの NCBI Entrez データベースクエリ

最適な用途:

  • 簡単なアクセッション変換
  • データセットの簡単な要約
  • データベース間のリンク
  • 使用する Entrez ツール (esearch, efetch, elink) が正確にわかっている場合

例:

# GEO を SRX に変換
SRAgent --no-progress --no-summaries entrez "Convert GSE121737 to SRX accessions"

# データセットを要約
SRAgent --no-progress --no-summaries entrez "Summarize SRX4967527"

# 論文にリンク
SRAgent --no-progress --no-summaries entrez "Find publications for GSE196830"

コマンド 2: SRAgent sragent

目的: 複数のツールを使用した包括的なメタデータ抽出

最適な用途:

  • 複雑なメタデータクエリ
  • 技術識別
  • 簡単な Entrez クエリでは不十分な場合
  • データがシングルセルかどうかを判断する場合

利用可能なツール:

  • Entrez エージェント (すべてのデータベース)
  • BigQuery (大規模クエリ)
  • NCBI ウェブスクレイピング
  • sra-stat (直接シーケンスファイル分析)

例:

# シーケンシング技術を確認
SRAgent --no-progress --no-summaries sragent "Which 10X Genomics technology was used for ERX11887200?"

# 包括的な要約
SRAgent --no-progress --no-summaries sragent "Summarize SRX4967527"

# データ型を検証
SRAgent --no-progress --no-summaries sragent "Is SRX4967527 single-cell RNA-seq data?"

# 生物情報を取得
SRAgent --no-progress --no-summaries sragent "What organism was sequenced in study PRJNA498286?"

コマンド 3: SRAgent papers

目的: SRA アクセッションに関連付けられた論文を検索してダウンロードする

最適な用途:

  • データセットの論文をダウンロードする
  • 論文のバッチ検索
  • CSV ファイルを DOI とダウンロードパスで充実させる

入力形式:

  • 単一のアクセッション: SRX4967527
  • 研究アクセッション: SRP167700 または PRJNA498286
  • accession 列を含む CSV ファイル

例:


# 単一の実験
SRAgent --no-progress --no-summaries papers SRX4967527

# 研究全体
SRAgent --no-progress --no-summaries papers PRJNA498286

# CSV からのバッチ処理
SRAgent --no-progress --no-summaries papers accessions.csv

(原文はここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

SRAgent: Sequence Read Archive Data and Publication Retrieval

Overview

SRAgent is an agentic workflow system for working with the NCBI Sequence Read Archive (SRA) and Gene Expression Omnibus (GEO) databases. It automates literature discovery, metadata extraction, and manuscript retrieval for genomics datasets.

Setup Instructions

1. Install SRAgent

SRAgent requires Python ≥3.11. Check to see if SRAgent is already installed:

which SRAgent

If SRAgent is not installed, follow the instructions below.

Install using uv:

# Clone the repository
git clone https://github.com/ArcInstitute/SRAgent.git
cd SRAgent

# Create and activate virtual environment with uv
uv venv
source .venv/bin/activate

# Install the package
uv pip install .

Verify installation:

SRAgent --help

2. Configure environment variables

The following environment variables are required:

  • OPENAI_API_KEY=sk-openai-...
    • Needed to use OpenAI models
  • ANTHROPIC_API_KEY=sk-ant-...
    • Needed to use Claude models
  • DYNACONF
    • Needed to switch between Claude and OpenAI models
  • EMAIL=user@example.com
    • Needed for using the Entrez API
  • NCBI_API_KEY=your-ncbi-key
    • Optional for increased rate limits when using the Entrez API
  • CORE_API_KEY=your-core-key
    • Optional for paper downloads from the CORE API
  • GCP_PROJECT_ID=your-project-id
    • Needed for using Google BigQuery
  • GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json
    • Needed for using Google BigQuery

Prompt the user to provide the environment variables if they are not already set as environment variables: export MY_SECRET_VAR=my-secret-value.

3. Configure Settings

SRAgent uses a settings file (settings.yml) to configure models and behavior. The default configuration works for most users, but you can customize it.

Option A: Use Default Settings

No action needed - SRAgent ships with sensible defaults.

Option B: Custom Settings File

See ./references/example-settings.yml for an example settings file that you can modify as needed.

4. Verify Setup

Test your configuration:

# Check which model is being used
python -c "from SRAgent.agents.utils import load_settings; s = load_settings(); print(s['models']['default'])"

# Test basic functionality
SRAgent entrez "Convert GSE121737 to SRX accessions"

Core Capabilities

1. Accession Conversion

Convert between different genomics database accession formats:

  • GEO Series: GSE → SRA Study (SRP)
  • SRA Study: SRP/PRJNA → SRA Experiments (SRX*)
  • SRA Experiment: SRX/ERX → SRA Runs (SRR/ERR)

2. Metadata Extraction

Query comprehensive metadata from SRA/GEO:

  • Sequencing platform (Illumina, PacBio, Oxford Nanopore)
  • Library preparation technology (10X Genomics, Smart-seq, etc.)
  • Organism, tissue, cell type
  • Study design and experimental details
  • Single-cell vs bulk RNA-seq identification

3. BigQuery Analysis

Leverage NCBI's BigQuery dataset for large-scale queries:

  • Batch accession conversions
  • Technology identification across studies
  • Filtering by platform, assay type, organism
  • Study/experiment/run relationship mapping

4. Publication Retrieval

Automatically find and download manuscripts:

  • Link SRA accessions to PubMed publications
  • Extract DOIs from PubMed records
  • Download full-text PDFs from multiple sources:
    • Preprint servers (arXiv, bioRxiv, medRxiv)
    • CORE API
    • Europe PMC
    • Unpaywall
  • Batch processing with CSV input

When to Use This Skill

Use SRAgent when the user:

  • Mentions SRA, GEO, or genomics accessions (GSE, SRP, SRX, SRR)
  • Needs to convert between accession formats
  • Wants metadata about sequencing experiments
  • Needs to find or download papers associated with datasets
  • References the Sequence Read Archive (SRA), European Nucleotide Archive (ENA), or Gene Expression Omnibus (GEO)

Available Commands

Command 1: SRAgent entrez

Purpose: Low-level NCBI Entrez database queries

Best for:

  • Simple accession conversions
  • Quick dataset summaries
  • Cross-database linking
  • When you know exactly what Entrez tool to use (esearch, efetch, elink)

Examples:

# Convert GEO to SRX
SRAgent --no-progress --no-summaries entrez "Convert GSE121737 to SRX accessions"

# Summarize a dataset
SRAgent --no-progress --no-summaries entrez "Summarize SRX4967527"

# Link to publications
SRAgent --no-progress --no-summaries entrez "Find publications for GSE196830"

Command 2: SRAgent sragent

Purpose: Comprehensive metadata extraction with multiple tools

Best for:

  • Complex metadata queries
  • Technology identification
  • When simple Entrez queries aren't enough
  • Determining if data is single-cell

Tools available:

  • Entrez agent (all databases)
  • BigQuery (large-scale queries)
  • NCBI web scraping
  • sra-stat (direct sequence file analysis)

Examples:

# Check sequencing technology
SRAgent --no-progress --no-summaries sragent "Which 10X Genomics technology was used for ERX11887200?"

# Comprehensive summary
SRAgent --no-progress --no-summaries sragent "Summarize SRX4967527"

# Verify data type
SRAgent --no-progress --no-summaries sragent "Is SRX4967527 single-cell RNA-seq data?"

# Get organism info
SRAgent --no-progress --no-summaries sragent "What organism was sequenced in study PRJNA498286?"

Command 3: SRAgent papers

Purpose: Find and download manuscripts associated with SRA accessions

Best for:

  • Downloading papers for datasets
  • Batch retrieval of publications
  • Enriching CSV files with DOIs and download paths

Input formats:

  • Single accession: SRX4967527
  • Study accession: SRP167700 or PRJNA498286
  • CSV file with accession column

Examples:

# Single experiment
SRAgent --no-progress --no-summaries papers SRX4967527

# Entire study
SRAgent --no-progress --no-summaries papers PRJNA498286

# Batch from CSV
SRAgent --no-progress --no-summaries papers accessions.csv --output-dir papers/

# Custom accession column name
SRAgent --no-progress --no-summaries papers my-data.csv --accession-column "experiment_id"

# Control concurrency
SRAgent --no-progress --no-summaries papers accessions.csv --max-concurrency 3

Output:

  • PDFs saved to --output-dir/<accession>/
  • Console summary showing:
    • PubMed IDs found
    • DOIs extracted
    • Download success/failure status
  • Updated CSV (when input is CSV) with columns:
    • pubmed_id
    • doi
    • download_path

Usage Patterns

Pattern 1: Dataset Investigation Workflow

# Step 1: Convert GEO accession to SRX
SRAgent --no-progress --no-summaries entrez "Convert GSE121737 to SRX accessions"

# Step 2: Get detailed metadata
SRAgent --no-progress --no-summaries sragent "For each SRX from GSE121737, determine: Is it single-cell? What library prep?"

# Step 3: Find associated publications
SRAgent --no-progress --no-summaries papers GSE121737 --output-dir manuscripts/

Pattern 2: Technology Verification

# Check if dataset meets specific criteria
SRAgent --no-progress --no-summaries sragent "Is SRX4967527 Illumina paired-end single-cell RNA-seq data?"

# Get specific technology details
SRAgent --no-progress --no-summaries sragent "Which 10X Genomics chemistry was used: SRX4967527?"

# Verify organism
SRAgent --no-progress --no-summaries sragent "What organism is SRX4967527?"

Pattern 3: Batch Processing

# Create CSV with accessions
cat > accessions.csv << EOF
accession
SRX4967527
SRX4967528
SRX4967529
EOF

# Download all papers
SRAgent --no-progress --no-summaries \
  papers accessions.csv \
    --output-dir papers/ \
    --max-concurrency 5

# Result: CSV enriched with DOIs and download paths

Pattern 4: Study-Level Analysis

# Get all experiments in a study
SRAgent --no-progress --no-summaries entrez "List all SRX accessions for study SRP167700"

# Or use a BioProject accession
SRAgent --no-progress --no-summaries entrez "Convert PRJNA498286 to SRX accessions"

# Then analyze the study
SRAgent --no-progress --no-summaries sragent "Summarize the library prep technologies used in PRJNA498286"

Implementation Guide for Claude

Running SRAgent Commands

When the user needs SRAgent functionality, use the bash tool:

# Example: Convert accessions
result = bash_tool(
    command="SRAgent --no-progress --no-summaries entrez 'Convert GSE121737 to SRX accessions'",
    description="Converting GEO accession to SRX format"
)

# Example: Get metadata
result = bash_tool(
    command="SRAgent --no-progress --no-summaries sragent 'Which 10X technology was used for SRX4967527?'",
    description="Determining library preparation technology"
)

# Example: Download papers
result = bash_tool(
    command="SRAgent --no-progress --no-summaries papers SRX4967527 --output-dir /home/claude/papers",
    description="Downloading manuscripts for dataset"
)

Working with CSV Files

When processing batch data:

import pandas as pd

# User provides accessions - create CSV
accessions = ["SRX4967527", "SRX4967528", "SRX4967529"]
df = pd.DataFrame({"accession": accessions})
df.to_csv("/home/claude/accessions.csv", index=False)

# Run SRAgent papers command
result = bash_tool(
    command="SRAgent --no-progress --no-summaries papers /home/claude/accessions.csv --output-dir /home/claude/papers",
    description="Batch downloading papers for multiple accessions"
)

# Read enriched CSV
enriched_df = pd.read_csv("/home/claude/accessions.csv")
# Now has: accession, pubmed_id, doi, download_path columns

Accession Format Reference

GEO (Gene Expression Omnibus)

  • Series: GSE + 5-7 digits (e.g., GSE121737)
  • Sample: GSM + 6-7 digits (e.g., GSM3457845)

SRA (Sequence Read Archive)

  • Study: SRP + 6 digits (e.g., SRP167700)
    • Or BioProject: PRJNA + 6 digits (e.g., PRJNA498286)
  • Experiment: SRX + 7-8 digits (e.g., SRX4967527)
  • Run: SRR + 7-8 digits (e.g., SRR8124405)

ENA (European Nucleotide Archive)

  • Study: ERP + 6 digits or PRJEB + 6 digits
  • Experiment: ERX + 7-8 digits (e.g., ERX11887200)
  • Run: ERR + 7-8 digits

Hierarchical Relationships

GEO Series (GSE)
    ↓
SRA Study (SRP) = BioProject (PRJNA)
    ↓
SRA Experiment (SRX) ← Links to → Publications (PubMed ID, DOI)
    ↓
SRA Run (SRR) [actual sequence files]

Common Single-Cell Technologies

SRAgent can identify these scRNA-seq technologies:

10X Genomics

  • Chromium Single Cell 3' (v1, v2, v3)
  • Chromium Single Cell 5'
  • Chromium Single Cell ATAC
  • Chromium Single Cell Multiome
  • Visium Spatial

Other Platforms

  • Smart-seq2 / Smart-seq3
  • Drop-seq
  • inDrop
  • Seq-Well
  • CEL-Seq2
  • MARS-seq
  • Quartz-Seq

Detection Strategy

SRAgent uses multiple signals:

  1. Library prep metadata fields
  2. Study descriptions and titles
  3. PubMed abstracts
  4. Sequence file characteristics (when using sra-stat)

Working Without BigQuery

If you don't have Google Cloud credentials:

# SRAgent gracefully falls back to Entrez-only queries
# BigQuery features will be skipped with a warning

# These still work without BigQuery:
SRAgent --no-progress --no-summaries entrez "Convert GSE121737 to SRX accessions"
SRAgent --no-progress --no-summaries papers SRX4967527

# This will warn but proceed:
SRAgent --no-progress --no-summaries sragent "Which 10X technology for SRX4967527?"
# (Uses Entrez + web scraping instead of BigQuery)

Performance Optimization

# For large batch operations, adjust concurrency
SRAgent --no-progress --no-summaries papers large-dataset.csv \
  --max-concurrency 10 \
  --recursion-limit 150

# For paper downloads specifically
SRAgent --no-progress --no-summaries papers accessions.csv \
  --core-api-key "$CORE_API_KEY" \
  --email "$EMAIL" \
  --max-concurrency 5

Troubleshooting

"ModuleNotFoundError: No module named 'SRAgent'"

# Ensure package is installed
cd SRAgent
uv pip install .

# Verify installation
python -c "import SRAgent; print(SRAgent.__file__)"

"Rate limit exceeded" (NCBI)

# Get NCBI API key: https://www.ncbi.nlm.nih.gov/account/settings/
export NCBI_API_KEY="your-ncbi-api-key"

# Reduces concurrent requests
SRAgent papers accessions.csv --max-concurrency 3

Paper downloads fail

  • Check: Is DOI found?

    • Some datasets may not have linked publications
    • Check PubMed link manually first
  • Check: Multiple sources attempted?

    • SRAgent tries: preprints → CORE → Europe PMC → Unpaywall
    • Some papers are paywalled (no open access)
  • Check: Network/authentication

    • CORE requires API key: export CORE_API_KEY="..."
    • Some sources may be blocked by institution firewall
    • Cloudflare may block automated access to some preprint servers

Resources

SRAgent Documentation

  • ./references/metadata-fields.md
    • All metadata fields that SRAgent can extract from SRA/GEO databases
  • ./references/quick-reference.md
  • Quick reference for SRAgent commands
  • ./references/usage-examples.md
  • Usage examples for SRAgent
  • ./references/example-settings.yml
    • Example settings file for SRAgent

External Resources

同梱ファイル

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