mcpField
I
interpro-database

interpro-database

github.com/leonchaoxデータ・データベース99470 回インストール15 週間前に更新
リポジトリ

interpro-database について

interpro-database は、InterPro REST API を使ってタンパク質の分類や注釈を調べるスキルです。バイオインフォマティクスの解析向けに、タンパク質の特性評価、エントリー検索、ドメイン構成の確認、GO 用語の取得を支援します。

主な機能

  1. 01タンパク質注釈の検索
  2. 02InterPro エントリー詳細の取得
  3. 03エントリーからタンパク質を検索
  4. 04ドメイン構成の確認
  5. 05タンパク質への GO 用語対応付け
  6. 06タンパク質の一括検索

活用シーン

  1. 01未注釈タンパク質の特性評価
  2. 02タンパク質ファミリーの構成員検索
  3. 03タンパク質ドメイン構成の比較
  4. 04複数タンパク質配列の注釈

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/leonchaox/qinyan-academic-skills --skill interpro-database

インストール後、Claude Code で/interpro-databaseを入力して読み込まれたか確認します。

同梱ファイルreferences/domain_analysis.md

詳細

InterPro データベース

概要

InterPro(https://www.ebi.ac.uk/interpro/)は、EMBL-EBI が維持するタンパク質ファミリーおよびドメイン分類のための包括的なリソースです。Pfam、PANTHER、PRINTS、ProSite、SMART、TIGRFAM、SUPERFAMILY、CDD など、13 のメンバーデータベースのシグネチャーを統合し、1 億を超えるタンパク質配列の機能アノテーションを統一された形で提供します。

InterPro では、タンパク質を以下のように分類します。

  • ファミリー:共通の祖先と機能を持つタンパク質のグループ
  • ドメイン:独立してフォールディングする構造的/機能的単位
  • 相同スーパーファミリー:構造的に類似したタンパク質領域
  • リピート:短いタンデム配列
  • サイト:機能部位(活性部位、結合部位、PTM)

主なリソース:

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

以下の場合に InterPro を使用します。

  • タンパク質機能の予測:機能が不明なタンパク質には、どのような機能があると考えられますか?
  • ドメイン構成:タンパク質はどのようなドメインで構成され、どのような順序で並んでいますか?
  • タンパク質ファミリーの分類:タンパク質はどのファミリー/スーパーファミリーに属していますか?
  • GO 用語のアノテーション:InterPro を介してタンパク質配列を Gene Ontology 用語に対応付けます
  • 進化解析:2 つのタンパク質は同じ相同スーパーファミリーに属していますか?
  • 構造予測のコンテキスト:新しいタンパク質構造を、どのドメインと比較すべきですか?
  • パイプラインでのアノテーション:プロテオームや新規配列を一括でアノテーションします

主な機能

1. InterPro REST API

ベース URL:https://www.ebi.ac.uk/interpro/api/

import requests

BASE_URL = "https://www.ebi.ac.uk/interpro/api"

def interpro_get(endpoint, params=None):
    url = f"{BASE_URL}/{endpoint}"
    headers = {"Accept": "application/json"}
    response = requests.get(url, params=params, headers=headers)
    response.raise_for_status()
    return response.json()
2. タンパク質を検索する
def get_protein_entries(uniprot_id):
    """Get all InterPro entries that match a UniProt protein."""
    data = interpro_get(f"protein/UniProt/{uniprot_id}/entry/InterPro/")
    return data

# Example: Human p53 (TP53)
result = get_protein_entries("P04637")
entries = result.get("results", [])

for entry in entries:
    meta = entry["metadata"]
    print(f"  {meta['accession']} ({meta['type']}): {meta['name']}")
    # e.g., IPR011615 (domain): p53, tetramerisation domain
    #       IPR010991 (domain): p53, DNA-binding domain
    #       IPR013872 (family): p53 family
3. 特定の InterPro エントリーを取得する
def get_entry(interpro_id):
    """Fetch details for an InterPro entry."""
    return interpro_get(f"entry/InterPro/{interpro_id}/")

# Example: Get Pfam domain PF00397 (WW domain)
ww_entry = get_entry("IPR001202")
print(f"Name: {ww_entry['metadata']['name']}")
print(f"Type: {ww_entry['metadata']['type']}")

# Also supports member database IDs:
def get_pfam_entry(pfam_id):
    return interpro_get(f"entry/Pfam/{pfam_id}/")

pfam = get_pfam_entry("PF00397")
4. InterPro エントリーでタンパク質を検索する
def get_proteins_for_entry(interpro_id, database="UniProt", page_size=25):
    """Get all proteins annotated with an InterPro entry."""
    params = {"page_size": page_size}
    data = interpro_get(f"entry/InterPro/{interpro_id}/protein/{database}/", params)
    return data

# Example: Find all human kinase-domain proteins
kinase_proteins = get_proteins_for_entry("IPR000719")  # Protein kinase domain
print(f"Total proteins: {kinase_proteins['count']}")
5. ドメイン構成
def get_domain_architecture(uniprot_id):
    """Get the complete domain architecture of a protein."""
    data = interpro_get(f"protein/UniProt/{uniprot_id}/")
    return data

# Example: Get full domain architecture for EGFR
egfr = get_domain_architecture("P00533")

# The response includes locations of all matching entries on the sequence
for entry in egfr.get("entries", []):
    for fragment in entry.get("entry_protein_locations", []):
        for loc in fragment.get("fragments", []):
            print(f"  {entry['accession']}: {loc['start']}-{loc['end']}")
6. GO 用語のマッピング
def get_go_terms_for_protein(uniprot_id):
    """Get GO terms associated with a protein via InterPro."""
    data = interpro_get(f"protein/UniProt/{uniprot_id}/")

    # GO terms are embedded in the entry metadata
    go_terms = []
    for entry in data.get("entries", []):
        go = entry.get("metadata", {}).get("go_terms", [])
        go_terms.extend(go)

    # Deduplicate
    seen = set()
    unique_go = []
    for term in go_terms:
        if term["identifier"] not in seen:
            seen.add(term["identifier"])
            unique_go.append(term)

    return unique_go

# GO terms include:
# {"identifier": "GO:0004672", "name": "protein kinase activity", "category": {"code": "F", "name": "Molecular Function"}}
7. タンパク質の一括検索
def batch_lookup_proteins(uniprot_ids, database="UniProt"):
    """Look up multiple proteins and collect their InterPro entries."""
    import time
    results = {}
    for uid in uniprot_ids:
        try:
            data = interpro_get(f"protein/{database}/{uid}/entry/InterPro/")
            entries = data.get("results", [])
            results[uid] = [
                {
                    "accession": e["metadata"]["accession"],
                    "name": e["metadata"]["name"],
                    "type": e["metadata"]["type"]
                }
                for e in entries
            ]
        except Exception as e:
            results[uid] = {"error": str(e)}
        time.sleep(0.3)  # Rate limiting
    return results

# Example
proteins = ["P04637", "P00533", "P38398", "Q9Y6I9"]
domain_info = batch_lookup_proteins(proteins)
for uid, entries in domain_info.items():
    print(f"\n{uid}:")
    for e in entries[:3]:
        print(f"  - {e['accession']} ({e['type']}): {e['name']}")
8. テキストまたは分類群で検索する
def search_entries(query, entry_type=None, taxonomy_id=None):
    """Search InterPro entries by text."""
    params = {"search": query, "page_size": 20}
    if entry_type:
        params["type"] = entry_type  # family, domain, homologous_superfamily, etc.

    endpoint = "entry/InterPro/"
    if taxonomy_id:
        endpoint = f"entry/InterPro/taxonomy/UniProt/{taxonomy_id}/"

    return interpro_get(endpoint, params)

# Search for kinase-related entries
kinase_entries = search_entries("kinase", entry_type="domain")

クエリのワークフロー

ワークフロー 1:未知のタンパク質の特性を調べる
  1. タンパク質配列をスキャンするため、ローカルまたはウェブ(https://www.ebi.ac.uk/interpro/search/sequence/)で InterProScan を実行します
  2. 結果を解析してドメイン構成を特定します
  3. 生物学的な背景を調べるため、各 InterPro エントリーを検索します
  4. 機能を推定するため、関連する InterPro エントリーから GO 用語を取得します
# After running InterProScan and getting a UniProt ID:
def characterize_protein(uniprot_id):
    """Complete characterization workflow."""

    # 1. Get all annotations
    entries = get_protein_entries(uniprot_id)

    # 2. Group by type
    by_type = {}
    for e in entries.get("results", []):
        t = e["metadata"]["type"]
        by_type.setdefault(t, []).append({
            "accession": e["metadata"]["accession"],
            "name": e["metadata"]["name"]
        })

    # 3. Get GO terms
    go_terms = get_go_terms_for_protein(uniprot_id)

    return {
        "families": by_type.get("family", []),
        "domains": by_type.get("domain", []),
        "superfamilies": by_type.get("homologous_superfamily", []),
        "go_terms": go_terms
    }
ワークフロー 2:タンパク質ファミリーの全メンバーを見つける
  1. InterPro ファミリーのエントリー ID(例:プロテインキナーゼの IPR000719)を特定します
  2. そのエントリーでアノテーションされた UniProt タンパク質をすべてクエリします
  3. 必要に応じて、生物種/分類群で絞り込みます
  4. 系統解析用に FASTA 配列をダウンロードします
ワークフロー 3:ドメインの比較解析
  1. 対象のタンパク質(例:すべてのパラログ)を収集します
  2. 各タンパク質のドメイン構成を取得します
  3. ドメインの構成と順序を比較します
  4. ドメインの獲得/喪失イベントを特定します

API エンドポイントの概要

エンドポイント説明
/protein/UniProt/{id}/タンパク質の完全なアノテーション
/protein/UniProt/{id}/entry/InterPro/タンパク質の InterPro エントリー
/entry/InterPro/{id}/InterPro エントリーの詳細
/entry/Pfam/{id}/Pfam エントリーの詳細
/entry/InterPro/{id}/protein/UniProt/該当エントリーを持つタンパク質
/entry/InterPro/InterPro エントリーの検索/一覧
/taxonomy/UniProt/{tax_id}/該当分類群のタンパク質
/structure/PDB/{pdb_id}/InterPro にマッピングされた構造

メンバーデータベース

データベース主な対象
Pfamタンパク質ドメイン(HMMプロファイル)
PANTHERタンパク質ファミリーとサブファミリー
PRINTSタンパク質フィンガープリント
ProSitePatternsアミノ酸パターン
ProSiteProfilesタンパク質プロファイルパターン
SMARTタンパク質ドメイン解析
TIGRFAMJCVIがキュレーションしたタンパク質ファミリー
SUPERFAMILY構造分類
CDD保存ドメインデータベース(NCBI)
HAMAP微生物タンパク質ファミリー
NCBIfamNCBIがキュレーションしたTIGRFAM
Gene3DCATH構造分類
PIRSRPIRサイトルール

ベストプラクティス

  • UniProtアクセッション番号を使用してください(遺伝子名ではありません)。最も信頼性の高い検索ができます。
  • タイプを区別してください:familyは広範な分類を、domainは特定の構造的/機能的単位を示します。
  • 新規配列にはInterProScanの方が高速です:UniProtに登録されていない配列は、ウェブサービスに送信してください。
  • ページネーションに対応してください:大量の結果を取得する場合は、複数のページを順に処理する必要があります。
  • UniProtのデータと組み合わせてください:InterProエントリーには、UniProt、PDB、GOへのリンクが含まれていることがよくあります。

追加リソース

コメント