Error creating pool for permutation test (PeakPermTest from ChipPeakAnno)
0
0
Entering edit mode
3.8 years ago
Gema Sanz ▴ 80

Hi,

I want to run permutation test to see the significance of the overlap for my chip-seq datasets. I'm following this example to remove blackspots and create the pool:

    data(HOT.spots)
    data(wgEncodeTfbsV3)
    hotGR <- reduce(unlist(HOT.spots))
    removeOl <- function(.ele){
        ol <- findOverlaps(.ele, hotGR)
        if(length(ol)>0) .ele <- .ele[-unique(queryHits(ol))]
        .ele
    }
    TAF <- removeOl(data[["TAF"]])
    TEAD4 <- removeOl(data[["Tead4"]])
    YY1 <- removeOl(data[["YY1"]])
    # we subset the pool to save demo time
    set.seed(1)
wgEncodeTfbsV3.subset <- wgEncodeTfbsV3[sample.int(length(wgEncodeTfbsV3), 2000)]
    pool <- new("permPool", grs=GRangesList(wgEncodeTfbsV3.subset), N=length(YY1))
    pt1 <- peakPermTest(YY1, TEAD4, pool=pool, seed=1, force.parallel=FALSE)
    plot(pt1)

In my case, I don't want to do any subset of wgEncodeTfbsV3, but Im getting this error when I try to do it without the subsampling step (A and B are in gRanges format):

data(HOT.spots)
data(wgEncodeTfbsV3)
hotGR <- reduce(unlist(HOT.spots))
removeOl <- function(.ele){
  ol <- findOverlaps(.ele, hotGR)
  if(length(ol)>0) .ele <- .ele[-unique(queryHits(ol))]
  .ele
}
A <- removeOl(TFA)
B <- removeOl(TFB)

set.seed(1)

pool <- new("permPool", grs=GRangesList(wgEncodeTfbsV3), N=length(B))

Error in validObject(ans) : 
  invalid class "GRanges" object: slots in class definition but not in object: "elementType"
Error during wrapup: no slot of name "elementType" for this object of class "GRanges"

Any ideas of what could be happening?

Thank you very much in advance!

Gema

permutation ChIP-Seq ChipPeakAnno • 1.4k views
ADD COMMENT

Login before adding your answer.

Traffic: 1989 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6