samtools-bam-processing

Sort, index, merge, flagstat, mark duplicates, and filter BAM files with samtools.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires samtools, bcftools, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the complex process of processing BAM files using samtools, simplifying tasks like sorting, indexing, merging, and more.

Core Features & Use Cases

  • Automated BAM Processing: Execute a full range of samtools commands to process BAM files efficiently.
  • Use Case: For researchers who need to sort and index BAM files from alignment outputs, or merge multiple BAM files into a single one.
  • Prerequisites: Ensure samtools and bcftools are installed with the necessary versions and a reference genome is available.

Quick Start

Use the samtools-bam-processing skill to sort and index the BAM file from your alignment results into 'sorted_indexed.bam'.

Frequently Asked Questions about samtools-bam-processing

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

FAQPage Schema
How do I sort and index BAM files from alignment outputs?

You can sort and index BAM files from alignment outputs by running automated samtools commands. This organizes aligned reads into a sorted_indexed.bam file, improving data accessibility for downstream bioinformatics workflows.

What is the best way to merge multiple BAM files into a single file?

The best way to merge multiple BAM files into a single file is by using automated samtools merge commands. This combines aligned reads from multiple BAM files into one organized output for further genomic analysis.

Do I need samtools and bcftools installed to process BAM files?

Yes, you need samtools and bcftools installed to process BAM files. These command-line dependencies are required for executing sorting, indexing, flagstat, marking duplicates, and filtering operations.

Can I mark duplicates and filter BAM files using samtools?

Yes, you can mark duplicates and filter BAM files using samtools. This automates the process of identifying duplicate reads and filtering BAM files to improve data quality for genomic analysis.

Why do I need a reference genome for BAM processing?

A reference genome is required for BAM processing to provide the coordinate system for aligned reads. It ensures samtools commands like flagstat and filtering operate accurately against the expected genomic coordinates.