bedtools/bedtools_flank
genomics
intervals
flank
upstream
downstream
flanking
regions
Description
Create flanking intervals for each genomic feature.
This tool generates new intervals representing the regions immediately
upstream and/or downstream of existing genomic features. Unlike slop which
extends existing intervals, flank creates entirely new intervals from the
flanking regions.
Inputs
Name | Type & Properties | Description |
|---|---|---|
--input -i | file required | Input file with genomic intervals. **Format:** BED, GFF, VCF file with genomic intervals **Usage:** Features for which flanking regions will be created |
--genome -g | file required | Genome file defining chromosome sizes. **Format:** Tab-delimited file with chromosome name and size **Purpose:** Prevents flanks from extending beyond chromosome boundaries **Example:** chr1\t249250621 **Tip:** Can use samtools faidx output (.fai file) |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--output | file required output | Output file with flanking intervals. Contains new intervals representing the flanking regions of the input features. |
Flanking Options
Name | Type & Properties | Description |
|---|---|---|
--both -b | string | Create flanking intervals using specified distance in both directions. **Input:** Integer (base pairs) or Float (if used with --pct) **Effect:** Creates flanks of equal size upstream and downstream **Example:** "1000" creates 1kb flanks on both sides **Mutually exclusive:** Cannot use with --left or --right |
--left -l | string | Distance for left/upstream flank from original start coordinate. **Input:** Integer (base pairs) or Float (if used with --pct) **Strand-aware:** When used with --strand, respects feature orientation **Example:** "500" creates 500bp upstream flank **Requires:** Must be used together with --right |
--right -r | string | Distance for right/downstream flank from original end coordinate. **Input:** Integer (base pairs) or Float (if used with --pct) **Strand-aware:** When used with --strand, respects feature orientation **Example:** "300" creates 300bp downstream flank **Requires:** Must be used together with --left |
Flanking Behavior
Name | Type & Properties | Description |
|---|---|---|
--strand -s | boolean_true | Define left and right flanks based on strand orientation. **Effect:** For negative-strand features, left becomes downstream **Example:** -l 500 on minus strand starts flank 500bp downstream **Default:** false (ignore strand) |
--percent -pct | boolean_true | Define flanking distances as fraction of feature length. **Effect:** Distances become proportional to feature size **Example:** -l 0.5 on 1000bp feature creates 500bp upstream flank **Input format:** Use decimals (e.g., "0.1" for 10%) **Default:** false (absolute base pairs) |
Output Options
Name | Type & Properties | Description |
|---|---|---|
--header | boolean_true | Print header from input file prior to results. **Effect:** Preserves original file header in output **Default:** false |
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.0 \
-main-script target/nextflow/bedtools/bedtools_flank/main.nf \
-params-file params.yaml Relationships
Used by
0 relationships
No components use this component.
Current component
bedtools/bedtools_flankbiobox v0.4.0
Uses
0 relationships
No component dependencies found.