sciagent-skill-creator
Scaffold a new SciAgent-Skills entry. Picks pipeline/toolkit/database/guide template, creates skills/{category}/{name}/SKILL.md with valid frontmatter, appends…
Cancer genomics (TCGA et al.) via cBioPortal REST API. Retrieve somatic mutations, CNAs, expression, clinical data (survival/stage/treatment) across thousands of studies. Use for TMB, oncoprints, survival analysis. For population frequencies use gnomad-database; for drug-gene
$ npx -y skills add jaechang-hits/SciAgent-Skills --skill cbioportal-database --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/cbioportal-databaseContext preview
The summary Claude sees to decide when to auto-load this skill.
Cancer genomics (TCGA et al.) via cBioPortal REST API. Retrieve somatic mutations, CNAs, expression, clinical data (survival/stage/treatment) across thousands of studies. Use for TMB, oncoprints, survival analysis. For population frequencies use gnomad-database; for drug-gene
name: "cbioportal-database" description: "Cancer genomics (TCGA et al.) via cBioPortal REST API. Retrieve somatic mutations, CNAs, expression, clinical data (survival/stage/treatment) across thousands of studies. Use for TMB, oncoprints, survival analysis. For population frequencies use gnomad-database; for drug-gene interactions use opentargets-database." license: "AGPL-3.0"
cBioPortal for Cancer Genomics is a public repository of cancer genomics data including TCGA, ICGC, and hundreds of curated studies spanning 100+ cancer types. It provides somatic mutation profiles, copy number alterations (CNA), gene expression, clinical data (survival, stage, treatment history), and methylation data for tens of thousands of patient samples. Data is accessible via a REST API at `https://www.cbioportal.org/api/` with no authentication required.
pip install requests pandas matplotlib
import requests
import pandas as pd
BASE_URL = "https://www.cbioportal.org/api"
def cbio_get(endpoint, params=None):
"""GET request to cBioPortal REST API, returns parsed JSON."""
r = requests.get(f"{BASE_URL}/{endpoint}", params=params,
headers={"Accept": "application/json"}, timeout=30)
r.raise_for_status()
return r.json()
# List available cancer types
cancer_types = cbio_get("cancer-types")
print(f"Total cancer types: {len(cancer_types)}")
# Total cancer types: 87
# Find TCGA breast cancer study
studies = cbio_get("studies", params={"keyword": "breast"})
brca = [s for s in studies if "tcga_brca" in s["studyId"]]
if brca:
s = brca[0]
print(f"Study: {s['name']}")
print(f" studyId: {s['studyId']}")
print(f" Samples: {s['allSampleCount']}")
# Study: Breast Invasive Carcinoma (TCGA, PanCancer Atlas)
# studyId: brca_tcga_pan_can_atlas_2018
# Samples: 1084List available cancer types and find studies by cancer type or keyword.
import requests
import pandas as pd
BASE_URL = "https://www.cbioportal.org/api"
def cbio_get(endpoint, params=None):
r = requests.get(f"{BASE_URL}/{endpoint}", params=params,
headers={"Accept": "application/json"}, timeout=30)
r.raise_for_status()
return r.json()
# Get all cancer types
cancer_types = cbio_get("cancer-types")
ct_df = pd.DataFrame(cancer_types)[["cancerTypeId", "name", "dedicatedColor"]]
print(f"Cancer types: {len(ct_df)}")
print(ct_df.head(5).to_string(index=False))
# Find all studies for a cancer type
lung_studies = cbio_get("studies", params={"keyword": "lung adenocarcinoma"})
print(f"\nLung adenocarcinoma studies: {len(lung_studies)}")
for s in lung_studies[:3]:
print(f" {s['studyId']:40s} n={s['allSampleCount']}")# Get detailed study metadata including available data types
study_id = "brca_tcga_pan_can_atlas_2018"
study = cbio_get(f"studies/{study_id}")
print(f"Study: {study['name']}")
print(f" Reference genome: {study.get('referenceGenome', 'n/a')}")
print(f" All sample count: {study['allSampleCount']}")
# List molecular profiles for the study
profiles = cbio_get("molecular-profiles", params={"studyId": study_id})
print(f"\nMolecular profiles ({len(profiles)} total):")
for p in profiles:
print(f" {p['molecularProfileId']:55s} [{p['molecularAlterationType']}]")Retrieve mutation data for a gene or set of genes in a study's mutation profile.
import requests, json
import pandas as pd
BASE_URL = "https://www.cbioportal.org/api"
def cbio_post(endpoint, body):
"""POST request to cBioPortal REST API."""
r = requests.post(f"{BASE_URL}/{endpoint}", json=body,
headers={"Accept": "application/json",
"Content-Type": "application/json"},
timeout=60)
r.raise_for_status()
return r.json()
def cbio_get(endpoint, params=None):
r = requests.get(f"{BASE_URL}/{endpoint}", params=params,
headers={"Accept": "application/json"}, timeout=30)
r.raise_for_status()
return r.json()
# Get all samples for a study
study_id = "brca_tcga_pan_can_atlas_2018"
samples = cbio_get(f"studies/{study_id}/samples", params={"projection": "ID"})
sample_ids = [s["sampleId"] for s in samples]
print(f"Total samples: {len(sample_ids)}")
# Mutation profile ID follows pattern: {studyId}_mutations
profile_id = f"{study_id}_mutations"
# Fetch mutations for TP53 (Entrez gene ID = 7157)
body = {
"sampleIdsTurn your AI coding agent into a life sciences expert — 199 bioinformatics skills for Claude Code covering RNA-seq, single-cell analysis, genomics, proteomics, drug discovery, and more. Boosted BixBench from 65% to 92%. Open source.
Scaffold a new SciAgent-Skills entry. Picks pipeline/toolkit/database/guide template, creates skills/{category}/{name}/SKILL.md with valid frontmatter, appends…
Bayesian modeling with PyMC 5: priors, likelihood, NUTS/ADVI sampling, diagnostics (R-hat, ESS), LOO/WAIC comparison, prediction. Hierarchical, logistic, GP…
Time-to-event modeling with scikit-survival: Cox PH (elastic net), Random Survival Forests, Boosting, SVMs for censored data. C-index, Brier, time-dependent…
Guided statistical analysis: test choice, assumption checks, effect sizes, power, APA reporting. Pick tests, verify assumptions, or format results for…
Python statistical modeling: regression (OLS, WLS, GLM), discrete (Logit, Poisson, NegBin), time series (ARIMA, SARIMAX, VAR), with rigorous inference,…
DL cell/nucleus segmentation for fluorescence and brightfield microscopy. Pre-trained models (cyto3, nuclei, tissuenet) and a generalist flow-based algorithm…