Structural Variant Analysis Workflow
SkillDev toolsComprehensive structural variant (SV) analysis skill for clinical genomics. Classifies SVs (deletions, duplications, inversions, translocations), assesses pathogenicity using ACMG-adapted criteria, evaluates gene disruption and dosage sensitivity, and provides clinical interpretation with evidence grading. Use when analyzing CNVs, large deletions/duplications, chromosomal rearrangements, or any structural variants requiring clinical interpretation.
Use Structural Variant Analysis Workflow in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add Structural Variant Analysis Workflow and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the Structural Variant Analysis Workflow skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; Ahel provides instructions and does not run this skill.
No other account needed.
Add Ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
What this skill tells your AI
The instructions your AI receives, as published by freedomintelligence/openclaw-medical-skills in skills/tooluniverse-structural-variant-analysis/SKILL.md and read by Ahel’s review.
Systematic analysis of structural variants (deletions, duplications, inversions, translocations, complex rearrangements) for clinical genomics interpretation using ACMG-adapted criteria.
KEY PRINCIPLES:
- Report-first approach - Create SV_analysis_report.md FIRST, then populate progressively
- ACMG-style classification - Pathogenic/Likely Pathogenic/VUS/Likely Benign/Benign with explicit evidence
- Evidence grading - Grade all findings by confidence level (★★★/★★☆/★☆☆)
- Dosage sensitivity critical - Gene dosage effects drive SV pathogenicity
- Breakpoint precision matters - Exact gene disruption vs dosage-only effects
- Population context essential - gnomAD SVs for frequency assessment
- English-first queries - Always use English terms in tool calls (gene names, disease names), even if the user writes in another language. Only try original-language terms as a fallback. Respond in the user's language
Problem This Skill Solves
Structural variants (SVs) present unique interpretation challenges:
- Complex molecular consequences - SVs can cause gene dosage changes, gene disruption, gene fusions, position effects
- Size matters - Pathogenicity depends on size, gene content, and breakpoint precision
- Limited databases - Fewer curated SVs in ClinVar compared to SNVs
- Dosage sensitivity - Haploinsufficiency and triplosensitivity are critical but gene-specific
- Population frequency - Large benign CNVs are common; distinguishing pathogenic from benign is challenging
This skill provides: A systematic workflow integrating SV classification, gene content analysis, dosage sensitivity assessment, population frequencies, and ACMG-adapted criteria into clinically actionable interpretations.
Triggers
Use this skill when users:
- Ask about structural variant interpretation
- Have CNV data from array or sequencing
- Ask "is this deletion/duplication pathogenic?"
- Need ACMG classification for SVs
- Want to assess gene dosage effects
- Ask about chromosomal rearrangements
- Have large-scale genomic alterations requiring interpretation
Workflow Overview
┌─────────────────────────────────────────────────────────────────┐
│ STRUCTURAL VARIANT INTERPRETATION │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Phase 1: SV IDENTITY & CLASSIFICATION │
│ ├── Normalize SV coordinates (hg19/hg38) │
│ ├── Determine SV type (DEL/DUP/INV/TRA/CPX) │
│ ├── Calculate SV size │
│ └── Assess breakpoint precision │
│ │
│ Phase 2: GENE CONTENT ANALYSIS │
│ ├── Identify genes fully contained in SV │
│ ├── Identify genes with breakpoints (disrupted) │
│ ├── Annotate gene function and disease associations │
│ ├── Identify regulatory elements affected │
│ └── Assess gene orientation (for inversions/translocations) │
│ │
│ Phase 3: DOSAGE SENSITIVITY ASSESSMENT │
│ ├── ClinGen dosage sensitivity scores │
│ │ └─ Haploinsufficiency / Triplosensitivity ratings │
│ ├── DECIPHER haploinsufficiency predictions │
│ ├── pLI scores (gnomAD) for loss-of-function intolerance │
│ ├── OMIM gene-disease associations (dominant/recessive) │
│ └── Known dosage-sensitive genes from literature │
│ │
│ Phase 4: POPULATION FREQUENCY CONTEXT │
│ ├── gnomAD SV database (overlapping SVs) │
│ ├── DGV (Database of Genomic Variants) │
│ ├── ClinVar (known pathogenic/benign SVs) │
│ └── Calculate reciprocal overlap with population SVs │
│ │
│ Phase 5: PATHOGENICITY SCORING │
│ ├── Pathogenicity score (0-10 scale) │
│ │ ├─ Gene content weight (40%) │
│ │ ├─ Dosage sensitivity weight (30%) │
│ │ ├─ Population frequency weight (20%) │
│ │ └─ Inheritance/phenotype match weight (10%) │
│ ├── Apply ACMG SV criteria │
│ └── Generate classification recommendation │
│ │
│ Phase 6: LITERATURE & CLINICAL EVIDENCE │
│ ├── PubMed: Similar SVs, gene disruption studies │
│ ├── DECIPHER: Developmental disorder cases │
│ ├── Clinical case reports │
│ └── Functional evidence for gene dosage effects │
│ │
│ Phase 7: ACMG-ADAPTED CLASSIFICATION │
│ ├── Apply SV-specific evidence codes │
│ ├── Calculate final classification │
│ ├── Identify limiting factors │
│ └── Generate clinical recommendations │
│ │
└─────────────────────────────────────────────────────────────────┘
Phase Details
Phase 1: SV Identity & Classification
Goal: Standardize SV notation and classify type
SV Types:
| Type | Abbreviation | Description | Molecular Effect |
|---|---|---|---|
| Deletion | DEL | Loss of genomic segment | Haploinsufficiency, gene disruption |
| Duplication | DUP | Gain of genomic segment | Triplosensitivity, gene dosage imbalance |
| Inversion | INV | Segment flipped in orientation | Gene disruption at breakpoints, position effects |
| Translocation | TRA | Segment moved to different chromosome | Gene fusions, disruption, position effects |
| Complex | CPX | Multiple rearrangement types | Variable effects |
Key Information to Capture:
- Chromosome(s) involved
- Coordinates (start, end) in hg19/hg38
- SV size (bp or Mb)
- SV type (DEL/DUP/INV/TRA/CPX)
- Breakpoint precision (±50bp, ±1kb, etc.)
- Inheritance pattern (de novo, inherited, unknown)
Example:
SV: arr[GRCh38] 17q21.31(44039927-44352659)x1
- Type: Deletion (heterozygous)
- Size: 313 kb
- Genes: MAPT, KANSL1 (fully contained)
- Breakpoints: Well-defined (array resolution ±5kb)
Phase 2: Gene Content Analysis
Goal: Comprehensive annotation of genes affected by SV
Tools:
| Tool | Purpose | Key Data |
|---|---|---|
Ensembl_lookup_gene | Gene structure, coordinates | Gene boundaries, exons, transcripts |
NCBI_gene_search | Gene information | Official symbol, aliases, description |
Gene_Ontology_get_term_info | Gene function | Biological process, molecular function |
OMIM_search, OMIM_get_entry | Disease associations | Inheritance, clinical features |
DisGeNET_search_gene | Gene-disease associations | Evidence scores |
Gene Categories:
-
Fully contained genes - Entire gene within SV boundaries
- Deletion: Complete loss of one copy (haploinsufficiency)
- Duplication: Extra copy (triplosensitivity)
-
Partially disrupted genes - Breakpoint within gene
- Likely loss-of-function for affected allele
- Check if critical domains disrupted
-
Flanking genes - Within 1 Mb of breakpoints
- May be affected by position effects
- Regulatory disruption possible
Example Gene Content Analysis:
def analyze_gene_content(tu, chrom, sv_start, sv_end, sv_type):
"""
Identify and annotate all genes within SV region.
"""
genes = {
'fully_contained': [],
'partially_disrupted': [],
'flanking': []
}
# Use Ensembl to find overlapping genes
# This is pseudocode - actual implementation depends on available tools
for gene in genes_in_region:
gene_start = gene['start']
gene_end = gene['end']
# Classify gene relationship to SV
if gene_start >= sv_start and gene_end <= sv_end:
# Fully contained
gene_info = annotate_gene(tu, gene['symbol'])
genes['fully_contained'].append(gene_info)
elif (gene_start < sv_start < gene_end) or (gene_start < sv_end < gene_end):
# Partially disrupted
gene_info = annotate_gene(tu, gene['symbol'])
genes['partially_disrupted'].append(gene_info)
elif abs(gene_start - sv_end) < 1000000 or abs(gene_end - sv_start) < 1000000:
# Flanking (within 1 Mb)
gene_info = annotate_gene(tu, gene['symbol'])
genes['flanking'].append(gene_info)
return genes
def annotate_gene(tu, gene_symbol):
"""
Comprehensive gene annotation.
"""
# OMIM associations
omim = tu.tools.OMIM_search(
operation="search",
query=gene_symbol,
limit=5
)
# DisGeNET associations
disgenet = tu.tools.DisGeNET_search_gene(
operation="search_gene",
gene=gene_symbol,
limit=10
)
# Gene Ontology
# Note: Need gene ID first
ncbi = tu.tools.NCBI_gene_search(
term=gene_symbol,
organism="human"
)
return {
'symbol': gene_symbol,
'omim': omim,
'disgenet': disgenet,
'ncbi': ncbi
}
Report Section:
### 2.1 Fully Contained Genes (Complete Dosage Effect)
| Gene | Function | Disease Association | Inheritance | Evidence |
|------|----------|---------------------|-------------|----------|
| **MAPT** | Microtubule-associated protein tau | Frontotemporal dementia (AD) | Autosomal Dominant | ★★★ |
| **KANSL1** | Histone acetyltransferase complex | Koolen-De Vries syndrome (AD) | Autosomal Dominant | ★★★ |
**Interpretation**: Deletion results in haploinsufficiency of two dosage-sensitive genes. KANSL1 haploinsufficiency is the primary cause of pathogenicity.
*Sources: OMIM, DisGeNET, Ensembl*
### 2.2 Partially Disrupted Genes (Breakpoint Within Gene)
| Gene | Breakpoint Location | Effect | Critical Domains Lost |
|------|-------------------|--------|----------------------|
| **NF1** | Intron 28 of 58 | 5' portion deleted | Yes - GTPase-activating domain |
**Interpretation**: Breakpoint disrupts NF1 coding sequence, likely resulting in loss-of-function. NF1 is haploinsufficient (causes neurofibromatosis type 1).
### 2.3 Flanking Genes (Potential Position Effects)
| Gene | Distance from SV | Regulatory Risk | Evidence |
|------|------------------|-----------------|----------|
| **KCNJ2** | 450 kb upstream | Low | ★☆☆ |
**Note**: Position effects are possible but less common. Consider if phenotype unexplained by contained genes.
Phase 3: Dosage Sensitivity Assessment
Goal: Determine if affected genes are dosage-sensitive
Tools:
| Tool | Purpose | Key Data |
|---|---|---|
ClinGen_search_dosage_sensitivity | Gold standard curation | HI/TS scores (0-3) |
ClinGen_search_gene_validity | Gene-disease validity | Definitive/Strong/Moderate |
gnomad_search (pLI) | Loss-of-function intolerance | pLI score (0-1) |
DECIPHER_search | Developmental disorders | Patient phenotypes with similar SVs |
OMIM_get_entry | Inheritance pattern | AD/AR indicates dosage sensitivity |
ClinGen Dosage Sensitivity Scores:
| Score | Haploinsufficiency (HI) | Triplosensitivity (TS) | Interpretation |
|---|---|---|---|
| 3 | Sufficient evidence | Sufficient evidence | Gene IS dosage-sensitive |
| 2 | Emerging evidence | Emerging evidence | Likely dosage-sensitive |
| 1 | Little evidence | Little evidence | Insufficient evidence |
| 0 | No evidence | No evidence | No established dosage sensitivity |
pLI Score Interpretation (gnomAD):
| pLI Range | Interpretation | LoF Intolerance |
|---|---|---|
| ≥0.9 | Extremely intolerant | High - likely haploinsufficient |
| 0.5-0.9 | Moderately intolerant | Moderate |
| <0.5 | Tolerant | Low - likely NOT haploinsufficient |
Implementation:
def assess_dosage_sensitivity(tu, gene_list):
"""
Assess dosage sensitivity for all genes in SV.
Returns dosage scores and interpretation.
"""
dosage_data = []
for gene_symbol in gene_list:
# 1. ClinGen dosage sensitivity (gold standard)
clingen = tu.tools.ClinGen_search_dosage_sensitivity(
gene=gene_symbol
)
hi_score = None
ts_score = None
if clingen.get('data'):
for entry in clingen['data']:
hi_score = entry.get('Haploinsufficiency Score')
ts_score = entry.get('Triplosensitivity Score')
break
# 2. ClinGen gene validity (supports dosage sensitivity)
validity = tu.tools.ClinGen_search_gene_validity(
gene=gene_symbol
)
validity_level = None
if validity.get('data'):
for entry in validity['data']:
validity_level = entry.get('Classification')
break
# 3. pLI score from gnomAD (if available via gene search)
# Note: May need to use myvariant or other tools
# pli_score = get_pli_score(tu, gene_symbol)
# 4. OMIM inheritance pattern
omim = tu.tools.OMIM_search(
operation="search",
query=gene_symbol,
limit=3
)
inheritance_pattern = None
if omim.get('data', {}).get('entries'):
for entry in omim['data']['entries']:
mim = entry.get('mimNumber')
details = tu.tools.OMIM_get_entry(
operation="get_entry",
mim_number=str(mim)
)
# Extract inheritance from details
# inheritance_pattern = parse_inheritance(details)
# Integrate evidence
dosage_assessment = {
'gene': gene_symbol,
'hi_score': hi_score,
'ts_score': ts_score,
'validity_level': validity_level,
'inheritance': inheritance_pattern,
'is_dosage_sensitive': (hi_score == '3' or ts_score == '3'),
'evidence_grade': calculate_evidence_grade(hi_score, ts_score, validity_level)
}
dosage_data.append(dosage_assessment)
return dosage_data
def calculate_evidence_grade(hi_score, ts_score, validity):
"""
Calculate evidence grade for dosage sensitivity.
"""
if (hi_score == '3' or ts_score == '3') and validity == 'Definitive':
return '★★★' # High confidence
elif (hi_score in ['2', '3'] or ts_score in ['2', '3']):
return '★★☆' # Moderate confidence
else:
return '★☆☆' # Low confidence
Report Section:
### 3. Dosage Sensitivity Assessment
#### Haploinsufficient Genes (Deletions/Disruptions)
| Gene | ClinGen HI Score | pLI | Validity | Disease | Evidence |
|------|-----------------|-----|----------|---------|----------|
| **KANSL1** | 3 (Sufficient) | 0.99 | Definitive | Koolen-De Vries syndrome | ★★★ |
| **MAPT** | 2 (Emerging) | 0.85 | Strong | FTD (rare) | ★★☆ |
**Interpretation**: KANSL1 has definitive evidence for haploinsufficiency. Deletion of one copy is expected to cause Koolen-De Vries syndrome (intellectual disability, hypotonia, distinctive facial features).
*Sources: ClinGen Dosage Sensitivity Map, gnomAD pLI*
#### Triplosensitive Genes (Duplications)
| Gene | ClinGen TS Score | Disease Mechanism | Evidence |
|------|-----------------|-------------------|----------|
| **MECP2** | 3 (Sufficient) | MECP2 duplication syndrome | ★★★ |
| **PMP22** | 3 (Sufficient) | Charcot-Marie-Tooth 1A | ★★★ |
**Note**: For this deletion, triplosensitivity is not applicable. Listed for reference.
#### Non-Dosage-Sensitive Genes
| Gene | HI Score | TS Score | Interpretation |
|------|----------|----------|----------------|
| **GENE_X** | 0 | 0 | No established dosage sensitivity |
| **GENE_Y** | 1 | 1 | Insufficient evidence |
**Interpretation**: These genes lack evidence for dosage sensitivity. Deletion/duplication less likely to be pathogenic solely due to these genes.
Phase 4: Population Frequency Context
Goal: Determine if SV is common in general population (likely benign) or rare (supports pathogenicity)
Tools:
| Tool | Purpose | Key Data |
|---|---|---|
gnomad_search | Population SV frequencies | Overlapping SVs, frequencies |
ClinVar_search_variants | Known pathogenic/benign SVs | Classification, review status |
DECIPHER_search | Patient SVs with phenotypes | Case reports, phenotype similarity |
Frequency Interpretation (adapted from ACMG):
| SV Frequency | ACMG Code | Interpretation |
|---|---|---|
| ≥1% in gnomAD SVs | BA1 (Stand-alone Benign) | Too common for rare disease |
| 0.1-1% | BS1 (Strong Benign) | Likely benign common variant |
| <0.01% | PM2 (Supporting Pathogenic) | Rare, supports pathogenicity |
| Absent | PM2 (Supporting) | Very rare, supports pathogenicity |
Reciprocal Overlap Calculation:
For proper comparison, calculate reciprocal overlap between query SV and population SV:
Reciprocal Overlap = min(overlap_with_A, overlap_with_B)
where:
overlap_with_A = (overlap length) / (SV_A length)
overlap_with_B = (overlap length) / (SV_B length)
Threshold: ≥70% reciprocal overlap = "same" SV
Implementation:
def assess_population_frequency(tu, chrom, sv_start, sv_end, sv_type):
"""
Check population databases for overlapping SVs.
"""
# 1. Check ClinVar for known pathogenic/benign SVs
clinvar = tu.tools.ClinVar_search_variants(
chromosome=str(chrom),
start=sv_start,
stop=sv_end,
variant_type=sv_type.upper()
)
known_svs = []
if clinvar.get('data'):
for variant in clinvar['data']:
classification = variant.get('clinical_significance')
known_svs.append({
'database': 'ClinVar',
'classification': classification,
'review_status': variant.get('review_status'),
'coordinates': f"{variant.get('chromosome')}:{variant.get('start')}-{variant.get('stop')}"
})
# 2. gnomAD SVs (if available)
# Note: gnomAD SV database may not have direct API access via ToolUniverse
# May need to use genomic coordinate search
# 3. DECIPHER for similar patient cases
decipher_search = tu.tools.DECIPHER_search(
query=f"chr{chrom}:{sv_start}-{sv_end}",
search_type="region"
)
patient_cases = []
if decipher_search.get('data'):
patient_cases = decipher_search['data']
return {
'clinvar_matches': known_svs,
'decipher_cases': patient_cases,
'frequency_interpretation': interpret_frequency(known_svs)
}
def interpret_frequency(known_svs):
"""
Interpret frequency based on ClinVar matches.
"""
if any(sv['classification'] == 'Benign' for sv in known_svs):
return {
'acmg_code': 'BA1 or BS1',
'interpretation': 'Likely benign based on ClinVar benign classification',
'evidence_grade': '★★★'
}
elif any(sv['classification'] == 'Pathogenic' for sv in known_svs):
return {
'acmg_code': 'PS1',
'interpretation': 'Pathogenic based on ClinVar pathogenic classification',
'evidence_grade': '★★★'
}
else:
return {
'acmg_code': 'PM2',
'interpretation': 'Rare variant, not found in ClinVar or population databases',
'evidence_grade': '★★☆'
}
Report Section:
### 4. Population Frequency Context
#### ClinVar Matches (Overlapping SVs)
| VCV ID | Classification | Size | Overlap | Review Status | Genes |
|--------|----------------|------|---------|---------------|-------|
| VCV000012345 | Pathogenic | 320 kb | 95% reciprocal | ★★★ Reviewed by expert panel | KANSL1, MAPT |
**Match Found**: Query deletion has 95% reciprocal overlap with known pathogenic deletion in ClinVar (VCV000012345). This is the Koolen-De Vries syndrome deletion.
**ACMG Code**: **PS1** (Strong) - Same genomic region as established pathogenic SV
*Source: ClinVar via `ClinVar_search_variants`*
#### gnomAD SV Database
**Search Result**: No overlapping deletions found in gnomAD SV v4.0 (>10,000 genomes)
**Interpretation**: Absence from gnomAD supports rarity and pathogenic potential.
**ACMG Code**: **PM2** (Moderate) - Absent from population databases
*Note: gnomAD SVs queried via browser (no direct API access)*
#### DECIPHER Patient Cases
| Case ID | Phenotype | SV Type | Size | Overlap | Similarity |
|---------|-----------|---------|------|---------|------------|
| 12345 | Intellectual disability, hypotonia | DEL | 315 kb | 98% | High |
| 67890 | Developmental delay, facial dysmorphism | DEL | 305 kb | 92% | High |
**Phenotype Match**: 8/10 DECIPHER patients have intellectual disability and hypotonia, consistent with Koolen-De Vries syndrome.
**ACMG Support**: **PP4** (Supporting) - Patient phenotype consistent with gene's disease association
*Source: DECIPHER via `DECIPHER_search`*
Phase 5: Pathogenicity Scoring
Goal: Quantitative pathogenicity assessment (0-10 scale)
Scoring Components:
-
Gene Content (40 points max):
- 10 points per dosage-sensitive gene (HI/TS score 3)
- 5 points per likely dosage-sensitive gene (score 2)
- 2 points per gene with disease association
- Cap at 40 points
-
Dosage Sensitivity Evidence (30 points max):
- 30 points: Multiple genes with definitive HI/TS (score 3)
- 20 points: One gene with definitive HI/TS
- 10 points: Genes with emerging evidence (score 2)
- 5 points: Predicted haploinsufficiency (pLI >0.9)
-
Population Frequency (20 points max):
- 20 points: Absent from gnomAD, DGV
- 10 points: Rare (<0.01%)
- 0 points: Common (>0.1%)
- -20 points: Very common (>1%) - likely benign
-
Clinical Evidence (10 points max):
- 10 points: Matching ClinVar pathogenic SV
- 8 points: DECIPHER cases with matching phenotype
- 5 points: Literature support for gene dosage effects
- 3 points: Phenotype consistent with genes
Pathogenicity Score Interpretation:
| Score | Classification | Confidence | Interpretation |
|---|---|---|---|
| 9-10 | Pathogenic | ★★★ | High confidence pathogenic |
| 7-8 | Likely Pathogenic | ★★☆ | Strong evidence for pathogenicity |
| 4-6 | VUS | ★☆☆ | Uncertain significance |
| 2-3 | Likely Benign | ★★☆ | Strong evidence for benign |
| 0-1 | Benign | ★★★ | High confidence benign |
Implementation:
def calculate_pathogenicity_score(gene_content, dosage_data, frequency_data, clinical_data):
"""
Calculate comprehensive pathogenicity score (0-10 scale).
"""
score = 0
breakdown = {}
Shortened here. Read the whole file on GitHub.
Signals
- GitHub stars
- 3k
- Forks
- 412
- Last commit
- Jul 2026
Advanced
- Item type
- skill
- Key
tooluniverse-structural-variant-analysis- Source
- github.com/freedomintelligence/openclaw-medical-skills
github.com/freedomintelligence/openclaw-medical-skills
Related picks
Skill · mattpocock
The pick for TypeScripttypescript-pro
Skill · jeffallan
The pick for TypeScriptpython-performance-optimization
Skill · wshobson
The pick for Pythonpython-pro
Skill · jeffallan
The pick for Pythonlark-markdown
Skill · larksuite
The pick for Markdownmarkdown-formatter
Skill · nvidia
The pick for Markdown