Description Usage Arguments Value Note See Also Examples
View source: R/overlapPermTest.R
Performs a permutation test to see if the overlap between two sets of regions
A and B is higher (or lower) than expected by chance. It will internally
call permTest with the appropiate parameters to perform the
permutation test. If B is a list or a GRangesList, it will perform one
permutation test per element of the list, testing the overlap between
A and each element of B independently.
1 | overlapPermTest (A, B, alternative="auto", ...)
|
A |
a region set in any of the accepted formats by |
B |
a region set in any of the accepted formats by |
alternative |
the alternative hypothesis must be one of |
... |
further arguments to be passed to or from methods. |
A list of class permTestResults containing the following components:
pval the p-value of the test.
ntimes the number of permutations.
alternative a character string describing the alternative hypotesis.
observed the value of the statistic for the original data set.
permuted the values of the statistic for each permuted data set.
zscore the value of the standard score. (observed-mean(permuted))/sd(permuted)
IMPORTANT: Since it uses link{permTest} internally, it
is possible to use most of the parameters of that function in
overlapPermTest, including: ntimes, force.parallel,
min.parallel and verbose. In addition, this function
accepts most parameters of the randomizeRegions function
including genome, mask, allow.overlaps and
per.chromosome and the parameters of numOverlaps such
as count.once.
overlapGraphicalSummary, overlapRegions, toDataframe, toGRanges, permTest
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | genome <- filterChromosomes(getGenome("hg19"), keep.chr="chr1")
A <- createRandomRegions(nregions=20, length.mean=10000000, length.sd=20000, genome=genome, non.overlapping=FALSE)
B <- c(A, createRandomRegions(nregions=10, length.mean=10000, length.sd=20000, genome=genome, non.overlapping=FALSE))
pt <- overlapPermTest(A=A, B=B, ntimes=10, genome=genome, non.overlapping=FALSE, verbose=TRUE)
summary(pt)
plot(pt)
plot(pt, plotType="Tailed")
C <- c(B, createRandomRegions(nregions=10, length.mean=10000, length.sd=20000, genome=genome, non.overlapping=FALSE))
pt <- overlapPermTest(A=A, B=list(B=B, C=C), ntimes=10, genome=genome, non.overlapping=FALSE, verbose=TRUE)
summary(pt)
plot(pt)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.