shift-bed
Quick Start
- Command:
shiftBed -i <bed/gff/vcf> -g <genome> -s <int> - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/shiftBed - Full reference: See
references/help.md
When To Use This Tool
- Translate intervals left or right along the genome by a fixed distance.
- Shift plus- and minus-strand features by different amounts with
-pand-m. - Express shifts as a fraction of feature length with
-pct. - Create offset control regions or adjust reported interval centers while preserving interval width.
Common Patterns
# 1) Shift every interval 100 bp
shiftBed \
-i peaks.bed \
-g genome.sizes \
-s 100
# 2) Shift plus and minus strands in opposite directions
shiftBed \
-i transcripts.bed \
-g genome.sizes \
-p 500 \
-m -500
# 3) Shift by 10% of each feature length
shiftBed \
-i intervals.bed \
-g genome.sizes \
-s 0.10 \
-pct
Recommended Workflow
- Prepare a genome file (or FASTA
.fai) so bedtools can clamp shifted features to chromosome bounds. - Decide whether the shift is uniform with
-sor strand-specific with-pand-m. - Decide whether values are absolute base pairs or fractions of feature length via
-pct. - Inspect the output for boundary clipping at chromosome starts and ends before using it in downstream analysis.
Guardrails
-iand-gare both required.- Use either
-salone or-ptogether with-m; those modes are mutually exclusive. - With
-pct, values like0.10mean 10% of feature length, not 0.10 bp. - Starts are clipped to 0 and ends are clipped to chromosome length when a shift would move a feature out of bounds.
- Prefer
-hfor help; GNU-style--helpand--versionemit wrapper errors before usage text.