bed_coverage | R Documentation |
Compute coverage of intervals.
bed_coverage(x, y, ...)
x |
ivl_df |
y |
ivl_df |
... |
extra arguments (not used) |
input tbls are grouped by chrom
by default, and additional
groups can be added using dplyr::group_by()
. For example,
grouping by strand
will constrain analyses to the same strand. To
compare opposing strands across two tbls, strands on the y
tbl can
first be inverted using flip_strands()
.
ivl_df with the following additional columns:
.ints
number of x
intersections
.cov
per-base coverage of x
intervals
.len
total length of y
intervals covered by x
intervals
.frac
.len
scaled by the number of y
intervals
Book-ended intervals are included in coverage calculations.
https://bedtools.readthedocs.io/en/latest/content/tools/coverage.html
Other multiple set operations:
bed_closest()
,
bed_intersect()
,
bed_map()
,
bed_subtract()
,
bed_window()
x <- tibble::tribble(
~chrom, ~start, ~end, ~strand,
"chr1", 100, 500, "+",
"chr2", 200, 400, "+",
"chr2", 300, 500, "-",
"chr2", 800, 900, "-"
)
y <- tibble::tribble(
~chrom, ~start, ~end, ~value, ~strand,
"chr1", 150, 400, 100, "+",
"chr1", 500, 550, 100, "+",
"chr2", 230, 430, 200, "-",
"chr2", 350, 430, 300, "-"
)
bed_coverage(x, y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.