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
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.