peakPermTest

0th

Percentile

Permutation Test for two given peak lists

Performs a permutation test to seee if there is an association between two given peak lists.

Keywords
misc
Usage
peakPermTest(peaks1, peaks2, ntimes=100, seed=as.integer(Sys.time()), mc.cores=getOption("mc.cores", 2L), maxgap=0L, pool, TxDb, bindingDistribution, bindingType=c("TSS", "geneEnd"), featureType=c("transcript", "exon"), seqn=NA, ...)
Arguments
peaks1, peaks2
an object of GRanges
ntimes
number of permutations
seed
random seed
mc.cores
The number of cores to use. see mclapply
maxgap
See findOverlaps in the IRanges package for a description of these arguments.
pool
an object of permPool
TxDb
an object of TxDb
bindingDistribution
an object of bindist
bindingType
where the peaks should bind, TSS or geneEnd
featureType
what annotation type should be used for detecting the binding distribution.
seqn
default is NA, which means not filter the universe pool for sampling. Otherwise the universe pool will be filtered by the seqnames in seqn.
...
further arguments to be passed to numOverlaps.
Value

A list of class permTestResults. See permTest

References

Davison, A. C. and Hinkley, D. V. (1997) Bootstrap methods and their application, Cambridge University Press, United Kingdom, 156-160

See Also

preparePool, bindist

Aliases
  • peakPermTest
Examples
    path <- system.file("extdata", package="ChIPpeakAnno")
    #files <- dir(path, pattern="[12]_WS170.bed", full.names=TRUE)
    #peaks1 <- toGRanges(files[1], skip=5)
    #peaks2 <- toGRanges(files[2], skip=5)
    #peakPermTest(peaks1, peaks2, TxDb=TxDb.Celegans.UCSC.ce6.ensGene)
    if(interactive()){
        peaks1 <- toGRanges(file.path(path, "MACS2_peaks.xls"), 
                            format="MACS2")
        peaks2 <- toGRanges(file.path(path, "peaks.narrowPeak"), 
                            format="narrowPeak")
        library(TxDb.Hsapiens.UCSC.hg19.knownGene)
        peakPermTest(peaks1, peaks2, 
               TxDb=TxDb.Hsapiens.UCSC.hg19.knownGene, min.pctA=10)
    }
Documentation reproduced from package ChIPpeakAnno, version 3.6.5, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.