bedtools/bedtools_slop
Description
Extend genomic intervals by adding flanking sequences (slop) to each feature.
bedtools slop increases the size of genomic intervals by adding a specified number
of base pairs to the start and/or end coordinates. The extension can be symmetric
(same on both sides) or asymmetric (different amounts on each side), and can be
strand-aware for directional features.
This tool is commonly used for:
Creating flanking regions around features of interest
Expanding intervals for motif discovery or regulatory analysis
Generating extended regions for ChIP-seq peak calling
Creating buffer zones around genomic features
Preparing regions for downstream intersection analysis
Converting point features to intervals with context
Inputs
Name | Type & Properties | Description |
|---|---|---|
--input -i | file required | Input file containing genomic intervals to extend. **Format:** BED, GFF, or VCF file **Content:** Genomic intervals that will be extended with flanking sequences **Requirements:** Must contain valid genomic coordinates **Usage:** Each interval will be expanded according to specified parameters |
--genome -g | file required | Genome file defining chromosome sizes for boundary constraints. **Format:** Tab-delimited text file with chromosome names and sizes **Content:** Each line contains: <chromName><TAB><chromSize> **Usage:** Prevents extended coordinates from exceeding chromosome boundaries **Creation:** Can be generated with 'samtools faidx' or UCSC Table Browser **Example format:** chr1 249250621 chr2 243199373 |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--output | file required output | Output file with extended genomic intervals. **Format:** Same format as input file **Content:** Original intervals with extended coordinates **Boundaries:** Coordinates clamped to [0, chromosome_length] range |
Extension Options
Name | Type & Properties | Description |
|---|---|---|
--both -b | double | Extend intervals by this number of base pairs in both directions. **Usage:** Symmetric extension - same amount added to start and end **Interaction:** Cannot be used together with --left and --right **Percentage mode:** When --pct is used, this becomes a fraction (e.g., 0.1 = 10%) **Boundary handling:** Results clamped to valid chromosome coordinates |
--left -l | double | Number of base pairs to subtract from the start coordinate. **Usage:** Extends the interval upstream (toward lower coordinates) **Requirement:** Must be used together with --right **Interaction:** Cannot be used with --both parameter **Percentage mode:** When --pct is used, this becomes a fraction **Strand behavior:** Modified by --strand option |
--right -r | double | Number of base pairs to add to the end coordinate. **Usage:** Extends the interval downstream (toward higher coordinates) **Requirement:** Must be used together with --left **Interaction:** Cannot be used with --both parameter **Percentage mode:** When --pct is used, this becomes a fraction **Strand behavior:** Modified by --strand option |
--strand_aware -s | boolean_true | Define left and right extensions based on feature strand. **Effect:** For negative strand features, left extends downstream, right extends upstream **Requirements:** Input must contain strand information (6th column in BED) **Usage:** Enables directional, strand-specific extension **Default:** false (extension based on coordinate direction only) |
--percentage -pct | boolean_true | Interpret extension values as fractions of feature length. **Effect:** Extension distances calculated as fraction × feature_length **Example:** -b 0.5 extends each feature by 50% of its length in each direction **Applications:** Proportional extensions, relative scaling **Default:** false (absolute base pair values) |
Output Options
Name | Type & Properties | Description |
|---|---|---|
--header | boolean_true | Include the original file header in output. **Usage:** Preserves metadata and format information from input **Applications:** Maintaining file structure, format compatibility **Formats:** Particularly useful for VCF and GFF files **Default:** false (no header included) |
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_slop/main.nf \
-params-file params.yaml Relationships
Used by
No components use this component.
Current component
Uses
No component dependencies found.