Question: Error creating pool for permutation test (PeakPermTest)
0
gravatar for ge2sasag
13 months ago by
ge2sasag0
ge2sasag0 wrote:

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 code in yellow (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

chippeakanno permutation pool • 198 views
ADD COMMENTlink written 13 months ago by ge2sasag0

Hi Gema,

Thank you for using ChIPpeakAnno. Could you sent me the sessionInfo? I can not repeat your error on my computer. Or you can try to update all your package into nearest version.

Jianhong.

 

ADD REPLYlink written 13 months ago by Ou, Jianhong1.1k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 121 users visited in the last hour