Methylation data visualization using methyAnalysis with minfi
1
0
Entering edit mode
Adam_M • 0
@adam_m-13707
Last seen 2.5 years ago

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!

 

methylation microarray illumina minfi methyanalysis • 511 views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
1
Entering edit mode
Ou, Jianhong ★ 1.2k
@ou-jianhong-4539
Last seen 7 days ago
United States
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 COMMENT

Login before adding your answer.

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