SKILL.md
Version Compatibility
Reference examples tested with: bcftools 1.19+
Before using code patterns, verify installed versions match. If versions differ:
- CLI:
<tool> --versionthen<tool> --helpto confirm flags
If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
Structural Variant Detection
"Call structural variants from my long reads" → Detect large deletions, insertions, inversions, duplications, and translocations with precise breakpoint resolution from ONT or PacBio alignments.
- CLI:
sniffles --input aligned.bam --vcf svs.vcf,cuteSV aligned.bam ref.fa svs.vcf output/
Sniffles2 - Basic SV Calling
# Call SVs from aligned BAM
sniffles --input aligned.bam \
--vcf structural_variants.vcf \
--reference reference.fa \
--threads 4
Sniffles2 - Common Options
sniffles --input aligned.bam \
--vcf structural_variants.vcf \
--reference reference.fa \
--threads 8 \
--minsupport 3 \ # Min supporting reads
--minsvlen 50 \ # Min SV length
--mapq 20 \ # Min mapping quality
--output-rnames \ # Include read names
--mosaic # Detect mosaic SVs
Sniffles2 - Population Calling
Goal: Jointly call and genotype structural variants across a cohort of long-read samples for population-level SV analysis.
Approach: Generate per-sample SNF signature files from individual BAMs, then merge and jointly genotype all samples in a single Sniffles2 call.
# Step 1: Call SVs per sample with SNF output
sniffles --input sample1.bam --snf sample1.snf --reference reference.fa
sniffles --input sample2.bam --snf sample2.snf --reference reference.fa
# Step 2: Merge and genotype
sniffles --input sample1.snf sample2.snf \
--vcf population_svs.vcf \
--reference reference.fa
