Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Access COSMIC cancer mutation database. Query somatic mutations, Cancer Gene Census, mutational signatures, gene fusions, for cancer research and precision oncology. Requires authentication.
.claude/skills/cosmic-database/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-21 | ✗→✓ | ▲ Improved | — | — |
| case-01 | ✗→✓ | ▲ Improved | — | — |
| case-03 | ✗→✓ | ▲ Improved | — | — |
| case-02 | ✗→✓ | ▲ Improved | — | — |
| case-19 | ✗→✓ | ▲ Improved | — | — |
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.
This skill should be used when:
COSMIC requires authentication for data downloads:
bashuv pip install requests pandas
Use the scripts/download_cosmic.py script to download COSMIC data files:
pythonfrom 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" )
bash# 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
pythonimport 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')
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 informationpython# Download all coding mutations download_cosmic_file( email="user@email.com", password="password", filepath="GRCh38/cosmic/latest/CosmicMutantExport.tsv.gz" )
Access the expert-curated list of ~700+ cancer genes with substantial evidence of cancer involvement.
python# Download Cancer Gene Census download_cosmic_file( email="user@email.com", password="password", filepath="GRCh38/cosmic/latest/cancer_gene_census.csv" )
Use cases:
Download signature profiles for mutational signature analysis.
python# Download signature definitions download_cosmic_file( email="user@email.com", password="password", filepath="signatures/signatures.tsv" )
Signature types:
Access gene fusion data and structural rearrangements.
Available data types:
structural_variants - Structural breakpointsfusion_genes - Gene fusion eventspython# Download gene fusions download_cosmic_file( email="user@email.com", password="password", filepath="GRCh38/cosmic/latest/CosmicFusionExport.tsv.gz" )
Retrieve copy number alterations and gene expression data.
Available data types:
copy_number - Copy number gains/lossesgene_expression - Over/under-expression datapython# Download copy number data download_cosmic_file( email="user@email.com", password="password", filepath="GRCh38/cosmic/latest/CosmicCompleteCNA.tsv.gz" )
Access drug resistance mutation data with clinical annotations.
python# Download resistance mutations download_cosmic_file( email="user@email.com", password="password", filepath="GRCh38/cosmic/latest/CosmicResistanceMutations.tsv.gz" )
COSMIC provides data for two reference genomes:
Specify the assembly in file paths:
python# GRCh38 (recommended) filepath="GRCh38/cosmic/latest/CosmicMutantExport.tsv.gz" # GRCh37 (legacy) filepath="GRCh37/cosmic/latest/CosmicMutantExport.tsv.gz"
latest in file paths to always get the most recent releasev102, v101, etc.Filter mutations by gene:
pythonimport 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:
pythongene_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:
pythonmutations = pd.read_csv('cosmic_mutations.tsv.gz', sep='\t', compression='gzip') lung_mutations = mutations[mutations['Primary site'] == 'lung']
Work with VCF files:
pythonimport 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)
For comprehensive information about COSMIC data structure, available files, and field descriptions, see references/cosmic_data_reference.md. This reference includes:
Use this reference when:
The download script includes helper functions for common operations:
pythonfrom 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 metadatalatest for the most recent versionCOSMIC data integrates well with:
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.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +55 percentage points is the difference between those two pass rates over the 22 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.