Binomial test for genomic overlaps of two bed files
Final script I wrote in a series - genomic overlaps - performs binomial statistical test using two bed files with genomic coordinates. This is a combined bash/R script that will generate a binomial p-value that shows significance for the overlap of two sets of genomic regions in hg19 human genome (for example from ChIP-Seq experiments).
To calculate binomial p-value you would need two bed files as inputs. Note that binomial test does not require background set as do Fisher and hypergeometric tests.