bedtools/bedtools_overlap
Description
Compute the amount of overlap or distance between genomic features.
bedtools overlap computes the amount of overlap (positive values) or distance
(negative values) between genome features and reports the result at the end of
the same line. This tool is useful for quantifying the precise overlap between
features from different datasets or for measuring distances between nearby elements.
This tool is commonly used for:
Quantifying overlap between ChIP-seq peaks and genes
Measuring distances between regulatory elements
Computing precise overlap metrics for comparative genomics
Quality control of feature intersection analyses
Post-processing results from bedtools window operations
Inputs
Name | Type & Properties | Description |
|---|---|---|
--input -i | file required | Input file containing genomic features for overlap computation. **Format:** Tab-delimited file (typically from bedtools window output) **Content:** Lines with genomic coordinates for which overlap should be computed **Usage:** Each line should contain start/end coordinates for two features **Requirements:** Must contain the specified columns for coordinate extraction **Special:** Use "stdin" for piped input from other bedtools commands |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--output | file required output | Output file with overlap/distance values appended. **Format:** Same as input with additional overlap column **Content:** Original lines plus computed overlap (positive) or distance (negative) **Values:** Positive numbers indicate overlap, negative indicate distance **Position:** Overlap value is appended as the last column |
Options
Name | Type & Properties | Description |
|---|---|---|
--cols | string required | Specify columns (1-based) for start and end coordinates of features. **Format:** Comma-separated list: start1,end1,start2,end2 **Usage:** Defines which columns contain the coordinates for overlap calculation **Order:** Must be in the exact order: start1,end1,start2,end2 **Example:** "2,3,6,7" for typical bedtools window output **Requirements:** All specified columns must exist in the input |
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.2 \
-main-script target/nextflow/bedtools/bedtools_overlap/main.nf \
-params-file params.yaml Relationships
Used by
No components use this component.
Current component
Uses
No component dependencies found.