`R/bed_fisher.r`

`bed_fisher.Rd`

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)

x | |
---|---|

y | |

genome |

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.

http://bedtools.readthedocs.org/en/latest/content/tools/fisher.html

Other interval statistics: `bed_absdist`

,
`bed_jaccard`

, `bed_projection`

,
`bed_reldist`

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)#> # A tibble: 1 x 6 #> estimate p.value conf.low conf.high method alternative #> <dbl> <dbl> <dbl> <dbl> <chr> <chr> #> 1 2.37 0 2.36 2.39 Fisher's Exact Test for Coun… two.sided