vimalinx/bio-agent / .claude/skills/interpolate-sam-pl
interpolate-sam-pl
VerifiedUse when deriving interpolated per-base coverage counts from a sorted SAM file, especially across paired-end inserts.
interpolate-sam-pl
Quick Start
- Command:
interpolate_sam.pl sorted.sam > interpolated.txt - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/interpolate_sam.pl - Reference: See references/help.md
When To Use This Tool
- Turn a sorted SAM file into an interpolated base-by-base coverage trace.
- Count bases spanned between paired ends rather than only piling up aligned read sequence.
- Generate simple per-position depth summaries from older MAQ-style SAM workflows.
- Produce a lightweight text coverage profile without launching a full coverage toolkit.
Common Patterns
# 1) Generate interpolated per-base counts from a sorted SAM file
interpolate_sam.pl \
alignments.sorted.sam > interpolated.txt
# 2) Save per-contig coverage blocks for downstream plotting
interpolate_sam.pl \
alignments.sorted.sam > coverage.blocks.txt
# 3) Inspect the first region header and counts
interpolate_sam.pl \
alignments.sorted.sam | head -n 40
Recommended Workflow
- Start from a SAM file that is already sorted in the order expected by the script.
- Confirm the reference names and CIGAR strings match the assumptions documented in the source comments.
- Generate the interpolated count output, then inspect the
#RNAMEblock headers and early counts for sanity. - Use the output as a lightweight diagnostic or plotting input rather than as a drop-in replacement for modern pileup/depth tools.
Guardrails
- This script expects a SAM filename as its first positional argument;
--helpand--versionare treated as missing-file names and error out. - The input SAM must be sorted.
- It expects simple CIGAR operations (
M,I, andD) and a colon-delimitedRNAMEformat such aschromosome:NCBI36:18:1:76117153:1. - The source comments note an MAQ-specific assumption that flag
0x0010marks the second read in paired-end data, so validate behavior before using it on arbitrary modern SAM files.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |