SKILL.md
Version Compatibility
Reference examples tested with: pandas 2.2+
Before using code patterns, verify installed versions match. If versions differ:
- Python:
pip show <package>thenhelp(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:
pandasfor 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 prioritized
ACMG-Style Filtering
Goal: Score variants using ACMG-style evidence criteria for pathogenicity assessment.
