vimalinx/bio-agent / .claude/skills/map-bed
map-bed
UnverifiedUse when you need to apply aggregation functions (sum, mean, count, etc.) to values from overlapping intervals in one file and map them onto intervals from another file.
map-bed
Quick Start
- Command:
mapBed -a A.bed -b B.bed -c <B_col> -o <op> [options] - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/mapBed - Full reference: See
references/help.md
When To Use This Tool
- Aggregate values from overlapping B intervals onto each A interval.
- Summarize signal tracks, counts, names, or scores across target intervals.
- Attach mean, sum, min, max, count, or distinct summaries to an interval set.
- Constrain which overlaps contribute with strand or reciprocal-overlap rules.
Common Patterns
# 1) Mean signal from B column 5 over each A interval
mapBed \
-a exons.bed \
-b signal.bed \
-c 5 \
-o mean
# 2) Count distinct overlapping labels
mapBed \
-a peaks.bed \
-b annotations.bed \
-c 4 \
-o count_distinct
# 3) Map multiple B columns with matching operations
mapBed \
-a peaks.bed \
-b signal.bed \
-c 4,5 \
-o distinct,mean
Recommended Workflow
- Sort both files by chromosome and start coordinate before running
mapBed. - Decide which B columns carry the statistic you actually want to summarize.
- Choose aggregation operators that match the column type: numeric ops for numeric columns,
collapse/distinctfor labels. - Add
-s,-S,-f,-F,-r, or-eonly if overlap eligibility needs to be biologically constrained.
Guardrails
- Both inputs must be sorted by chromosome then start.
-crefers to columns in B, not A.- If you provide multiple
-ccolumns and multiple-ooperators, the counts must align unless you intentionally rely on the single-column / single-op broadcast behavior. collapsekeeps duplicates whereasdistinctremoves them.- Prefer
-hfor help; GNU-style--help/--versioncalls on these wrappers are noisy.
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 |