Skip to contents

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

Usage

bed_fisher(x, y, genome)

Arguments

x

ivl_df

y

ivl_df

genome

genome_df

Value

ivl_df

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.

Examples

genome <- read_genome(valr_example("hg19.chrom.sizes.gz"))

x <- bed_random(genome, n = 1e4, seed = 1010486)
y <- bed_random(genome, n = 1e4, seed = 9203911)

bed_fisher(x, y, genome)
#> # A tibble: 1 × 6
#>   estimate p.value conf.low conf.high method                   alternative
#>      <dbl>   <dbl>    <dbl>     <dbl> <chr>                    <chr>      
#> 1    0.945   0.707    0.722      1.22 Fisher's Exact Test for… two.sided