bwa-mem2-alignment

Align genomic reads to a reference genome using BWA-MEM2.

6|2|Updated Jun 11, 2026
One-click install
npx skills add https://github.com/pradyumnasagar/open-research-skills --skill bwa-mem2-alignment
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bwa-mem2-alignment
Source: https://github.com/pradyumnasagar/open-research-skills/tree/main/skills/bioinformatics-sequence/bwa-mem2-alignment
Command: npx skills add https://github.com/pradyumnasagar/open-research-skills --skill bwa-mem2-alignment

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires bwa-mem2, samtools, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a significant speedup in genome alignment using BWA-MEM2, enabling faster processing of genomic data without compromising on accuracy.

Core Features & Use Cases

  • Speedup: Achieve 2-3x faster alignment compared to BWA-MEM.
  • Accuracy: Maintains identical results to BWA-MEM.
  • Use Case: Ideal for production pipelines where alignment time is a bottleneck, such as WGS and WES pipelines.

Quick Start

Align a human genome with BWA-MEM2 by running the following command: bwa-mem2 mem -t 16 -M -K 100000000 -R '@RG... reference/genome.fa reads/R1.fq.gz reads/R2.fq.gz | samtools sort -@ 8 -m 4G -o s1.sorted.bam -

Frequently Asked Questions about bwa-mem2-alignment

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I speed up human genome alignment in my WGS pipeline?

BWA-MEM2 provides a 2-3x speedup for human genome alignment compared to BWA-MEM by utilizing SIMD acceleration. It is ideal for WGS and WES pipelines where reducing processing time is critical.

Does BWA-MEM2 produce different results than BWA-MEM?

No, BWA-MEM2 maintains identical results to BWA-MEM while delivering a 2-3x speedup. It functions as a SIMD-accelerated replacement, ensuring accuracy is not compromised for performance.

What dependencies do I need to run BWA-MEM2 for genome alignment?

You need both bwa-mem2 and samtools installed in your environment. These dependencies are required to execute the genome alignment and process the output into sorted BAM files.

How do I align paired-end reads and sort them using samtools?

Pipe BWA-MEM2 output directly to samtools sort: `bwa-mem2 mem -t 16 reference.fa R1.fq.gz R2.fq.gz | samtools sort -@ 8 -m 4G -o output.sorted.bam -`. This command aligns paired-end reads and immediately sorts the output.

When should I use BWA-MEM2 over BWA-MEM for genomic data processing?

Use BWA-MEM2 when alignment speed is a bottleneck in production pipelines. It provides a 2-3x acceleration for human genome alignment, making it highly suitable for high-throughput WGS and WES workflows.

Related Skills