cosmic-database
Access COSMIC cancer mutation database. Query somatic mutations, Cancer Gene Census, mutational signatures, gene fusions, for cancer research and precision oncology. Requires authentication.
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o cosmic-database.zip https://jpskill.com/download/18375.zip && unzip -o cosmic-database.zip && rm cosmic-database.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/18375.zip -OutFile "$d\cosmic-database.zip"; Expand-Archive "$d\cosmic-database.zip" -DestinationPath $d -Force; ri "$d\cosmic-database.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
cosmic-database.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
cosmic-databaseフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 3
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
COSMICデータベース
概要
COSMIC (Catalogue of Somatic Mutations in Cancer) は、ヒト癌における体細胞変異を探索するための、世界最大かつ最も包括的なデータベースです。COSMICの広範な癌ゲノミクスデータコレクション(数千種類の癌にわたる数百万件の変異、厳選された遺伝子リスト、変異シグネチャ、臨床アノテーションなど)に、プログラムでアクセスできます。
このSkillを使用する場面
このSkillは、以下の場合に使用してください。
- COSMICから癌変異データをダウンロードする場合
- 厳選された癌遺伝子リストについて、Cancer Gene Censusにアクセスする場合
- 変異シグネチャプロファイルを取得する場合
- 構造的変異、コピー数変化、または遺伝子融合をクエリする場合
- 薬剤耐性変異を分析する場合
- 癌細胞株ゲノミクスデータを扱う場合
- 癌変異データをバイオインフォマティクスパイプラインに統合する場合
- 癌の文脈における特定の遺伝子または変異を研究する場合
前提条件
アカウント登録
COSMICでは、データダウンロードに認証が必要です。
- アカデミックユーザー: https://cancer.sanger.ac.uk/cosmic/register で登録すると無料でアクセスできます。
- 商用ユーザー: ライセンスが必要です (QIAGENにお問い合わせください)。
Pythonの要件
uv pip install requests pandas
クイックスタート
1. 基本的なファイルダウンロード
scripts/download_cosmic.py スクリプトを使用して、COSMICデータファイルをダウンロードします。
from scripts.download_cosmic import download_cosmic_file
# 変異データをダウンロード
download_cosmic_file(
email="your_email@institution.edu",
password="your_password",
filepath="GRCh38/cosmic/latest/CosmicMutantExport.tsv.gz",
output_filename="cosmic_mutations.tsv.gz"
)
2. コマンドラインでの使用
# 短縮形のデータ型を使用してダウンロード
python scripts/download_cosmic.py user@email.com --data-type mutations
# 特定のファイルをダウンロード
python scripts/download_cosmic.py user@email.com \
--filepath GRCh38/cosmic/latest/cancer_gene_census.csv
# 特定のゲノムアセンブリ用にダウンロード
python scripts/download_cosmic.py user@email.com \
--data-type gene_census --assembly GRCh37 -o cancer_genes.csv
3. ダウンロードしたデータの操作
import pandas as pd
# 変異データを読み込む
mutations = pd.read_csv('cosmic_mutations.tsv.gz', sep='\t', compression='gzip')
# Cancer Gene Censusを読み込む
gene_census = pd.read_csv('cancer_gene_census.csv')
# VCF形式を読み込む
import pysam
vcf = pysam.VariantFile('CosmicCodingMuts.vcf.gz')
利用可能なデータ型
コア変異
点変異、挿入欠失、ゲノムアノテーションを含む包括的な変異データをダウンロードします。
一般的なデータ型:
mutations- 完全なコーディング変異 (TSV形式)mutations_vcf- VCF形式のコーディング変異sample_info- サンプルメタデータと腫瘍情報
# すべてのコーディング変異をダウンロード
download_cosmic_file(
email="user@email.com",
password="password",
filepath="GRCh38/cosmic/latest/CosmicMutantExport.tsv.gz"
)
Cancer Gene Census
癌への関与について十分な証拠がある、専門家が厳選した700以上の癌遺伝子のリストにアクセスします。
# Cancer Gene Censusをダウンロード
download_cosmic_file(
email="user@email.com",
password="password",
filepath="GRCh38/cosmic/latest/cancer_gene_census.csv"
)
ユースケース:
- 既知の癌遺伝子を特定する
- 癌との関連性でバリアントをフィルタリングする
- 遺伝子の役割 (癌遺伝子 vs 腫瘍抑制遺伝子) を理解する
- 研究のための標的遺伝子を選択する
変異シグネチャ
変異シグネチャ分析用のシグネチャプロファイルをダウンロードします。
# シグネチャ定義をダウンロード
download_cosmic_file(
email="user@email.com",
password="password",
filepath="signatures/signatures.tsv"
)
シグネチャの種類:
- Single Base Substitution (SBS) シグネチャ
- Doublet Base Substitution (DBS) シグネチャ
- Insertion/Deletion (ID) シグネチャ
構造的変異と融合
遺伝子融合データと構造的再編成にアクセスします。
利用可能なデータ型:
structural_variants- 構造的ブレークポイントfusion_genes- 遺伝子融合イベント
# 遺伝子融合をダウンロード
download_cosmic_file(
email="user@email.com",
password="password",
filepath="GRCh38/cosmic/latest/CosmicFusionExport.tsv.gz"
)
コピー数と発現
コピー数変化と遺伝子発現データを取得します。
利用可能なデータ型:
copy_number- コピー数の増加/減少gene_expression- 過剰/過少発現データ
# コピー数データをダウンロード
download_cosmic_file(
email="user@email.com",
password="password",
filepath="GRCh38/cosmic/latest/CosmicCompleteCNA.tsv.gz"
)
薬剤耐性変異
臨床アノテーション付きの薬剤耐性変異データにアクセスします。
# 耐性変異をダウンロード
download_cosmic_file(
email="user@email.com",
password="password",
filepath="GRCh38/cosmic/latest/CosmicResistanceMutations.tsv.gz"
)
COSMICデータの操作
ゲノムアセンブリ
COSMICは、2つの参照ゲノムのデータを提供します。
- GRCh38 (推奨、現在の標準)
- GRCh37 (レガシー、古いパイプライン用)
ファイルパスでアセンブリを指定します。
# GRCh38 (推奨)
filepath="GRCh38/cosmic/latest/CosmicMutantExport.tsv.gz"
# GRCh37 (レガシー)
filepath="GRCh37/cosmic/latest/CosmicMutantExport.tsv.gz"
バージョニング
- ファイルパスで
latestを使用すると、常に最新のリリースを取得できます。 - COSMICは四半期ごとに更新されます (現在のバージョン: v102, 2025年5月)。
- 再現性のために、特定のバージョン (
v102、v101など) を使用できます。
ファイル形式
- TSV/CSV: タブ/カンマ区切り、gzip圧縮、pandasで読み取り
- VCF: 標準バリアント形式、pysam、bcftools、またはGATKで使用
- すべてのファイルには、列の内容を説明するヘッダーが含まれています
一般的な分析パターン
遺伝子で変異をフィルタリングする:
import pandas as pd
mutations = pd.read_csv('cosmic_mutations.tsv.gz', sep='\t', compression='gzip')
tp53_mutations = mutations[mutations['Gene name'] == 'TP53']
役割によって癌遺伝子を特定する:
(原文がここで切り詰められています) 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
COSMIC Database
Overview
COSMIC (Catalogue of Somatic Mutations in Cancer) is the world's largest and most comprehensive database for exploring somatic mutations in human cancer. Access COSMIC's extensive collection of cancer genomics data, including millions of mutations across thousands of cancer types, curated gene lists, mutational signatures, and clinical annotations programmatically.
When to Use This Skill
This skill should be used when:
- Downloading cancer mutation data from COSMIC
- Accessing the Cancer Gene Census for curated cancer gene lists
- Retrieving mutational signature profiles
- Querying structural variants, copy number alterations, or gene fusions
- Analyzing drug resistance mutations
- Working with cancer cell line genomics data
- Integrating cancer mutation data into bioinformatics pipelines
- Researching specific genes or mutations in cancer contexts
Prerequisites
Account Registration
COSMIC requires authentication for data downloads:
- Academic users: Free access with registration at https://cancer.sanger.ac.uk/cosmic/register
- Commercial users: License required (contact QIAGEN)
Python Requirements
uv pip install requests pandas
Quick Start
1. Basic File Download
Use the scripts/download_cosmic.py script to download COSMIC data files:
from scripts.download_cosmic import download_cosmic_file
# Download mutation data
download_cosmic_file(
email="your_email@institution.edu",
password="your_password",
filepath="GRCh38/cosmic/latest/CosmicMutantExport.tsv.gz",
output_filename="cosmic_mutations.tsv.gz"
)
2. Command-Line Usage
# Download using shorthand data type
python scripts/download_cosmic.py user@email.com --data-type mutations
# Download specific file
python scripts/download_cosmic.py user@email.com \
--filepath GRCh38/cosmic/latest/cancer_gene_census.csv
# Download for specific genome assembly
python scripts/download_cosmic.py user@email.com \
--data-type gene_census --assembly GRCh37 -o cancer_genes.csv
3. Working with Downloaded Data
import pandas as pd
# Read mutation data
mutations = pd.read_csv('cosmic_mutations.tsv.gz', sep='\t', compression='gzip')
# Read Cancer Gene Census
gene_census = pd.read_csv('cancer_gene_census.csv')
# Read VCF format
import pysam
vcf = pysam.VariantFile('CosmicCodingMuts.vcf.gz')
Available Data Types
Core Mutations
Download comprehensive mutation data including point mutations, indels, and genomic annotations.
Common data types:
mutations- Complete coding mutations (TSV format)mutations_vcf- Coding mutations in VCF formatsample_info- Sample metadata and tumor information
# Download all coding mutations
download_cosmic_file(
email="user@email.com",
password="password",
filepath="GRCh38/cosmic/latest/CosmicMutantExport.tsv.gz"
)
Cancer Gene Census
Access the expert-curated list of ~700+ cancer genes with substantial evidence of cancer involvement.
# Download Cancer Gene Census
download_cosmic_file(
email="user@email.com",
password="password",
filepath="GRCh38/cosmic/latest/cancer_gene_census.csv"
)
Use cases:
- Identifying known cancer genes
- Filtering variants by cancer relevance
- Understanding gene roles (oncogene vs tumor suppressor)
- Target gene selection for research
Mutational Signatures
Download signature profiles for mutational signature analysis.
# Download signature definitions
download_cosmic_file(
email="user@email.com",
password="password",
filepath="signatures/signatures.tsv"
)
Signature types:
- Single Base Substitution (SBS) signatures
- Doublet Base Substitution (DBS) signatures
- Insertion/Deletion (ID) signatures
Structural Variants and Fusions
Access gene fusion data and structural rearrangements.
Available data types:
structural_variants- Structural breakpointsfusion_genes- Gene fusion events
# Download gene fusions
download_cosmic_file(
email="user@email.com",
password="password",
filepath="GRCh38/cosmic/latest/CosmicFusionExport.tsv.gz"
)
Copy Number and Expression
Retrieve copy number alterations and gene expression data.
Available data types:
copy_number- Copy number gains/lossesgene_expression- Over/under-expression data
# Download copy number data
download_cosmic_file(
email="user@email.com",
password="password",
filepath="GRCh38/cosmic/latest/CosmicCompleteCNA.tsv.gz"
)
Resistance Mutations
Access drug resistance mutation data with clinical annotations.
# Download resistance mutations
download_cosmic_file(
email="user@email.com",
password="password",
filepath="GRCh38/cosmic/latest/CosmicResistanceMutations.tsv.gz"
)
Working with COSMIC Data
Genome Assemblies
COSMIC provides data for two reference genomes:
- GRCh38 (recommended, current standard)
- GRCh37 (legacy, for older pipelines)
Specify the assembly in file paths:
# GRCh38 (recommended)
filepath="GRCh38/cosmic/latest/CosmicMutantExport.tsv.gz"
# GRCh37 (legacy)
filepath="GRCh37/cosmic/latest/CosmicMutantExport.tsv.gz"
Versioning
- Use
latestin file paths to always get the most recent release - COSMIC is updated quarterly (current version: v102, May 2025)
- Specific versions can be used for reproducibility:
v102,v101, etc.
File Formats
- TSV/CSV: Tab/comma-separated, gzip compressed, read with pandas
- VCF: Standard variant format, use with pysam, bcftools, or GATK
- All files include headers describing column contents
Common Analysis Patterns
Filter mutations by gene:
import pandas as pd
mutations = pd.read_csv('cosmic_mutations.tsv.gz', sep='\t', compression='gzip')
tp53_mutations = mutations[mutations['Gene name'] == 'TP53']
Identify cancer genes by role:
gene_census = pd.read_csv('cancer_gene_census.csv')
oncogenes = gene_census[gene_census['Role in Cancer'].str.contains('oncogene', na=False)]
tumor_suppressors = gene_census[gene_census['Role in Cancer'].str.contains('TSG', na=False)]
Extract mutations by cancer type:
mutations = pd.read_csv('cosmic_mutations.tsv.gz', sep='\t', compression='gzip')
lung_mutations = mutations[mutations['Primary site'] == 'lung']
Work with VCF files:
import pysam
vcf = pysam.VariantFile('CosmicCodingMuts.vcf.gz')
for record in vcf.fetch('17', 7577000, 7579000): # TP53 region
print(record.id, record.ref, record.alts, record.info)
Data Reference
For comprehensive information about COSMIC data structure, available files, and field descriptions, see references/cosmic_data_reference.md. This reference includes:
- Complete list of available data types and files
- Detailed field descriptions for each file type
- File format specifications
- Common file paths and naming conventions
- Data update schedule and versioning
- Citation information
Use this reference when:
- Exploring what data is available in COSMIC
- Understanding specific field meanings
- Determining the correct file path for a data type
- Planning analysis workflows with COSMIC data
Helper Functions
The download script includes helper functions for common operations:
Get Common File Paths
from scripts.download_cosmic import get_common_file_path
# Get path for mutations file
path = get_common_file_path('mutations', genome_assembly='GRCh38')
# Returns: 'GRCh38/cosmic/latest/CosmicMutantExport.tsv.gz'
# Get path for gene census
path = get_common_file_path('gene_census')
# Returns: 'GRCh38/cosmic/latest/cancer_gene_census.csv'
Available shortcuts:
mutations- Core coding mutationsmutations_vcf- VCF format mutationsgene_census- Cancer Gene Censusresistance_mutations- Drug resistance datastructural_variants- Structural variantsgene_expression- Expression datacopy_number- Copy number alterationsfusion_genes- Gene fusionssignatures- Mutational signaturessample_info- Sample metadata
Troubleshooting
Authentication Errors
- Verify email and password are correct
- Ensure account is registered at cancer.sanger.ac.uk/cosmic
- Check if commercial license is required for your use case
File Not Found
- Verify the filepath is correct
- Check that the requested version exists
- Use
latestfor the most recent version - Confirm genome assembly (GRCh37 vs GRCh38) is correct
Large File Downloads
- COSMIC files can be several GB in size
- Ensure sufficient disk space
- Download may take several minutes depending on connection
- The script shows download progress for large files
Commercial Use
- Commercial users must license COSMIC through QIAGEN
- Contact: cosmic-translation@sanger.ac.uk
- Academic access is free but requires registration
Integration with Other Tools
COSMIC data integrates well with:
- Variant annotation: VEP, ANNOVAR, SnpEff
- Signature analysis: SigProfiler, deconstructSigs, MuSiCa
- Cancer genomics: cBioPortal, OncoKB, CIViC
- Bioinformatics: Bioconductor, TCGA analysis tools
- Data science: pandas, scikit-learn, PyTorch
Additional Resources
- COSMIC Website: https://cancer.sanger.ac.uk/cosmic
- Documentation: https://cancer.sanger.ac.uk/cosmic/help
- Release Notes: https://cancer.sanger.ac.uk/cosmic/release_notes
- Contact: cosmic@sanger.ac.uk
Citation
When using COSMIC data, cite: Tate JG, Bamford S, Jubb HC, et al. COSMIC: the Catalogue Of Somatic Mutations In Cancer. Nucleic Acids Research. 2019;47(D1):D941-D947.
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (9,975 bytes)
- 📎 references/cosmic_data_reference.md (6,291 bytes)
- 📎 scripts/download_cosmic.py (7,974 bytes)