Question: Error creating pool for permutation test (PeakPermTest from ChipPeakAnno)
0
gravatar for Gema Sanz
13 months ago by
Gema Sanz70
Karolinska Institutet
Gema Sanz70 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 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

ADD COMMENTlink written 13 months ago by Gema Sanz70
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 2.3.0
Traffic: 509 users visited in the last hour