Production-ready VCF processing, variant annotation, mutation analysis, and structural variant (SV/CNV) interpretation for bioinformatics questions. Parses VCF files (streaming, large files), classifies mutation types (missense, nonsense, synonymous, frameshift, splice, intronic, intergenic) and structural variants (deletions, duplications, inversions, translocations), applies VAF/depth/quality/consequence filters, annotates with ClinVar/dbSNP/gnomAD/CADD via ToolUniverse, interprets SV/CNV clinical significance using ClinGen dosage sensitivity scores, computes variant statistics, and generates reports. Solves questions like "What fraction of variants with VAF < 0.3 are missense?", "How many non-reference variants remain after filtering intronic/intergenic?", "What is the pathogenicity of this deletion affecting BRCA1?", or "Which dosage-sensitive genes overlap this CNV?". Use when processing VCF files, annotating variants, filtering by VAF/depth/consequence, classifying mutations, interpreting structural var
Production-ready VCF processing, variant annotation, mutation analysis, and structural variant (SV/CNV) interpretation for bioinformatics questions. Parses VCF files (streaming, large files), classifies mutation types (missense, nonsense, synonymous, frameshift, splice, intronic, intergenic) and structural variants (deletions, duplications, inversions, translocations), applies VAF/depth/quality/consequence filters, annotates with ClinVar/dbSNP/gnomAD/CADD via ToolUniverse, interprets SV/CNV clinical significance using ClinGen dosage sensitivity scores, computes variant statistics, and generates reports. Solves questions like "What fraction of variants with VAF < 0.3 are missense?", "How many non-reference variants remain after filtering intronic/intergenic?", "What is the pathogenicity of this deletion affecting BRCA1?", or "Which dosage-sensitive genes overlap this CNV?". Use when processing VCF files, annotating variants, filtering by VAF/depth/consequence, classifying mutations, interpreting structural variants, assessing CNV pathogenicity, comparing cohorts, or answering variant analysis questions.
Variant Analysis and Annotation
Production-ready VCF processing and variant annotation skill combining local bioinformatics computation with ToolUniverse database integration. Designed to answer bioinformatics analysis questions about VCF data, mutation classification, variant filtering, and clinical annotation.
When to Use This Skill
Triggers:
User provides a VCF file (SNV/indel or SV) and asks questions about its contents
Questions about variant allele frequency (VAF) filtering
Mutation type classification queries (missense, nonsense, synonymous, etc.)
Parse VCF, apply specific filters, compute targeted statistics to answer precise questions.
result = answer_vaf_mutation_fraction(
vcf_path="input.vcf",
max_vaf=0.3,
mutation_type="missense"
)
Pattern 5: Cohort Comparison
Parse multiple VCFs, compare mutation frequencies across cohorts.
result = answer_cohort_comparison(
vcf_paths=["cohort1.vcf", "cohort2.vcf"],
mutation_type="missense"
)
When to Use pandas vs python_implementation
Use pandas when:
You need to read VCF as a flat table
You want to do custom aggregations (groupby, pivot)
You need to join with other data
You're doing exploratory data analysis
You want to export to CSV/Excel
Use python_implementation when:
You need production-grade VCF parsing
You need to extract INFO annotations (ANN, CSQ)
You need per-sample VAF/depth extraction
You need to classify mutation types
You need standard variant statistics (Ti/Tv)
You need to integrate with ToolUniverse annotation
Best approach: Use python_implementation for parsing/classification, then convert to DataFrame for custom analysis:
# Parse and classify
vcf_data = parse_vcf("input.vcf")
passing, failing = filter_variants(vcf_data.variants, criteria)
# Convert to DataFrame for custom analysis
df = variants_to_dataframe(passing, sample="TUMOR")
# Now use pandas
missense_high_vaf = df[(df['mutation_type'] == 'missense') & (df['vaf'] >= 0.3)]
Limitations
VCF annotation required for mutation classification: If VCF has no ANN/CSQ/FUNCOTATION in INFO, mutation types will be "unknown" until ToolUniverse annotation is applied
Multi-allelic variants: Parser takes first ALT allele for type classification
ToolUniverse annotation rate: API-based, limited to ~100 variants per batch by default to respect rate limits
gnomAD tool: Returns basic metadata only (not full allele frequencies); use MyVariant.info for gnomAD AF
Large VCFs: Pure Python parser streams line-by-line; cyvcf2 is recommended for files with >100K variants
Reference Documentation
references/vcf_filtering.md: Complete filter options and examples
references/mutation_classification_guide.md: Detailed mutation type classification rules
references/annotation_guide.md: ToolUniverse annotation workflows with examples