bedtools/bedtools_makewindows
genomics
intervals
windows
tiling
sliding
binning
genome
segments
Description
Create adjacent or sliding windows across a genome or BED file.
This tool generates genomic windows either across entire chromosomes (using a genome file)
or within specific intervals (using a BED file). Windows can be fixed-size or variable-size,
and can be non-overlapping (adjacent) or overlapping (sliding). Useful for creating
genomic bins for analysis, tiling genomes, or generating sliding windows for statistics.
Input Options
Name | Type & Properties | Description |
|---|---|---|
--genome -g | file | Genome file defining chromosome names and sizes. **Format:** Tab-delimited file with chromosome name and size **Example line:** chr1 249250621 **Usage:** Windows will be created for each chromosome in the file **Sources:** samtools faidx output or UCSC Table Browser |
--input -b | file | BED file with genomic intervals. **Format:** BED file with chrom, start, end fields (minimum) **Usage:** Windows will be created for each interval in the file **Alternative:** Use instead of genome file to create windows within specific regions |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--output | file required output | Output file with generated windows. **Format:** BED format with chromosome, start, end coordinates **Optional:** Fourth column with window names (if ID naming option used) **Sorting:** Output is sorted by chromosome and start position |
Window Size Options
Name | Type & Properties | Description |
|---|---|---|
--window_size -w | integer | Fixed window size in base pairs. **Effect:** Divide input intervals into fixed-sized windows **Units:** Base pairs (nucleotides) **Usage:** Cannot be used with --num_windows **Example:** 1000000 creates 1MB windows |
--step_size -s | integer | Step size for sliding windows in base pairs. **Default:** Same as window size (non-overlapping windows) **Effect:** Distance between start positions of consecutive windows **Usage:** Must be used with --window_size **Overlap:** Window size minus step size gives overlap amount **Example:** With -w 1000 -s 500, creates 500bp overlapping windows |
--num_windows -n | integer | Number of windows to create per input interval. **Effect:** Divide each interval into fixed number of windows **Result:** Window sizes vary to fit exactly within each interval **Usage:** Cannot be used with --window_size **Example:** 10 creates 10 equal-sized windows per interval |
ID Naming Options
Name | Type & Properties | Description |
|---|---|---|
--id_type -i | string | Add name column with specified ID type. **Options:** - `src`: Use source interval's name (requires named input intervals) - `winnum`: Use window number as ID (1, 2, 3, ...) - `srcwinnum`: Combine source name with window number (name_1, name_2, ...) **Default:** No name column (3 columns: chrom, start, end) **With option:** 4 columns including name column |
--reverse | boolean_true | Reverse window numbering order. **Effect:** Report windows in decreasing numerical order **Usage:** Only applies when --id_type includes window numbering **Example:** With 3 windows, output 3, 2, 1 instead of 1, 2, 3 **Default:** false (ascending order) |
Run this component
Run the following command to execute this component with Nextflow:
cat > params.yaml <<'EOM'
output: "$id.$key.output.bed"
id: "run"
publish_dir: "output/"
EOM
nextflow run https://packages.viash-hub.com/vsh/biobox.git \
-revision v0.4.1 \
-main-script target/nextflow/bedtools/bedtools_makewindows/main.nf \
-params-file params.yaml Relationships
Used by
0 relationships
No components use this component.
Current component
bedtools/bedtools_makewindowsbiobox v0.4.1
Uses
0 relationships
No component dependencies found.