How to change "CompressedGRangesList" to "GRangesList"
0
0
Entering edit mode
3 months ago
Aki ▴ 10

Hi, I am trying to A/B compartment analysis with minfi, but I got following error.

Error in { : 
task 1 failed - "is(object, "SummarizedExperiment") is not TRUE"

Since I want to use data with hg38 annotation but makeGenomicRatioSetFromMatrix function has only ilmn12.hg19, I did makeGenomicRatioSetFromMatrix function with ilmn12.hg19 and liftOver with hg19ToHg38.over.chain which I get in UCSC, and did compartment analysis as below.

library(rtracklayer)
library(minfi)
chain=import.chain("hg19ToHg38.over.chain") 
GRset <- makeGenomicRatioSetFromMatrix(mat = betas.matrix, # I got betas.matrix by "TCGAbiolinks" function
                                   array = "IlluminaHumanMethylation450k", 
                                   annotation = "ilmn12.hg19",
                                   what = "Beta")
GRset_hg38 <- liftOver(GRset,chain)
compartments_list <- foreach(chr = 1:22, .packages = "minfi") %dopar% {
compartments_result <- compartments(GRset_hg38, chr = paste0("chr", chr), what = "OpenSea", resolution = 100 * 1000)
}

Since makeGenomicRatioSetFromMatrix function creates the object GRangesList, but I got the object CompressedGRangesList after liftOver, I suggest it could work if I use GRangesList. But I don't know how to convert. Does anybody know the solution? Thanks.

liftOver minfi • 378 views
ADD COMMENT
0
Entering edit mode

It's asking for a SummarizedExperiment which is a separate object type from GenomicRanges. See the documentation for more information.

ADD REPLY
0
Entering edit mode

Thanks, rpolicastro. I convert object type to SummarizedExperiment, but I got following error. but I don't have idea to getting class 'GenomicMethylSet' or 'GenomicRatioSet' of my dataset.

object is of class 'RangedSummarizedExperiment', but needs to be of class 'GenomicMethylSet' or 'GenomicRatioSet'
ADD REPLY

Login before adding your answer.

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