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

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 • 2.2k views
ADD COMMENT
0
Entering edit mode
2.4 years ago
hukai916 ▴ 10

Sorry for the late reply!

Have you tried the latest version (v3.31.1) of ChIPpeakAnno? The example code on the latest manual does not subset wgEncodeTfbsV3 and it works fine: vignettes

BTW, for Bioconductor package questions, pls go to Bioconductor Support Site, which is actively monitored by developers.

ADD COMMENT

Login before adding your answer.

Traffic: 1667 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