flank-bed
Quick Start
- Command:
flankBed -i features.bed -g genome.txt [-b <size> | -l <size> -r <size>] [options] - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/flankBed - Full reference: See
references/help.md
When To Use This Tool
- Create separate upstream and downstream flank intervals adjacent to existing features.
- Generate promoter-like or neighborhood windows around genes, peaks, or other annotations.
- Respect feature strand when translating left / right into upstream / downstream with
-s. - Define flank sizes as absolute bases or as a fraction of feature length with
-pct.
Common Patterns
# 1) Symmetric 1 kb flanks on both sides
flankBed \
-i genes.bed \
-g genome.txt \
-b 1000
# 2) Strand-aware upstream/downstream flanks
flankBed \
-i genes.bed \
-g genome.txt \
-l 2000 \
-r 500 \
-s
# 3) Flanks sized as a fraction of feature length
flankBed \
-i peaks.bed \
-g genome.txt \
-l 0.5 \
-r 0.25 \
-pct
Recommended Workflow
- Decide whether you want symmetric flanks (
-b) or distinct left / right sizes (-land-r). - Add
-swhenever left/right should be interpreted relative to biological strand. - Use
-pctonly when proportional flank size is the intended design. - Validate a few output records near chromosome starts and ends because flanks are clipped to genome boundaries.
Guardrails
-iand-gare required.- Use either
-balone or-lwith-r; do not mix the modes. flankBedcreates new adjacent intervals; it does not extend the original interval in place likeslopBed.- Starts are clamped to
0and ends are clamped to chromosome length from the genome file. - Prefer
-hfor help; GNU-style--help/--versioncalls on these wrappers are noisy.