pku-embl/metagenomics-skills/bwa-mem2
Claude Code and agent skill by pku-embl/metagenomics-skills
- community
Checking that the SKILL.md file is still in the repository.
Architecture-aware faster BWA-MEM for Illumina reads to contigs/genomes. Use when a BWA-MEM workflow is required but throughput must improve, or when migrating from classic bwa mem. Index format is NOT compatible with classic bwa index.
Install
npx vskill@latest install pku-embl/metagenomics-skills/bwa-mem2SKILL.md
BWA-MEM2
Upstream: bwa-mem2/bwa-mem2
Citation
Vasimuddin, M., Misra, S., Li, H. & Aluru, S. Efficient architecture-aware acceleration of BWA-MEM for multicore systems. IEEE IPDPS 314–324 (2019). https://doi.org/10.1109/IPDPS.2019.00041
Classic algorithm context: Li, H. Aligning sequence reads, clone sequences and assembly contigs with BWA-MEM. arXiv (2013). https://doi.org/10.48550/arXiv.1303.3997
Analytical thinking
BWA-MEM2 keeps the MEM mapping model familiar to BWA users while speeding alignment on modern CPUs. Critical pitfall: `bwa-mem2 index` ≠ `bwa index` — never point bwa-mem2 mem at a classic BWA index (or the reverse).
For new metagenome coverage projects, strobealign or bowtie2 may be simpler; choose BWA-MEM2 when SOPs/scripts already assume BWA-MEM flags and SAM fields.
Prerequisites
| Requirement | Minimum | Recommended | |
|---|---|---|---|
| Index | From bwa-mem2 index | Rebuild if upgrading major version | |
| RAM | Index ~ reference size class | Large co-assemblies need big nodes |
How to run
Use a BWA-MEM2-specific index prefix; it is not interchangeable with classic BWA index files.
Key parameters
| Option | Guidance | |
|---|---|---|
-t | Threads | |
-R | Read group (@RG) when merging multi-lane BAMs | |
-K | Process chunk size; raise on huge inputs if supported |
Decision tree
Troubleshooting
| Symptom | Action | |
|---|---|---|
| Index load errors | Rebuild with bwa-mem2 index | |
| Divergent SM tags | Set -R consistently across lanes | |
| Huge unsorted SAM | Stream to samtools sort (never dump SAM) |
Validation, recovery, and provenance
Inspect paired/primary mapping rates, insert-size behavior, reference contig names, and coverage distribution. Rebuild indexes after incompatible version or format changes; never silently reuse classic BWA indexes. Preserve BWA-MEM2 and Samtools versions, index/reference checksum, read checksums, commands, logs, flagstat, BAM checksum, and read-group policy.
Related skills
bwa · bowtie2 · strobealign · samtools · coverm · metabat2
Security
- Security scanPassed, 100 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 repositoryCheckingskills/bwa-mem2/SKILL.md
Popularity
- Repository stars
- 6
- 7-day trend score
- 10
Stars and forks are for the whole GitHub repository, not this skill alone. 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/pku-embl/metagenomics-skills/bwa-mem2)