vimalinx/bio-agent / .claude/skills/plot-bamstats
plot-bamstats
UnverifiedUse when visualizing `samtools stats` output as BAM QC plots, including merged reports and reference-GC-aware summaries.
plot-bamstats
Perl-based visualization tool bundled with samtools for plotting BAM alignment statistics.
Quick Start
- Command:
plot-bamstats [options] file.bam.bc - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/plot-bamstats - Expected input:
samtools statsoutput, historically calledbamcheck
When To Use This Tool
- Visualizing output from
samtools statsas graphical plots - Generating publication-quality alignment statistic figures
- Merging multiple bamstats files into one stream before plotting
- Incorporating reference GC expectations through
-s/-r
Common Patterns
# 1) Basic BAM QC plotting
samtools stats aln.bam > aln.bam.bc
plot-bamstats -p outdir/ aln.bam.bc
# 2) Merge multiple bamstats files to stdout
plot-bamstats -m sample1.bc sample2.bc > merged.bc
# 3) Prepare reference GC statistics for later plotting
plot-bamstats -s ref.fa
plot-bamstats -p outdir/ -r ref.fa.gc aln.bam.bc
Recommended Workflow
- Produce a clean
samtools statsfile first and keep it alongside the source BAM. - Decide whether you want a fresh plot directory (
-p outdir/) or a simple prefixed file set. - If GC bias matters, precompute reference stats with
-sand pass the resulting.gcfile back with-r. - Inspect the generated PNG/HTML outputs for insert size, coverage, GC, mismatch, and length-shape anomalies.
Guardrails
- Local runtime is currently blocked before normal help or plotting because Perl cannot load
URI::Escape.pm. - The built-in source help says this parser expects
samtools statsoutput, not raw BAM files and notsamtools flagstat. - The script also relies on
gnuplotfor figure generation; plan for both Perl-module and plotting-tool dependencies. --helpcould not be exercised cleanly here because the missing Perl module aborts compilation first; the available option surface was recovered from the script's ownerror()usage block.-mis a merge-to-stdout mode, so do not expect plots when that switch is present.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 196k | Updated | Claude CodeCodex | Verified | Install |
| 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: 192k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |
| 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: 192k | Updated | Claude CodeCodex | Verified | Install |