View source: R/intervals-utils.R
| gintervals.coverage_fraction | R Documentation |
Returns the fraction of a genomic space that is covered by a set of intervals.
gintervals.coverage_fraction(intervals1 = NULL, intervals2 = NULL)
intervals1 |
set of one-dimensional intervals (the covering set) |
intervals2 |
set of one-dimensional intervals to be covered (default: NULL, meaning the entire genome) |
This function calculates what fraction of 'intervals2' is covered by 'intervals1'. If 'intervals2' is NULL, it calculates the fraction of the entire genome that is covered by 'intervals1'. Overlapping intervals in either set are automatically unified before calculation.
A single numeric value between 0 and 1 representing the fraction of 'intervals2' (or the genome) covered by 'intervals1'.
gintervals, gintervals.intersect,
gintervals.covered_bp, gintervals.all
gdb.init_examples()
# Create some intervals
intervs1 <- gscreen("dense_track > 0.15")
intervs2 <- gintervals(c("chr1", "chr2"), 0, c(100000, 100000))
# Calculate fraction of intervs2 covered by intervs1
gintervals.coverage_fraction(intervs1, intervs2)
# Calculate fraction of entire genome covered by intervs1
gintervals.coverage_fraction(intervs1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.