View source: R/bed_genomecov.R
bed_genomecov | R Documentation |
This function is useful for calculating interval coverage across an entire genome.
bed_genomecov(x, genome, zero_depth = FALSE)
x |
ivl_df |
genome |
genome_df |
zero_depth |
If TRUE, report intervals with zero depth. Zero depth intervals will be reported with respect to groups. |
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 an additional column:
.depth
depth of interval coverage
https://bedtools.readthedocs.io/en/latest/content/tools/genomecov.html
Other single set operations:
bed_cluster()
,
bed_complement()
,
bed_flank()
,
bed_merge()
,
bed_partition()
,
bed_shift()
,
bed_slop()
x <- tibble::tribble(
~chrom, ~start, ~end, ~strand,
"chr1", 20, 70, "+",
"chr1", 50, 100, "-",
"chr1", 200, 250, "+",
"chr1", 220, 250, "+"
)
genome <- tibble::tribble(
~chrom, ~size,
"chr1", 500,
"chr2", 1000
)
bed_genomecov(x, genome)
bed_genomecov(dplyr::group_by(x, strand), genome)
bed_genomecov(dplyr::group_by(x, strand), genome, zero_depth = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.