/bio-clinical-databases-variant-prioritization
Filter and prioritize variants by pathogenicity, population frequency, and clinical evidence for rare disease analysis. Use when identifying candidate disease-causing variants from exome or genome sequencing.
Claude Code
$ npx -y skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-clinical-databases-variant-prioritization --agent claude-code
Codex
$ npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-clinical-databases-variant-prioritization -a codex -y
Cursor
$ npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-clinical-databases-variant-prioritization -a cursor -y
Gemini CLI
$ npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-clinical-databases-variant-prioritization -a gemini-cli -y
GitHub Copilot
$ npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-clinical-databases-variant-prioritization -a github-copilot -y
OpenCode
$ npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-clinical-databases-variant-prioritization -a opencode -y
Windsurf
$ npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-clinical-databases-variant-prioritization -a windsurf -y
SKILL.md
bio-clinical-databases-variant-prioritization.SKILL.mdname: bio-clinical-databases-variant-prioritization
description: Filter and prioritize variants by pathogenicity, population frequency, and clinical evidence for rare disease analysis. Use when identifying candidate disease-causing variants from exome or genome sequencing.
tool_type: python
primary_tool: pandas
Version Compatibility
Reference examples tested with: 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.
Variant Prioritization
**"Prioritize candidate disease variants from my exome data"** → Filter and rank variants by pathogenicity scores, population frequency, inheritance pattern, and clinical evidence to identify candidate disease-causing mutations.
- Python: `pandas` for multi-criteria filtering with ACMG/AMP classification logic
Basic Filtering Pipeline
**Goal:** Filter variants to retain rare, potentially pathogenic candidates for rare disease analysis.
**Approach:** Apply gnomAD population frequency and ClinVar significance filters, retaining pathogenic, VUS, and unannotated variants.
import pandas as pd
def prioritize_variants(df, gnomad_af_col='gnomad_af', clinvar_col='clinvar_sig'):
'''Basic variant prioritization pipeline
Filters:
1. Rare in population (gnomAD AF < 0.01)
2. Pathogenic/likely pathogenic in ClinVar OR VUS with low AF
'''
# Filter rare variants (ACMG PM2: AF < 1%)
rare = df[df[gnomad_af_col].isna() | (df[gnomad_af_col] < 0.01)]
# Prioritize by ClinVar
pathogenic_terms = ['Pathogenic', 'Likely_pathogenic', 'Pathogenic/Likely_pathogenic']
prioritized = rare[
rare[clinvar_col].isin(pathogenic_terms) |
rare[clinvar_col].isna() | # No ClinVar = needs review
(rare[clinvar_col] == 'Uncertain_significance')
]
return prioritizedACMG-Style Filtering
**Goal:** Score variants using ACMG-style evidence criteria for pathogenicity assessment.
**Approach:** Evaluate PM2 (population rarity) and PVS1 (loss-of-function) evidence, then compute a weighted priority score.
def acmg_filter(df):
'''Apply ACMG-style filtering criteria
Strong pathogenic evidence:
- PVS1: Null variant in gene where LOF is disease mechanism
- PS1: Same amino acid change as established pathogenic
- PS3: Functional studies support damaging effect
Moderate evidence:
- PM1: Located in mutational hot spot
- PM2: Absent/rare in population databases (AF < 0.01)
- PM5: Novel missense at position of known pathogenic
'''
# PM2: Rare in gnomAD
df['pm2'] = df['gnomad_af'].isna() | (df['gnomad_af'] < 0.01)
# PVS1: Loss of function variants
lof_consequences = ['frameshift', 'stop_gained', 'splice_donor', 'splice_acceptor']
df['pvs1'] = df['consequence'].isin(lof_consequences)
# Score based on evidence
df['priority_score'] = df['pm2'].astype(int) + df['pvs1'].astype(int) * 2
return df.sort_values('priority_score', ascending=False)Multi-Database Prioritization
**Goal:** Prioritize variants using aggregated evidence from ClinVar, gnomAD, CADD, and REVEL in a single query.
**Approach:** Fetch annotations via myvariant.info, then compute a composite priority score weighting clinical, population, and computational evidence.
import myvariant
def annotate_and_prioritize(variants):
'''Annotate variants and apply prioritization'''
mv = myvariant.MyVariantInfo()
# Fetch annotations
results = mv.getvariants(
variants,
fields=[
'clinvar.clinical_significance',
'clinvar.review_status',
'gnomad_exome.af.af',
'cadd.phred',
'dbnsfp.revel.score'
]
)
records = []
for r in results:
clinvar = r.get('clinvar', {})
gnomad = r.get('gnomad_exome', {})
cadd = r.get('cadd', {})
revel = r.get('dbnsfp', {}).get('revel', {})
records.append({
'variant': r.get('query'),
'clinvar_sig': clinvar.get('clinical_significance'),
'clinvar_stars': clinvar.get('review_status'),
'gnomad_af': gnomad.get('af', {}).get('af'),
'cadd_phred': cadd.get('phred'),
'revel_score': revel.get('score') if isinstance(revel, dict) else None
})
df = pd.DataFrame(records)
return prioritize_with_scores(df)
def prioritize_with_scores(df):
'''Apply multi-evidence prioritization'''
# Computational predictions
# CADD phred > 20 suggests deleteriousness
# REVEL > 0.5 suggests pathogenicity
df['cadd_deleterious'] = df['cadd_phred'].fillna(0) > 20
df['revel_pathogenic'] = df['revel_score'].fillna(0) > 0.5
# Rare in population
df['is_rare'] = df['gnomad_af'].isna() | (df['gnomad_af'] < 0.01)
# ClinVar pathogenic
pathogenic = ['Pathogenic', 'Likely_pathogenic']
df['clinvar_pathogenic'] = df['clinvar_sig'].apply(
lambda x: any(p in str(x) for p in pathogenic) if pd.notna(x) else False
)
# Priority score
df['priority'] = (
df['clinvar_pathogenic'].astype(int) * 10 +
df['is_rare'].astype(int) * 3 +
df['cadd_deleterious'].astype(int) * 2 +
df['revel_pathogenic'].astype(int) * 2
)
return df.sort_values('priority', ascending=False)Inheritance-Based Filtering
**Goal:** Filter variants by expected inheritance pattern (autosomal dominant, recessive, or X-linked).
**Approach:** Select heterozygous ultra-rare variants for AD, or homozygous plus compound heterozygous candidates for AR.
def filter_by_inheritance(df, inheritance='AD'):
'''Filter variants by inheritance pattern
AD: Autosomal dominant - heterozygousRead more
name: bio-clinical-databases-variant-prioritization description: Filter and prioritize variants by pathogenicity, population frequency, and clinical evidence for rare disease analysis. Use when identifying candidate disease-causing variants from exome or genome sequencing. tool_type: python primary_tool: pandas
Version Compatibility
Reference examples tested with: 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.
Variant Prioritization
**"Prioritize candidate disease variants from my exome data"** → Filter and rank variants by pathogenicity scores, population frequency, inheritance pattern, and clinical evidence to identify candidate disease-causing mutations.
- Python: `pandas` for multi-criteria filtering with ACMG/AMP classification logic
Basic Filtering Pipeline
**Goal:** Filter variants to retain rare, potentially pathogenic candidates for rare disease analysis.
**Approach:** Apply gnomAD population frequency and ClinVar significance filters, retaining pathogenic, VUS, and unannotated variants.
import pandas as pd
def prioritize_variants(df, gnomad_af_col='gnomad_af', clinvar_col='clinvar_sig'):
'''Basic variant prioritization pipeline
Filters:
1. Rare in population (gnomAD AF < 0.01)
2. Pathogenic/likely pathogenic in ClinVar OR VUS with low AF
'''
# Filter rare variants (ACMG PM2: AF < 1%)
rare = df[df[gnomad_af_col].isna() | (df[gnomad_af_col] < 0.01)]
# Prioritize by ClinVar
pathogenic_terms = ['Pathogenic', 'Likely_pathogenic', 'Pathogenic/Likely_pathogenic']
prioritized = rare[
rare[clinvar_col].isin(pathogenic_terms) |
rare[clinvar_col].isna() | # No ClinVar = needs review
(rare[clinvar_col] == 'Uncertain_significance')
]
return prioritizedACMG-Style Filtering
**Goal:** Score variants using ACMG-style evidence criteria for pathogenicity assessment.
**Approach:** Evaluate PM2 (population rarity) and PVS1 (loss-of-function) evidence, then compute a weighted priority score.
def acmg_filter(df):
'''Apply ACMG-style filtering criteria
Strong pathogenic evidence:
- PVS1: Null variant in gene where LOF is disease mechanism
- PS1: Same amino acid change as established pathogenic
- PS3: Functional studies support damaging effect
Moderate evidence:
- PM1: Located in mutational hot spot
- PM2: Absent/rare in population databases (AF < 0.01)
- PM5: Novel missense at position of known pathogenic
'''
# PM2: Rare in gnomAD
df['pm2'] = df['gnomad_af'].isna() | (df['gnomad_af'] < 0.01)
# PVS1: Loss of function variants
lof_consequences = ['frameshift', 'stop_gained', 'splice_donor', 'splice_acceptor']
df['pvs1'] = df['consequence'].isin(lof_consequences)
# Score based on evidence
df['priority_score'] = df['pm2'].astype(int) + df['pvs1'].astype(int) * 2
return df.sort_values('priority_score', ascending=False)Multi-Database Prioritization
**Goal:** Prioritize variants using aggregated evidence from ClinVar, gnomAD, CADD, and REVEL in a single query.
**Approach:** Fetch annotations via myvariant.info, then compute a composite priority score weighting clinical, population, and computational evidence.
import myvariant
def annotate_and_prioritize(variants):
'''Annotate variants and apply prioritization'''
mv = myvariant.MyVariantInfo()
# Fetch annotations
results = mv.getvariants(
variants,
fields=[
'clinvar.clinical_significance',
'clinvar.review_status',
'gnomad_exome.af.af',
'cadd.phred',
'dbnsfp.revel.score'
]
)
records = []
for r in results:
clinvar = r.get('clinvar', {})
gnomad = r.get('gnomad_exome', {})
cadd = r.get('cadd', {})
revel = r.get('dbnsfp', {}).get('revel', {})
records.append({
'variant': r.get('query'),
'clinvar_sig': clinvar.get('clinical_significance'),
'clinvar_stars': clinvar.get('review_status'),
'gnomad_af': gnomad.get('af', {}).get('af'),
'cadd_phred': cadd.get('phred'),
'revel_score': revel.get('score') if isinstance(revel, dict) else None
})
df = pd.DataFrame(records)
return prioritize_with_scores(df)
def prioritize_with_scores(df):
'''Apply multi-evidence prioritization'''
# Computational predictions
# CADD phred > 20 suggests deleteriousness
# REVEL > 0.5 suggests pathogenicity
df['cadd_deleterious'] = df['cadd_phred'].fillna(0) > 20
df['revel_pathogenic'] = df['revel_score'].fillna(0) > 0.5
# Rare in population
df['is_rare'] = df['gnomad_af'].isna() | (df['gnomad_af'] < 0.01)
# ClinVar pathogenic
pathogenic = ['Pathogenic', 'Likely_pathogenic']
df['clinvar_pathogenic'] = df['clinvar_sig'].apply(
lambda x: any(p in str(x) for p in pathogenic) if pd.notna(x) else False
)
# Priority score
df['priority'] = (
df['clinvar_pathogenic'].astype(int) * 10 +
df['is_rare'].astype(int) * 3 +
df['cadd_deleterious'].astype(int) * 2 +
df['revel_pathogenic'].astype(int) * 2
)
return df.sort_values('priority', ascending=False)Inheritance-Based Filtering
**Goal:** Filter variants by expected inheritance pattern (autosomal dominant, recessive, or X-linked).
**Approach:** Select heterozygous ultra-rare variants for AD, or homozygous plus compound heterozygous candidates for AR.
def filter_by_inheritance(df, inheritance='AD'):
'''Filter variants by inheritance pattern
AD: Autosomal dominant - heterozygousOther skills on openclaw-medical-skills.
adaptyv
Cloud laboratory platform for automated protein testing and validation. Use when designing proteins and needing experimental…
adhd-daily-planner
Time-blind friendly planning, executive function support, and daily structure for ADHD brains. Specializes in realistic time…
aeon
This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting,…
agent-browser
Browse the web for any task — research topics, read articles, interact with web apps, fill forms, take screenshots, extract data,…
More skills from other plugins.
paddleocr-doc-parsing
Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as…
13c-metabolic-flux
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…
Questions about bio-clinical-databases-variant-prioritization.
- Which coding agents can use bio-clinical-databases-variant-prioritization?
- bio-clinical-databases-variant-prioritization installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.

