bio-long-read-sequencing-long-read-alignment
Aligns Oxford Nanopore and PacBio long reads (and assemblies) to a reference with minimap2 using the error-rate-matched preset (map-ont, lr:hq, map-hifi…
от lilinji★ 18 звёзд на GitHub
Установить bio-long-read-sequencing-long-read-alignment в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Version Compatibility
Reference examples tested with: minimap2 2.28+, samtools 1.19+, winnowmap 2.03+, pbmm2 1.13+.
Before using code patterns, verify installed versions match. If versions differ:
- CLI:
<tool> --versionthen<tool> --helpto confirm flags
Version-driven behavior to record:
lr:hqandmap-iclrwere added in minimap2 2.27;lr:hqaein 2.28. Use >=2.28.--MDwas broken by the 2.27--dsaddition and fixed in 2.28; use >=2.28 for any MD-dependent caller.- A prebuilt
.mmiindex bakes in k/w/H/I - it must be built with the same preset used for alignment.
If code throws an error, introspect the installed tool (minimap2 --help, man page) and adapt the example to the actual API rather than retrying.
Long-Read Alignment with minimap2
"Align my long reads to the reference" -> Map with the preset that matches the reads' ERROR RATE (not just platform), keeping the supplementary alignments and tags that downstream callers need.
- CLI:
minimap2 -ax lr:hq --MD -Y ref.fa reads.fq | samtools sort -o aln.bam(accurate ONT/R10),minimap2 -ax map-ont(noisy R9 ONT),minimap2 -ax map-hifi(PacBio HiFi)
The Single Most Important Modern Insight -- The Preset Rewrites the Scoring Model, So the Wrong One Fabricates or Erases Variants
-x <preset> is not a label. The man page defines each preset as a literal bundle that rewrites k-mer/window AND the entire scoring model (match -A, mismatch -B, gap-open -O, gap-extend -E), Z-drop -z, and chaining bandwidth -r. So the wrong preset does not merely "align worse" - it changes which gaps the chainer will span, and thereby fabricates or erases the exact insertions, deletions, introns, and SV breakpoints the downstream caller is built to find. Three corollaries an expert holds:
- Preset = read error rate, not platform. "ONT" is no longer one regime: noisy R9/fast/hac =
map-ont; accurate Q20+/duplex/R10-sup =lr:hq(2.27+, ~4x fewer CPU-hours, equal/better accuracy).map-hifiis literallylr:hq+ HiFi scoring. - Supplementary alignments ARE the SV signal. SV callers read the split-read pattern (primary + supplementary chimeric pieces), not the tidy primary. Feeding them secondaries, or hard-clipping supplementaries, silently degrades SV sensitivity.
- A tag absent at alignment time is unrecoverable. MM/ML, MD, cs - if minimap2 did not write them, no downstream tool can reconstruct them; the pipeline succeeds and produces empty/wrong results.
Preset Taxonomy
| Preset | Read type / when correct | Notes |
|---|---|---|
map-ont |
ONT noisy genomic (R9, fast/hac) | the historic default; ~10% error scoring |
lr:hq |
accurate long reads <1% err (ONT Q20+/duplex/R10 sup) | 2.27+; the modern accurate-ONT default |
map-hifi |
PacBio HiFi/CCS genomic | = lr:hq + HiFi scoring (2.27+) |
map-pb |
PacBio CLR (legacy, ~15% err) | homopolymer-compressed minimizers; NEVER for HiFi |
splice |
noisy long RNA (ONT cDNA/direct RNA) | add -uf for stranded direct RNA |
splice:hq |
accurate long RNA (PacBio Iso-Seq, R10 cDNA) | |
asm5 / asm10 / asm20 |
assembly-to-ref at ~0.1% / ~1% / ~5% divergence | PAF output; --cs for paftools call |
ava-ont / ava-pb |
all-vs-all read overlap (miniasm) | overlaps only, no base alignment |
lr:hqae |
accurate reads back to THEIR OWN assembly | 2.28+; fixes centromere self-mapping mismaps |
Aligner Decision Tree
| Situation | Aligner | Why |
|---|---|---|
| Standard ONT/HiFi to a normal reference (SNV/SV/general) | minimap2 | the de-facto standard; default for Sniffles2, cuteSV, Clair3 |
| Accurate ONT (Q20+/duplex/R10 sup) | minimap2 -x lr:hq |
~4x faster than map-ont, equal/better |
| Centromeres / satellite arrays / segmental dups / T2T reference | Winnowmap2 | minimap2 minimizer-masking mismaps long tandem repeats; Winnowmap down-weights via meryl repetitive k-mers |
| Complex/nested SVs, inversions, tandem dups | VACmap (or lra) | variant-aware nonlinear chaining resolves CSVs minimap2 splits |
| Accurate reads -> a diploid assembly built from them | minimap2 -x lr:hqae (2.28+) |
avoids self-assembly centromere mismaps |
| PacBio-native (.bam/.xml, want sorted+indexed in one call) | pbmm2 | minimap2 + PacBio plumbing; presets SUBREAD/CCS/HIFI/ISOSEQ |
| Legacy Sniffles1 reproduction | NGMLR | the 2018 standard, now superseded by minimap2+Sniffles2 |
Tag Requirements by Downstream Tool
A missing tag is a silent failure. Add the tag at alignment time.
| Tag / flag | What it does | Needed for |
|---|---|---|
--MD |
mismatch positions vs ref | many small-variant callers, IGV mismatch coloring (use minimap2 >=2.28) |
-Y |
soft-clip supplementary (default hard-clips) | SV callers: keeps breakpoint/insertion SEQ on the split read |
-y |
copy MM/ML (and other) tags from the input | methylation: carries Dorado MM/ML through alignment |
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- examples/methylation_passthrough.sh
- examples/minimap2_align.sh
- usage-guide.md
FAQ
Что делает скилл bio-long-read-sequencing-long-read-alignment?
Aligns Oxford Nanopore and PacBio long reads (and assemblies) to a reference with minimap2 using the error-rate-matched preset (map-ont, lr:hq, map-hifi, map-pb, splice/splice:hq, asm5/10/20, ava), producing a sorted/indexed BAM for variant, SV, methylation, or isoform analysis. Covers why the preset rewrites the scoring/chaining model, why SV calling rides on supplementary not secondary alignments, carrying MM/ML methylation tags through with -y, the multi-part-index MAPQ trap, and when to swap in Winnowmap/VACmap/lra/pbmm2. Use when mapping ONT or PacBio reads, choosing a minimap2 preset by platform/chemistry, preparing input for Clair3/medaka/Sniffles/modkit, aligning into repeats/centromeres, or spliced-aligning cDNA/Iso-Seq.
Как установить скилл bio-long-read-sequencing-long-read-alignment?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл bio-long-read-sequencing-long-read-alignment запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…