permutation test against intervals
2
2
Entering edit mode
Last seen 7.4 years ago
United States

Is there an existing R pkg for permutation analysis against two sets of generic genomic intervals to test for overlap significance ?
example

data 1
chr17    13744637    13746050
chr17    13743740    13744353
chrX    121306079    121310254
chr6    29698013    29699095
data 2
chr17    39979302    39984515
chr1    24619832    24620150
chr2    22444767    22445384
chr16    57391265    57391873
chr3    19527416    19529673

R pkg • 1.3k views
4
Entering edit mode
bgel ▴ 30
@bgel-7889
Last seen 5.4 years ago
Spain

Our package regioneR was included in the latest version of Bioconductor and is designed specifically to do that using permutation tests.

Assuming data1 and data2 are data.frames you can do something like:

pt <- overlapPermTest(A=data1, B=data2, ntimes=100) plot(pt)

This will perform a permutation test by creating 100 randomizations of data1 and testing their overlap with data2. Finally, plot(pt) will create a plot with the distribution of the permuted region sets and your original one. By default it assumes that you are working with the human genome and it will use a default mask (centromeres, etc...), but you can change that with the genome and mask parameters.

overlapPermTest is a convenience function to evaluate the overlap between two sets of regions, but regioneR includes other evaluation functions (distance between regions, for example) and different randomization strategies so it is possible to adapt it to your specific needs.

We'll be glad to help if there is any question on how to use it :)

0
Entering edit mode
@gordon-smyth
Last seen 3 minutes ago
WEHI, Melbourne, Australia

Originally I suggested the wilcox.test, but I now see that your problem is more complex than a two sets of numbers.

It doesn't seem to me that you have spelled out the nature of the data or the hypothesis you wish to test in enough detail for a meaningful solution to be proposed.