Install any skill in seconds. Free to start, no credit card required.
Get Started Free →End-to-end workflow for detecting structural variants from long-read sequencing data. Covers ONT/PacBio alignment with minimap2 and SV calling with Sniffles or cuteSV. Use when detecting structural variants from long reads.
.claude/skills/bio-workflows-longread-sv-pipeline/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 60% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 48% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 180% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 90% | 0% |
| case-18 | ✓→✓ | = Same ✓ | 170% | 0% |
<!--
#
#
-->
Complete workflow for detecting structural variants from ONT or PacBio long-read data.
Long reads (ONT/PacBio)
|
v
[1. QC] ----------------> NanoPlot
|
v
[2. Alignment] ---------> minimap2
|
v
[3. SV Calling] --------> Sniffles / cuteSV
|
v
[4. Filtering] ---------> bcftools
|
v
[5. Annotation] --------> AnnotSV (optional)
|
v
Filtered SV VCFbash# ONT reads QC NanoPlot --fastq reads.fastq.gz \ --outdir nanoplot_output \ --threads 8 # Check key metrics # - Read N50 should be >10kb # - Mean quality >Q10 # - Total bases sufficient for coverage
bash# ONT reads minimap2 -ax map-ont \ -t 16 \ --MD \ -Y \ reference.fa \ reads.fastq.gz | \ samtools sort -@ 4 -o aligned.bam samtools index aligned.bam # PacBio HiFi minimap2 -ax map-hifi \ -t 16 \ --MD \ -Y \ reference.fa \ reads.fastq.gz | \ samtools sort -@ 4 -o aligned.bam # PacBio CLR minimap2 -ax map-pb \ -t 16 \ --MD \ -Y \ reference.fa \ reads.fastq.gz | \ samtools sort -@ 4 -o aligned.bam
QC Checkpoint: Check alignment stats
bashsamtools flagstat aligned.bam samtools depth -a aligned.bam | awk '{sum+=$3} END {print "Average coverage:",sum/NR}'
bash# Sniffles2 (recommended) sniffles \ --input aligned.bam \ --vcf svs.vcf.gz \ --reference reference.fa \ --threads 8 \ --minsvlen 50 # With tandem repeat annotations (recommended) sniffles \ --input aligned.bam \ --vcf svs.vcf.gz \ --reference reference.fa \ --tandem-repeats tandem_repeats.bed \ --threads 8
bash# cuteSV (faster, good for ONT) cuteSV \ aligned.bam \ reference.fa \ svs.vcf \ work_dir/ \ --threads 8 \ --min_size 50 \ --genotype bgzip svs.vcf tabix svs.vcf.gz
bash# Filter by quality and size bcftools view -i 'QUAL>=20 && ABS(SVLEN)>=50' svs.vcf.gz -Oz -o svs.filtered.vcf.gz # Filter by SV type bcftools view -i 'SVTYPE="DEL" || SVTYPE="INS"' svs.filtered.vcf.gz -Oz -o del_ins.vcf.gz # Filter by genotype bcftools view -i 'GT="1/1" || GT="0/1"' svs.filtered.vcf.gz -Oz -o genotyped.vcf.gz # Stats bcftools stats svs.filtered.vcf.gz > sv_stats.txt
bash# AnnotSV for gene/clinical annotations AnnotSV -SVinputFile svs.filtered.vcf.gz \ -outputFile annotated_svs \ -genomeBuild GRCh38
bash# Call SVs per sample for sample in sample1 sample2 sample3; do sniffles --input ${sample}.bam \ --snf ${sample}.snf \ --reference reference.fa done # Merge and joint genotype sniffles --input sample1.snf sample2.snf sample3.snf \ --vcf merged_svs.vcf.gz \ --reference reference.fa
| Tool | Parameter | ONT | PacBio HiFi | |------|-----------|-----|-------------| | minimap2 | -ax | map-ont | map-hifi | | Sniffles | --minsvlen | 50 | 50 | | Sniffles | --minsupport | auto | auto | | cuteSV | --min_size | 50 | 50 | | cuteSV | --min_support | 3 | 3 |
| Type | Abbreviation | Description | |------|--------------|-------------| | Deletion | DEL | Sequence removed | | Insertion | INS | Sequence added | | Duplication | DUP | Sequence copied | | Inversion | INV | Sequence reversed | | Translocation | BND | Breakend (interchromosomal) |
| Issue | Likely Cause | Solution | |-------|--------------|----------| | Few SVs | Low coverage | Increase sequencing depth | | Many false positives | Low quality reads | Filter by QUAL, increase min support | | Missing known SV | Repeat region | Use tandem repeat annotations | | High breakend count | Mapping artifacts | Check alignment quality |
bash#!/bin/bash set -e THREADS=16 READS="reads.fastq.gz" REF="reference.fa" SAMPLE="sample1" OUTDIR="sv_results" mkdir -p ${OUTDIR}/{qc,aligned,sv} # Step 1: QC echo "=== QC ===" NanoPlot --fastq ${READS} --outdir ${OUTDIR}/qc -t ${THREADS} # Step 2: Alignment echo "=== Alignment ===" minimap2 -ax map-ont -t ${THREADS} --MD -Y ${REF} ${READS} | \ samtools sort -@ 4 -o ${OUTDIR}/aligned/${SAMPLE}.bam samtools index ${OUTDIR}/aligned/${SAMPLE}.bam echo "Alignment stats:" samtools flagstat ${OUTDIR}/aligned/${SAMPLE}.bam # Step 3: SV calling echo "=== SV Calling ===" sniffles --input ${OUTDIR}/aligned/${SAMPLE}.bam \ --vcf ${OUTDIR}/sv/${SAMPLE}.vcf.gz \ --reference ${REF} \ --threads ${THREADS} # Step 4: Filter echo "=== Filtering ===" bcftools view -i 'QUAL>=20' ${OUTDIR}/sv/${SAMPLE}.vcf.gz \ -Oz -o ${OUTDIR}/sv/${SAMPLE}.filtered.vcf.gz bcftools index ${OUTDIR}/sv/${SAMPLE}.filtered.vcf.gz # Stats bcftools stats ${OUTDIR}/sv/${SAMPLE}.filtered.vcf.gz > ${OUTDIR}/sv/stats.txt echo "=== Complete ===" echo "SVs: $(bcftools view -H ${OUTDIR}/sv/${SAMPLE}.filtered.vcf.gz | wc -l)"
<!-- AUTHOR_SIGNATURE: 9a7f3c2e-MD-BABU-MIA-2026-MSSM-SECURE -->
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 12,789 | 9,927 | -22% | 1 | 1 | 0% | 2,600 | 4,165 | +60% | 0 | 0 | — |
case-18 | pass→pass | 5,166 | 2,775 | -46% | 1 | 1 | 0% | 920 | 2,486 | +170% | 0 | 0 | — |
case-17 | pass→pass | 8,151 | 4,609 | -43% | 1 | 1 | 0% | 1,362 | 2,822 | +107% | 0 | 0 | — |
case-06 | pass→pass | 7,006 | 3,769 | -46% | 1 | 1 | 0% | 1,330 | 2,676 | +101% | 0 | 0 | — |
case-02 | pass→pass | 6,065 | 4,132 | -32% | 1 | 1 | 0% | 1,090 | 2,754 | +153% | 0 | 0 | — |
case-03 | pass→pass | 9,634 | 5,100 | -47% | 1 | 1 | 0% | 1,712 | 2,864 | +67% | 0 | 0 | — |
case-04 | pass→pass | 5,362 | 3,877 | -28% | 1 | 1 | 0% | 993 | 2,724 | +174% | 0 | 0 | — |
case-05 | fail→fail | 10,727 | 7,038 | -34% | 1 | 1 | 0% | 2,091 | 3,310 | +58% | 0 | 0 | — |
case-16 | pass→pass | 6,742 | 6,165 | -9% | 1 | 1 | 0% | 1,135 | 3,133 | +176% | 0 | 0 | — |
case-07 | fail→pass | 10,727 | 6,626 | -38% | 1 | 1 | 0% | 2,155 | 3,190 | +48% | 0 | 0 | — |
case-08 | pass→pass | 5,822 | 3,417 | -41% | 1 | 1 | 0% | 1,136 | 2,610 | +130% | 0 | 0 | — |
case-09 | fail→pass | 5,782 | 4,353 | -25% | 1 | 1 | 0% | 998 | 2,791 | +180% | 0 | 0 | — |
case-10 | pass→pass | 7,152 | 3,036 | -58% | 1 | 1 | 0% | 1,289 | 2,581 | +100% | 0 | 0 | — |
case-11 | pass→pass | 7,823 | 3,302 | -58% | 1 | 1 | 0% | 1,587 | 2,653 | +67% | 0 | 0 | — |
case-12 | pass→pass | 12,709 | 1,951 | -85% | 1 | 1 | 0% | 2,324 | 2,234 | -4% | 0 | 0 | — |
case-13 | pass→pass | 13,597 | 5,781 | -57% | 1 | 1 | 0% | 2,372 | 2,941 | +24% | 0 | 0 | — |
case-14 | fail→pass | 15,204 | 14,334 | -6% | 1 | 1 | 0% | 2,402 | 4,571 | +90% | 0 | 0 | — |
case-15 | pass→pass | 7,019 | 4,722 | -33% | 1 | 1 | 0% | 1,196 | 2,724 | +128% | 0 | 0 | — |
case-19 | pass→pass | 10,761 | 8,384 | -22% | 1 | 1 | 0% | 1,799 | 3,288 | +83% | 0 | 0 | — |
case-20 | pass→pass | 18,752 | 10,745 | -43% | 1 | 1 | 0% | 3,270 | 4,091 | +25% | 0 | 0 | — |
case-21 | pass→pass | 15,224 | 17,330 | +14% | 1 | 1 | 0% | 3,172 | 5,461 | +72% | 0 | 0 | — |
case-22 | pass→pass | 11,697 | 7,952 | -32% | 1 | 1 | 0% | 2,113 | 3,405 | +61% | 0 | 0 | — |
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 +18 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 7/26/2026 | +9% |
Other measured skills in the registry, with their headline benchmark lift.