vimalinx/bio-agent / .claude/skills/closest-bed
closest-bed
VerifiedUse when you need to find the closest genomic feature in one file for each feature in another file, including distance calculations and strand-aware lookups.
closest-bed
Quick Start
- Command:
closestBed -a <A> -b <B> [options] - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/closestBed - Full reference: See
references/help.md
When To Use This Tool
- Find the nearest genomic feature in B for every feature in A.
- Report unsigned distance with
-dor signed upstream/downstream distance with-D. - Ignore overlaps and search only for nearby non-touching features with
-io. - Limit to same-strand or opposite-strand neighbors with
-s/-S. - Resolve ties or return multiple nearest hits with
-t,-k, and-mdb.
Common Patterns
# 1) Find the nearest gene for each peak with distance
closestBed \
-a peaks.bed \
-b genes.bed \
-d
# 2) Report upstream/downstream signed distance relative to A strand
closestBed \
-a peaks.bed \
-b genes.bed \
-D a \
-io
# 3) Keep the two closest same-strand hits and break ties by file order
closestBed \
-a exons.bed \
-b transcripts.bed \
-s \
-k 2 \
-t first
Recommended Workflow
- Decide whether overlapping features should count as closest; if not, add
-io. - Choose
-dfor absolute distance or-D ref|a|bif signed orientation matters biologically. - Apply
-s/-S,-iu/-id, or-fu/-fdonly after you are sure the strand and orientation model is the one you want. - Inspect cases with
none/-1output because they mean no candidate in B exists on the same chromosome.
Guardrails
-iu,-id,-fu, and-fdrequire-Dand inherit its upstream/downstream orientation rules.- Ties are reported by default; if you need one record only, set
-t firstor-t last. - With multiple B files,
-mdb eachand-mdb allproduce meaningfully different semantics. - Chromosome naming mismatches can make valid neighbors disappear silently into
none/-1results. - Prefer
-hfor help; some--help/--versioninvocations on these wrappers produce extra errors.
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: 193k | 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: 193k | 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: 193k | Updated | Claude CodeCodex | Verified | Install |