cluster-bed
Quick Start
- Command:
clusterBed -i intervals.bed [options] - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/clusterBed - Full reference: See
references/help.md
When To Use This Tool
- Assign intervals into overlap / proximity-based clusters while preserving each original record.
- Group peaks, exons, or other features by neighborhood without collapsing them into merged coordinates.
- Keep strand-specific cluster assignment with
-s. - Expand clusters to nearby but non-overlapping features with
-d.
Common Patterns
# 1) Cluster overlapping or book-ended intervals
clusterBed \
-i peaks.bed
# 2) Cluster intervals within 1000 bp
clusterBed \
-i peaks.bed \
-d 1000
# 3) Cluster on the same strand only
clusterBed \
-i transcripts.bed \
-s
Recommended Workflow
- Use
clusterBedwhen you need cluster IDs on original records, not merged coordinates. - Set
-ddeliberately based on the biological neighborhood you want to treat as one cluster. - Add
-sonly when strand is meaningful for the feature class. - Feed the appended cluster ID into downstream grouping, summarization, or visualization steps.
Guardrails
- This tool appends a cluster ID; it does not merge records the way
mergeBeddoes. - The default
-d 0clusters overlapping and book-ended intervals together. - Cluster numbering depends on input order, so pre-sort input if you need stable IDs across reruns.
-sprevents opposite-strand records from entering the same cluster.- Prefer
-hfor help; GNU-style--help/--versioncalls on these wrappers are noisy.