본문으로 건너뛰기
cccskills
무료GitHub에 공개

bio-clinical-databases-myvariant-queries

Query myvariant.info API for aggregated variant annotations from multiple databases (ClinVar, gnomAD, dbSNP, COSMIC, etc.) in a single request. Use when annotating variants with clinical and population data from multiple sources simultaneously.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(3)

  • SKILL.md5.1 KB
  • examples/query_myvariant.py2.1 KB
  • usage-guide.md1.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Version Compatibility

Reference examples tested with: SnpEff 5.2+, pandas 2.2+

Before using code patterns, verify installed versions match. If versions differ:

  • Python: pip show <package> then help(module.function) to check signatures

If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.

MyVariant.info Queries

"Annotate my variants from multiple databases at once" → Query the myvariant.info aggregation API to retrieve ClinVar, gnomAD, dbSNP, COSMIC, and other annotations in a single request per variant.

  • Python: myvariant.MyVariantInfo().getvariants(ids, fields='clinvar,gnomad,dbnsfp')

Required Imports

import myvariant

Initialize Client

mv = myvariant.MyVariantInfo()

Query Single Variant

Goal: Retrieve aggregated annotations for a single variant from multiple databases in one request.

Approach: Query myvariant.info by HGVS notation or rsID, which returns ClinVar, gnomAD, dbSNP, COSMIC, and CADD data.

# Query by HGVS notation (recommended)
result = mv.getvariant('chr7:g.140453136A>T')

# Query by rsID
result = mv.getvariant('rs121913527')

# Query by gene and protein change
result = mv.getvariant('BRAF:p.V600E')

Query Multiple Variants

Goal: Batch-query up to 1000 variants in a single API call with field selection for efficiency.

Approach: Pass a list of variant identifiers to getvariants() with specific field filters to minimize response size.

variants = [
    'chr7:g.140453136A>T',
    'chr17:g.7577120C>T',
    'rs121913527'
]

# Batch query (up to 1000 variants per request)
results = mv.getvariants(variants)

# With specific fields
results = mv.getvariants(
    variants,
    fields=['clinvar', 'gnomad_exome', 'dbsnp']
)

Search Variants

Goal: Search for variants by gene, clinical significance, or genomic region using query syntax.

Approach: Use Lucene-style query strings with mv.query() to filter by gene symbol, ClinVar fields, or coordinate ranges.

# Search by gene
results = mv.query('clinvar.gene.symbol:BRCA1', size=100)

# Search pathogenic variants in gene
results = mv.query(
    'clinvar.gene.symbol:BRCA1 AND clinvar.clinical_significance:Pathogenic',
    size=100
)

# Search by genomic region
results = mv.query('chr7:140400000-140500000')

Available Fields

Common field paths for annotations:

FieldDescription
clinvarClinVar annotations
gnomad_exomegnomAD exome frequencies
gnomad_genomegnomAD genome frequencies
dbsnpdbSNP annotations
cosmicCOSMIC cancer mutations
caddCADD deleteriousness scores
dbnsfpdbNSFP functional predictions
snpeffSnpEff annotations

Extract Specific Annotations

Goal: Extract ClinVar classification, gnomAD frequency, and CADD score from a variant result.

Approach: Navigate the nested JSON response using dictionary access to reach specific annotation fields.

result = mv.getvariant('chr7:g.140453136A>T')

# ClinVar classification
clinvar_sig = result.get('clinvar', {}).get('clinical_significance')

# gnomAD allele frequency
gnomad_af = result.get('gnomad_exome', {}).get('af', {}).get('af')

# CADD score
cadd_phred = result.get('cadd', {}).get('phred')

Batch Processing with DataFrame

Goal: Convert batch variant query results into a structured pandas DataFrame for downstream analysis.

Approach: Query multiple rsIDs with selected fields, extract key annotations per variant, and assemble into a DataFrame.

import pandas as pd

variants = ['rs121913527', 'rs1800566', 'rs104894155']
results = mv.getvariants(variants, fields=['clinvar', 'gnomad_exome'])

records = []
for r in results:
    records.append({
        'query': r.get('query'),
        'clinvar_sig': r.get('clinvar', {}).get('clinical_significance'),
        'gnomad_af': r.get('gnomad_exome', {}).get('af', {}).get('af')
    })

df = pd.DataFrame(records)

Rate Limiting

Goal: Handle large variant sets exceeding the 1000-variant-per-request API limit.

Approach: Split variants into chunks and query sequentially, relying on myvariant's built-in rate limiting.

# myvariant handles rate limiting automatically
# For large batches, use chunks
def batch_query(variants, chunk_size=1000):
    all_results = []
    for i in range(0, len(variants), chunk_size):
        chunk = variants[i:i + chunk_size]
        results = mv.getvariants(chunk)
        all_results.extend(results)
    return all_results

Related Skills

  • clinvar-lookup - Detailed ClinVar queries
  • gnomad-frequencies - gnomAD-specific frequency queries
  • dbsnp-queries - dbSNP rsID lookups

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

adaptyv

무료

Cloud laboratory platform for automated protein testing and validation. Use when designing proteins and needing experimental validation including binding assays, expression testing, thermostability measurements, enzyme activity assays, or protein sequence optimization. Also use for submitting experiments via API, tracking experiment status, downloading results, optimizing protein sequences for better expression using computational tools (NetSolP, SoluProt, SolubleMPNN, ESM), or managing protein design workflows with wet-lab validation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

FreedomIntelligence/OpenClaw-Medical-Skills3.1천2026년 7월 21일 업데이트

Time-blind friendly planning, executive function support, and daily structure for ADHD brains. Specializes in realistic time estimation, dopamine-aware task design, and building systems that actually work for neurodivergent minds.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

FreedomIntelligence/OpenClaw-Medical-Skills3.1천2026년 7월 21일 업데이트

aeon

무료

This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use when working with temporal data, sequential patterns, or time-indexed observations requiring specialized algorithms beyond standard ML approaches. Particularly suited for univariate and multivariate time series analysis with scikit-learn compatible APIs.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

FreedomIntelligence/OpenClaw-Medical-Skills3.1천2026년 7월 21일 업데이트

Browse the web for any task — research topics, read articles, interact with web apps, fill forms, take screenshots, extract data, and test web pages. Use whenever a browser would be useful, not just when the user explicitly asks.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

FreedomIntelligence/OpenClaw-Medical-Skills3.1천2026년 7월 21일 업데이트

AI驱动的综合健康分析系统,整合多维度健康数据、识别异常模式、预测健康风险、提供个性化建议。支持智能问答和AI健康报告生成。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

FreedomIntelligence/OpenClaw-Medical-Skills3.1천2026년 7월 21일 업데이트

alphafold

무료

Validate protein designs using AlphaFold2 structure prediction. Use this skill when: (1) Validating designed sequences fold correctly, (2) Predicting binder-target complex structures, (3) Calculating confidence metrics (pLDDT, pTM, ipTM), (4) Self-consistency validation of designs, (5) Multi-chain complex prediction with AlphaFold-Multimer. For faster single-chain prediction, use esm. For QC thresholds, use protein-qc.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

FreedomIntelligence/OpenClaw-Medical-Skills3.1천2026년 7월 21일 업데이트

FreedomIntelligence의 스킬 모두 보기

이 스킬의 문제 신고