intersect_bedpe
Concepts
intersect_bedpe
is a comprehensive wrapper for bedtools intersect, designed to perform intersection operations on .bedpe files. intersect_bedpe
is a key component of the aqua_tools suite, quickly identifying properties and relationships in .bedpe files and classifying intersections for easy downstream filtering.
Vanilla
Let’s start with a simple example using one .bedpe file and one .bed file.
Understanding the output
Understanding the output of intersect_bedpe
is key. By default, the output of intersect_bedpe
is organized into channels that correspond to the upstream and downstream .bedpe feet.
One-bed intersection types
Intersection types allow for a quick assessment of the intersection output. The next 4 slides explain the 3 possible intersection types in a one-bed analysis.
Two bed intersection types
Now let’s provide intersect_bedpe
with a second .bed file. With two .bed files, -A
and -B
, we gain additional intersection types.
Multiple intersection types
Reporting intersecting .bed regions
So far, we have only been reporting intersecting .bedpe rows. With --print_bed TRUE
, we can print intersecting .bed rows instead of .bedpe.
Reporting .bedpe absences
With --absence TRUE
, intersect_bedpe
will report absences instead of intersections.
Reporting .bed absences
Boolean intersections and absences
--print_bool TRUE
returns the entire, original input .bedpe file, with two additional columns containing boolean values. This option provides a comprehensive report on intersections as well as absences.
Usage
Given a bedpe file, intersect_bedpe
prints rows of the .bedpe in standard out that intersect with rows of given .bed file(s) on either foot of the pair
Expected output:
<chr_up> <start_up> <end_up> <chr_down> <start_down> <end_down> | <intersection_up> <intersection_down>
Usage and Option Summary
intersect_bedpe -A H3K27ac -P /path/to/bedpe
(or):
intersect_bedpe -A H3K27ac -B H3K27me3 -P /path/to/bedpe
Required
Short Option | Long Option | Description |
---|---|---|
-A | --bed_A | Path to the first bed file |
-P | --bedpe | Path to the bedpe file |
Optional
Short Option | Long Option | Description |
---|---|---|
-v | --absence | If TRUE, reports those rows of the bedpe that do not intersect with rows of given bed file. Default FALSE |
-B | --bed_B | Path to the second bed file |
-f | --flank | Genome distance in bp that the bed should be in vicinity of either foot. Default is 0 |
--print_bed | If specified, reports rows of bed instead of bedpe | |
--print_bool | If TRUE, retains all rows of bedpe and prints TRUE/FALSE in new columns to indicate intersections on bedpe feet. Default FALSE | |
-h | --help | Help message |