random-bed
Quick Start
- Command:
randomBed -g genome.txt [-l length] [-n count] [-seed int] - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/randomBed - Full reference: See
references/help.md
When To Use This Tool
- Generate simple random genomic intervals from a genome definition.
- Build background interval sets for simulations or quick null distributions.
- Produce many fixed-length windows without reference to an input BED file.
- Create reproducible random sets with
-seed.
Common Patterns
# 1) Generate 10,000 random 500 bp intervals
randomBed \
-g genome.txt \
-l 500 \
-n 10000 > random.bed
# 2) Reproducible random intervals
randomBed \
-g genome.txt \
-l 1000 \
-n 5000 \
-seed 42 > random.seed42.bed
# 3) Use a FASTA index as genome source
randomBed \
-g reference.fa.fai \
-l 200 \
-n 1000
Recommended Workflow
- Build a valid genome file first, typically from a FASTA
.fai. - Set interval length and count explicitly rather than relying on defaults.
- Add
-seedfor reproducibility if the output will be reused or published. - Filter or post-process the output afterward if you need exclusion masks, chromosome preservation, or non-overlap constraints.
Guardrails
-gis required.- Defaults are surprisingly large: 100 bp intervals and 1,000,000 records.
randomBedis unconstrained random generation; if you need exclusion masks or same-chromosome shuffling of an existing BED set, useshuffleBedinstead.- The genome file is tab-delimited chromosome name plus size; a FASTA
.faiworks because bedtools reads only the first two columns. - Prefer
-hfor help; GNU-style--help/--versioncalls on these wrappers are noisy.