annotating-variants
하는 일
이 스킬은 VCF 파일, rsID, HGVS 이름에서 나온 유전 변이에 주석을 붙입니다. 각 변이의 효과를 예측하고 인구 빈도 데이터와 연결합니다. 유전체 데이터를 다루는 연구자와 생물정보학 팀을 위한 스킬입니다.
사용하는 경우
- ✓미스센스나 스톱게인 변화처럼 변이의 결과를 예측해야 할 때.
- ✓HGVS 이름을 게놈 좌표로 바꾸거나 그 반대로 바꾸고 싶을 때.
- ✓흔한 변이와 드문 변이를 구분하려고 인구 대립유전자 빈도가 필요할 때.
스킬 링크
https://github.com/maziyarpanahi/openmed/blob/master/skills/annotating-variants/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 VCF 파일에 예측된 결과와 gnomAD 빈도를 붙여 주세요. 공개 Ensembl 주석 도구를 사용해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 변이를 공개 주석 서비스로 보내거나 오프라인 주석 도구를 실행한 뒤, 각 변이를 예측된 효과와 빈도 데이터와 함께 돌려줍니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Annotating variants & normalizing HGVS
Turn raw genomic variants — VCF rows, rsIDs, or HGVS strings — into annotated, consequence-predicted records, and link them to the clinical context OpenMed extracts from text (genes, variants, oncology findings, phenotype). The workhorse for a quick, no-install annotation is the Ensembl VEP REST API; for scale, run VEP, SnpEff, or ANNOVAR offline.
These annotators are free and license-permissive. Restricted clinical interpretation databases (e.g. licensed HGMD) are user-supplied — this skill sticks to open resources (Ensembl, gnomAD, ClinVar).
When to use
- You have a VCF / HGVS / rsID and need consequence predictions (missense, stop-gain, splice), affected transcripts, and protein change.
- You need to normalize HGVS to genomic coordinates (and back) on a known build (GRCh38 by default; GRCh37 via the dedicated endpoint).
- You want gnomAD population allele frequencies to flag common vs rare.
- You are pairing molecular findings with the phenotype/oncology context that OpenMed pulls from notes or literature.
Quick start (real Ensembl VEP REST call)
Base URL: https://rest.ensembl.org (GRCh38). For GRCh37 use
https://grch37.rest.ensembl.org. Default species is human/homo_sapiens.
import requests
REST = "https://rest.ensembl.org"
HEADERS = {"Content-Type": "application/json", "Accept": "application/json"}
def vep_hgvs(hgvs: str) -> list[dict]:
"""Annotate a single HGVS variant (GET)."""
r = requests.get(f"{REST}/vep/human/hgvs/{hgvs}", headers=HEADERS, timeout=30)
r.raise_for_status()
return r.json()
# Transcript-level HGVS (coding) — note the build-aware default transcript set
ann = vep_hgvs("ENST00000269305.9:c.215C>G") # TP53 example
v = ann[0]
print(v["most_severe_consequence"]) # e.g. "missense_variant"
for tc in v.get("transcript_consequences", []):
print(tc["gene_symbol"], tc.get("hgvsp"), tc.get("sift_prediction"),
tc.get("polyphen_prediction"))
Batch many variants with the POST endpoint (region "CHROM POS ID REF ALT . . ." format, up to 200 per request):
def vep_region_batch(variants: list[str]) -> list[dict]:
body = {"variants": variants} # ["17 7676154 . C G . . .", ...] 1-based
r = requests.post(f"{REST}/vep/human/region", headers=HEADERS,
json=body, timeout=60)
r.raise_for_status()
return r.json()
Equivalent cURL:
curl 'https://rest.ensembl.org/vep/human/hgvs/ENST00000269305.9:c.215C>G' \
-H 'Content-Type:application/json'
Response highlights per variant: most_severe_consequence,
transcript_consequences[] (gene_symbol, hgvsc, hgvsp, sift_prediction,
polyphen_prediction, impact), and colocated_variants[] (rsIDs and
population frequencies). Request gnomAD frequencies and ClinVar via VEP options /
plugins.
Population frequencies via gnomAD (GraphQL)
For authoritative allele frequencies, query the gnomAD GraphQL API at
https://gnomad.broadinstitute.org/api. Use variant IDs in
chrom-pos-ref-alt form. Frequencies are derived from ac/an (allele count /
number) — request those, not a non-existent af on subpopulations.
GNOMAD = "https://gnomad.broadinstitute.org/api"
QUERY = """
query Variant($id: String!, $ds: DatasetId!) {
variant(variantId: $id, dataset: $ds) {
variant_id rsids
genome { ac an af homozygote_count }
exome { ac an af homozygote_count }
}
}"""
def gnomad_freq(variant_id: str, dataset: str = "gnomad_r4") -> dict:
r = requests.post(GNOMAD, json={"query": QUERY,
"variables": {"id": variant_id, "ds": dataset}}, timeout=30)
r.raise_for_status()
return r.json()["data"]["variant"]
# gnomad_freq("17-7676154-C-G") -> ac/an/af for exome and genome
Offline annotation at scale
For whole-VCF jobs, run a local annotator instead of per-variant REST calls:
| Tool | Strengths | Notes |
|---|---|---|
| Ensembl VEP (offline) | richest, plugin ecosystem (gnomAD, CADD, SpliceAI), HGVS | needs cache download per build |
| SnpEff | fast, self-contained genome databases | great for bulk consequence calling |
| ANNOVAR | many annotation databases | registration required; license terms apply |
All emit per-variant gene, consequence, and (with the right database) frequency and clinical fields. Keep the reference build (GRCh38) consistent end to end.
Workflow
- **N
자주 묻는 질문
유료 소프트웨어가 필요한가요?
아니요. Ensembl VEP REST 서비스 같은 무료 공개 라이선스 주석 도구와 공개 데이터 소스를 사용합니다.
라이선스가 필요한 임상 데이터베이스를 포함하나요?
아니요. 제한된 데이터베이스는 사용자가 직접 제공해야 합니다.
대규모 작업도 가능한가요?
대규모 작업에는 VEP, SnpEff, ANNOVAR 같은 오프라인 도구를 안내합니다.
상세 정보
작성자의 원본 설명
Annotates VCF variants and normalizes HGVS nomenclature with public, license-free annotators (Ensembl VEP REST, VEP/SnpEff/ANNOVAR offline) and links variants to gnomAD population frequencies and the clinical context OpenMed extracts. Use when the user wants to predict variant consequences, map HGVS to genomic coordinates, annotate a VCF, attach allele frequencies, or pair variants with phenotype/oncology context. Trigger keywords: VCF, HGVS, variant annotation, VEP, SnpEff, ANNOVAR, consequence, missense, gnomAD, allele frequency, GRCh38, rsID, transcript. Pairs adjacent to OpenMed: combine a
repo: maziyarpanahi/openmed
인기도
- GitHub 스타
- 5.8k
- 순위
- #14665
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
ask-openmed
5.8k에이전트가 임상 텍스트 요청에 맞는 OpenMed 워크플로를 고르도록 돕되, 환자 데이터가 있을 수 있으면 먼저 개인 정보 확인을 거치게 합니다.
assembling-fhir-bundles
5.8k여러 FHIR 건강 기록을 EHR로 보낼 수 있도록 하나의 트랜잭션 Bundle로 묶고, 내부 참조를 올바르게 연결하도록 에이전트를 돕습니다.
auditing-deid-leakage
5.8k비식별화된 임상 텍스트에 남은 SSN, 카드 번호, 이메일, 날짜 같은 식별자를 검사하고, 남은 것이 있으면 공개를 막도록 돕습니다.
auditing-deidentification-runs
5.8k비식별화 실행마다 무엇을 가렸고 왜 가렸는지 보여 주는 서명된 재현 가능한 기록을 만들며, 기록 안에는 환자 데이터가 없습니다.
비슷한 스킬
gitcrawl
394k에이전트가 저장된 GitHub 이슈와 풀 리퀘스트 보관본을 검색하고, 중복 항목을 묶고, GitHub에서 현재 상태를 확인하도록 돕습니다.
slacrawl
394k에이전트가 로컬 Slack 보관본에서 메시지를 검색하고 개수를 세며, 보관본이 얼마나 최신인지 확인하고 필요할 때 새로 고치도록 돕습니다.
goplaces
394k에이전트가 Google Places로 장소를 검색하고, 세부 정보와 리뷰를 가져오고, 장소 이름을 확인하며, 스크립트용 JSON을 출력하도록 돕습니다.