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)
}
Run the code above in your browser using DataLab