Calculate Fisher's test on number of intervals that are shared and unique between two sets of x and y intervals.

bed_fisher(x, y, genome)

Arguments

x

tbl_interval()

y

tbl_interval()

genome

tbl_genome()

Value

tbl_interval()

Details

Interval statistics can be used in combination with dplyr::group_by() and dplyr::do() to calculate statistics for subsets of data. See vignette('interval-stats') for examples.

See also

Examples

genome <- read_genome(valr_example('hg19.chrom.sizes.gz')) x <- bed_random(genome, seed = 1010486) y <- bed_random(genome, seed = 9203911) bed_fisher(x, y, genome)
#> estimate p.value conf.low conf.high method #> 1 2.345878 0 2.331851 2.360146 Fisher's Exact Test for Count Data #> alternative #> 1 two.sided