Agent skill · Testing & QA

samtools-bam-processing

CLI toolkit for SAM/BAM/CRAM: sort, index, convert, filter, QC alignments. Core commands: view, sort, index, flagstat, stats, depth, markdup, merge. Required between alignment and variant/peak calling. Use pysam for Python-native BAM access; deeptools for normalized coverage tracks.

BioTender-maxgithub.com/BioTender-maxGitHub ↗
claude-codeNOASSERTION
Install
npx skills add BioTender-max/awesome-bio-agent-skills --skill samtools-bam-processing --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 14 KB
Bundled scripts: none
Path: skills/sciagent/samtools-bam-processing/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 135
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# samtools — SAM/BAM/CRAM Alignment Toolkit ## Overview samtools is the standard command-line toolkit for processing sequence alignment files in SAM, BAM, and CRAM formats. It handles the complete alignment file lifecycle: format conversion, coordinate sorting, index creation, quality control statistics, read filtering, duplicate marking, and multi-file merging. samtools is a near-universal component of NGS pipelines between alignment (STAR, BWA) and downstream analysis (variant calling, peak calling, coverage). ## When to Use - Sorting BAM files by coordinate after alignment (required before indexing) - Indexing sorted BAM files for random access and region queries - Converting between SAM, BAM, and CRAM formats to save storage - Generating alignment QC metrics: mapping rates, insert sizes, per-chromosome stats - Filtering reads by mapping quality, FLAG bits, or genomic regions - Marking or removing PCR duplicates before variant calling - Merging multiple BAM files from different lanes or samples - Calculating per-base depth or coverage breadth for target regions - Use `pysam` instead for Python-native BAM manipulation in custom scripts - Use `deeptools bamCoverage` instead when y

What's inside
Steps it walks through
  1. Overview
  2. When to Use
  3. Prerequisites
  4. Quick Start
  5. Core API
  6. Module 1: BAM/SAM I/O and Format Conversion
  7. Module 2: Sorting and Indexing
  8. Module 3: Quality Control and Statistics
  9. Module 4: Read Filtering and FLAG Operations
  10. Module 5: Duplicate Handling
  11. Module 6: Multi-file Operations and Region Analysis
  12. Key Concepts
  13. SAM FLAG Bits
  14. CRAM vs BAM vs SAM
Commands it runs
Bioconda (recommended)
conda install -c bioconda samtools
Homebrew (macOS)
brew install samtools
Verify
samtools --version | head -1
Typical post-alignment workflow: sort → index → QC
samtools sort -@ 8 -o sorted.bam input.bam
samtools index sorted.bam
samtools flagstat sorted.bam
More from awesome-bio-agent-skills
All skills →
About this skill
What does the samtools-bam-processing skill do?

CLI toolkit for SAM/BAM/CRAM: sort, index, convert, filter, QC alignments. Core commands: view, sort, index, flagstat, stats, depth, markdup, merge. Required between alignment and variant/peak calling. Use pysam for Python-native BAM access; deeptools for normalized coverage tracks.

How do I install it?

Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill samtools-bam-processing --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From BioTender-max/awesome-bio-agent-skills, a repository with 135 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going