Question: Methylation data visualization using methyAnalysis with minfi
0
gravatar for Adam_M
7 months ago by
Adam_M0
Adam_M0 wrote:

Hello,

I'd like to perform some nice visualization of my methylation data - Illumina EPIC array. I analyze my data using minfi package, so at the end I have GenomicRatioSet, MethylSet and other.

The problem is MethyGenoSet object which ios hard to obtain... Of course there is an easy way, jus analyze your data with methylumi then convert your normalized set to get MethyGenoSet object. Unfortunately methylumi  package doesn't support EPIC array - so far. What is more, some errors occured with normalization using this package... Then I decided to stay with minfi which works nice.

So what I did so far:

 

gmset <- preprocessIllumina(RGSet, bg.correct = TRUE, normalize = "controls") #normalization with illumina function (methyl set as output)
gmset <- mapToGenome(gmset) #(genomic methylset)

yyy <- MethyGenoSet(rowRanges(gmset), getBeta(gmset), getMeth(gmset), getUnmeth(gmset)) #attempt to create this object
Error in `rownames<-`(`*tmp*`, value = .get_colnames_from_assays(assays)) : 
  invalid rownames length

 

I'll be grateful fo arny suggestions how to solve this issue.

Thanks!

 

ADD COMMENTlink modified 7 months ago by Ou, Jianhong1.1k • written 7 months ago by Adam_M0

Why do you need a MethyGenoSet to visualize your data? What exactly does 'visualize' mean in this context?

ADD REPLYlink written 7 months ago by James W. MacDonald50k
Answer: Methylation data visualization using methyAnalysis with minfi
1
gravatar for Ou, Jianhong
7 months ago by
Ou, Jianhong1.1k
United States
Ou, Jianhong1.1k wrote:
You can have a try with:
asy <- assays(gmset)
asy[["exprs"]] <- getBeta(gmset)
names(asy) <- c("methylated", "unmethylated", "exprs")
yyy <- MethyGenoSet(rowRanges=rowRanges(gmset), assays=asy, pData=colData(gmset))

 

If you just want to see the signals, maybe you want to have a try with trackViewer to visualization your methylation data.

Here is some sample codes:

rr <- rowRanges(gmset)

Meth <- assays(gmset)$Meth

Unmeth <- assays(gmset)$Unmeth

samples <- colnames(Meth)

library(trackViewer)

tks <- sapply(samples, function(.ele) {
me <- um <- rr
me$score <- Meth[, .ele]
um$score <- Unmeth[, .ele]
new("track", dat=me, dat2=um, name=.ele, type="data", format="BED")
})

gr <- GRanges("chr1", IRanges(15800, 15900))
viewTracks(trackList(trs), gr=gr)

 

ADD COMMENTlink modified 7 months ago • written 7 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: 307 users visited in the last hour