Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Detect structural variants from long-read alignments using Sniffles, cuteSV, and SVIM. Use when detecting deletions, insertions, inversions, translocations, or complex rearrangements from ONT or PacBio data, especially those missed by short-read methods.
.claude/skills/bio-longread-structural-variants/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | — | — |
| case-14 | ✗→✓ | ▲ Improved | — | — |
| case-17 | ✗→✓ | ▲ Improved | — | — |
| case-19 | ✗→✓ | ▲ Improved | — | — |
| case-05 | ✗→✓ | ▲ Improved | — | — |
Reference examples tested with: bcftools 1.19+
Before using code patterns, verify installed versions match. If versions differ:
<tool> --version then <tool> --help to confirm flagsIf code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
"Call structural variants from my long reads" → Detect large deletions, insertions, inversions, duplications, and translocations with precise breakpoint resolution from ONT or PacBio alignments.
sniffles --input aligned.bam --vcf svs.vcf, cuteSV aligned.bam ref.fa svs.vcf output/bash# Call SVs from aligned BAM sniffles --input aligned.bam \ --vcf structural_variants.vcf \ --reference reference.fa \ --threads 4
bashsniffles --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
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.
bash# 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
bash# cuteSV SV calling cuteSV aligned.bam reference.fa output.vcf work_dir/ \ --threads 8 \ --min_support 3 \ --min_size 50 \ --genotype
bash# Settings optimized for ONT cuteSV aligned.bam reference.fa output.vcf work_dir/ \ --threads 8 \ --max_cluster_bias_INS 100 \ --diff_ratio_merging_INS 0.3 \ --max_cluster_bias_DEL 100 \ --diff_ratio_merging_DEL 0.3 \ --genotype
bash# Settings optimized for HiFi cuteSV aligned.bam reference.fa output.vcf work_dir/ \ --threads 8 \ --max_cluster_bias_INS 1000 \ --diff_ratio_merging_INS 0.9 \ --max_cluster_bias_DEL 1000 \ --diff_ratio_merging_DEL 0.5 \ --genotype
bash# SVIM for ONT data svim alignment output_dir/ aligned.bam reference.fa \ --insertion_sequences \ --read_names \ --sample sample_name
bash# Discover signatures pbsv discover aligned.bam signatures.svsig.gz # Call SVs pbsv call reference.fa signatures.svsig.gz structural_variants.vcf
bash# Filter by quality and size bcftools filter -i 'QUAL>=20 && ABS(SVLEN)>=50' svs.vcf > svs.filtered.vcf # Keep only PASS bcftools view -f PASS svs.vcf > svs.pass.vcf # Filter specific SV types bcftools view -i 'SVTYPE="DEL"' svs.vcf > deletions.vcf bcftools view -i 'SVTYPE="INS"' svs.vcf > insertions.vcf
bash# Use SURVIVOR to merge SV callsets SURVIVOR merge sample_files.txt 1000 2 1 1 0 50 merged_svs.vcf # sample_files.txt contains VCF paths, one per line # Parameters: max_distance, min_callers, type_agree, strand_agree, est_distance, min_size
bash# Annotate with AnnotSV AnnotSV -SVinputFile svs.vcf \ -genomeBuild GRCh38 \ -outputFile annotated_svs # Or with bcftools bcftools annotate -a gnomad_sv.vcf.gz -c INFO svs.vcf > svs.annotated.vcf
| Type | Code | Description | |------|------|-------------| | Deletion | DEL | Sequence removed | | Insertion | INS | Sequence added | | Inversion | INV | Sequence inverted | | Duplication | DUP | Sequence duplicated | | Translocation | BND | Breakend (complex) |
| Parameter | Default | Description | |-----------|---------|-------------| | --minsupport | auto | Min supporting reads | | --minsvlen | 50 | Min SV length | | --mapq | 20 | Min mapping quality | | --reference | none | Reference (for INS sequences) | | --tandem-repeats | none | BED of tandem repeats | | --mosaic | off | Detect mosaic SVs |
| Parameter | Default | Description | |-----------|---------|-------------| | --min_support | 10 | Min supporting reads | | --min_size | 30 | Min SV length | | --max_size | 100000 | Max SV length | | --genotype | off | Output genotypes | | --report_readid | off | Report read IDs |
| Coverage | SV Detection | |----------|--------------| | 5-10x | Large SVs (>1kb) | | 10-20x | Most SVs | | 20-30x | High confidence | | >30x | Mosaic/rare SVs |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-07 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +27 percentage points is the difference between those two pass rates over the 22 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.