tywei08/bioskills-plugin/bwa-alignment
Claude Code and agent skill by tywei08/bioskills-plugin
- community
Checking that the SKILL.md file is still in the repository.
Align DNA short reads to reference genomes using bwa-mem2, the faster successor to BWA-MEM. Use when aligning DNA short reads to a reference genome.
Install
npx vskill@latest install tywei08/bioskills-plugin/bwa-alignmentSKILL.md
The same SKILL.md was published earlier as biotender-max/awesome-bio-agent-skills/bwa-alignment.
Version Compatibility
Reference examples tested with: GATK 4.5+, samtools 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.
BWA-MEM2 Alignment
"Align reads with BWA" → Map DNA reads to a reference genome using BWA-MEM2, the standard aligner for whole-genome and exome sequencing.
- CLI:
bwa-mem2 mem -t 8 ref.fa R1.fq R2.fq | samtools sort -o aligned.bam
Build Index
Basic Alignment
Alignment with Read Groups
Direct to Sorted BAM
Mark Duplicates Pipeline
Goal: Produce a duplicate-marked, sorted BAM file from raw reads in a single streaming pipeline.
Approach: Pipe BWA-MEM2 output through samtools fixmate (to add mate score tags), coordinate sort, and markdup in a single command chain to avoid intermediate files.
Common Options
Key Parameters
| Parameter | Default | Description | |
|---|---|---|---|
| -t | 1 | Number of threads | |
| -k | 19 | Minimum seed length | |
| -w | 100 | Band width for extension | |
| -r | 1.5 | Re-seeding trigger ratio | |
| -c | 500 | Skip seeds with more than INT hits | |
| -A | 1 | Match score | |
| -B | 4 | Mismatch penalty | |
| -O | 6 | Gap open penalty | |
| -E | 1 | Gap extension penalty | |
| -M | off | Mark secondary alignments |
Output Filters
Split Read Alignment
Memory Requirements
- Index loading: ~10GB for human genome
- Per thread: ~1-2GB
- Typical human WGS: 30-50GB RAM with 8 threads
BWA-MEM (Alternative)
BWA-MEM vs BWA-MEM2
| Feature | BWA-MEM | BWA-MEM2 | |
|---|---|---|---|
| Status | Active | Archived | |
| Speed | 1x | 2-3x faster | |
| Index format | .bwt | .bwt.2bit.64 | |
| Results | Baseline | Nearly identical | |
| Memory | ~5GB | ~10GB |
Related Skills
- read-qc/fastp-workflow - Preprocess reads before alignment
- alignment-files/alignment-sorting - Post-alignment processing
- alignment-files/duplicate-handling - Mark duplicates
- variant-calling/variant-calling - Call variants from BAM
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingread-alignment/bwa-alignment/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/tywei08/bioskills-plugin/bwa-alignment)