biotender-max/awesome-bio-agent-skills/bio-alignment-files-bam-statistics
Claude Code and agent skill by biotender-max/awesome-bio-agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Generate alignment statistics using samtools flagstat, stats, depth, and coverage. Use when assessing alignment quality, calculating coverage, or generating QC reports.
Install
npx vskill@latest install biotender-max/awesome-bio-agent-skills/bio-alignment-files-bam-statisticsSKILL.md
The same SKILL.md was published earlier as freedomintelligence/openclaw-medical-skills/bio-alignment-files-bam-statistics.
BAM Statistics
Generate alignment statistics using samtools and pysam.
Quick Summary Commands
| Command | Output | Speed | |
|---|---|---|---|
flagstat | Read counts by category | Very fast | |
idxstats | Per-chromosome counts | Very fast (needs index) | |
stats | Comprehensive statistics | Moderate | |
depth | Per-position depth | Slow (full scan) | |
coverage | Per-region coverage | Fast (needs index) |
samtools flagstat
Fast summary of alignment flags.
Output:
Multi-threaded
Output to File
samtools idxstats
Per-chromosome read counts (requires index).
Output format: chrom length mapped unmapped
Parse idxstats
samtools stats
Comprehensive statistics including insert size, base quality, and more.
View Summary Numbers
Key summary fields:
raw total sequences- Total readsreads mapped- Mapped readsreads mapped and paired- Properly pairedinsert size average- Mean insert sizeinsert size standard deviation- Insert size spreadaverage length- Mean read lengtherror rate- Mismatch rate
Generate Plots (with plot-bamstats)
Stats for Specific Region
samtools depth
Per-position read depth.
Basic Depth
Output: chrom position depth
Depth at Specific Positions
Include Zero-Depth Positions
Maximum Depth Cap
Depth from BED Regions
Calculate Mean Depth
samtools coverage
Per-chromosome or per-region coverage statistics (faster than depth).
Output columns:
#rname- Reference namestartpos- Start positionendpos- End positionnumreads- Number of readscovbases- Bases with coveragecoverage- Percentage of bases coveredmeandepth- Mean depthmeanbaseq- Mean base qualitymeanmapq- Mean mapping quality
Coverage for Specific Region
Coverage from BED
Histogram Output
pysam Python Alternative
Count Reads
Per-Chromosome Counts
Calculate Depth at Position
Mean Depth in Region
Coverage Statistics
Insert Size Distribution
Quick Reference
| Task | Command | ||
|---|---|---|---|
| Quick counts | samtools flagstat input.bam | ||
| Per-chrom counts | samtools idxstats input.bam | ||
| Full stats | samtools stats input.bam | ||
| Coverage summary | samtools coverage input.bam | ||
| Per-position depth | samtools depth input.bam | ||
| Mean depth | `samtools depth input.bam \ | awk '{sum+=$3;n++}END{print sum/n}'` |
Common Metrics
| Metric | Good | Concerning | |
|---|---|---|---|
| Mapping rate | >95% | <80% | |
| Proper pair rate | >90% | <70% | |
| Duplicate rate | <20% | >40% | |
| Error rate | <1% | >2% | |
| Coverage uniformity | <2x CV | >3x CV |
Related Skills
- sam-bam-basics - View alignment files
- alignment-indexing - idxstats requires index
- duplicate-handling - Check duplicate rates
- alignment-filtering - Filter before stats
- sequence-io/sequence-statistics - FASTA/FASTQ statistics
<!-- AUTHOR_SIGNATURE: 9a7f3c2e-MD-BABU-MIA-2026-MSSM-SECURE -->
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/openclaw/bio-alignment-files-bam-statistics/SKILL.md
Popularity
- Repository stars
- 193
- Repository forks
- 33
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Grok Build (Cursor)
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/biotender-max/awesome-bio-agent-skills/bio-alignment-files-bam-statistics)