Skip to content

vimalinx/bio-agent / .claude/skills/samtools

samtools

Unverified

Use when working with SAM, BAM, or CRAM alignment files to sort, index, view, convert, or compute statistics.

samtools

Quick Start

  • Command: samtools
  • Local executable: /home/vimalinx/miniforge3/envs/bio/bin/samtools
  • Version: 1.22.1
  • Reference: See references/help.md for full command documentation and options

When To Use This Tool

  • Inspect, convert, sort, index, and summarize SAM/BAM/CRAM files.
  • It is the default plumbing tool around almost every alignment workflow.
  • Use it immediately after aligners and before most downstream coverage or variant workflows.
  • Prefer subcommand-oriented usage; samtools is a dispatcher, not a single operation.

Common Patterns

# 1) Convert SAM to BAM
samtools view -b -o sample.bam sample.sam
# 2) Sort and index a BAM
samtools sort -@ 8 -o sample.sorted.bam sample.bam
samtools index sample.sorted.bam
# 3) Inspect basic mapping statistics
samtools flagstat sample.sorted.bam
samtools stats sample.sorted.bam > sample.stats.txt
# 4) Extract one region
samtools view sample.sorted.bam chr1:100000-110000

Recommended Workflow

  1. Convert aligner output into BAM or CRAM as needed.
  2. Sort the file before indexing or region-based access.
  3. Run flagstat, stats, coverage, or depth to sanity-check the alignment.
  4. Use specialized subcommands like fastq, fasta, faidx, or dict only when the workflow specifically needs them.

Guardrails

  • Region-based operations require sorted and indexed files.
  • samtools quickcheck is a cheap integrity test before burning compute on a broken BAM/CRAM.
  • Use -@ for thread-aware subcommands, but do not assume every subcommand parallelizes the same way.
  • Be explicit about output format and destination; many subcommands default to stdout.
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 192kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 192kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 192kUpdated Claude CodeCodexVerifiedInstall