Question: how to define and save hyper/hypo methylated data in RnBeads
gravatar for rahel14350
3.2 years ago by
United States
rahel1435030 wrote:

Dear all,

I used RnBeads for 450k infinium data analysis. I want to get hyper/hypo methylated data in separate outputs. I defined them by these codes here, but I could not put them in separate data.frame. Can anyone help me and also tell me if these codes are correct? here is the codes:

>dm <- rnb.execute.computeDiffMeth(rnb.set.example,pheno.cols=c("Sample_Group","Treatment"))
>dmt <- get.table(dm,get.comparisons(dm)[1],"promoters")
>annot <- annotation(rnb.set.example,"promoters")
>all.promoters <- annot$entrezID
#get the hypermethylated promoters
>hyper.promoters <- annot$entrezID[dmt[,"mean.mean.diff"]>0]
>result <- performGOenrichment.diffMeth.entrez(hyper.promoters,all.promoters,"BP",assembly="hg19")
>hypo.promoters <- annot$entrezID[dmt[,"mean.mean.diff"]<0]
>result <- performGOenrichment.diffMeth.entrez(hypo.promoters,all.promoters,"BP",assembly="hg19")

Many thanks in advance

ADD COMMENTlink modified 3.2 years ago • written 3.2 years ago by rahel1435030

You define 'result' twice, so it only holds hypo.promoters in the end. Try result.hypo, result.hyper.

As a more general answer, try using meth() function to get beta values into a data.frame, then subset those using the hyper.promoters probes/rownames?

ADD REPLYlink modified 3.2 years ago • written 3.2 years ago by bruce.moran790

Dear bruce.moran,

The problem with the codes above is that I can not put result.hyper and hyper.promoters in one data frame and I will get this error:

> hyper_dmrs_prom <- data.frame(result.hyper, hyper.promoters)
Error in[[i]], optional = TRUE) : 
  cannot coerce class "structure("GOHyperGResult", package = "GOstats")" to a data.fra


I already have the beta values. I am new in 450k analysis using RnBeads. Do you mean I subset the hyper/hypo methylated from beta value >< 0.01? Is that correct? or do you recommend other packages?

Many thanks for your reply, Rahel

ADD REPLYlink modified 3.2 years ago by WouterDeCoster43k • written 3.2 years ago by rahel1435030

Hi Rahel,

I didn't realise you just copy/pasted the code from the help for performGOenrichment.diffMeth.entrez(), I thought that was your own code that you had written/used. That code is for Gene Ontology enrichment analysis so probably not what you want. I think you probably just want to define hyper and hypo probes based on the differential methylation results from RnBeads(?). From the example data you can subset based on results from the 'dmt' data.frame, so if you have a 'methMatrix' of all beta values and want to define hyper and hypo methylated probes as in the code you posted

hyper.beta<-methMatrix[rownames(methMatrix) %in% rownames(dmt[,'mean.mean.diff']>0),]


ADD REPLYlink modified 3.2 years ago • written 3.2 years ago by bruce.moran790

Dear bruce.moran,

Yes, you are right. I was looking in RnBeads R documentation to find out how define the hyper/hypo methylated sites, I reached to those commands. anyways, I tried it with your command, but the output is empty. When I check the dmt table many of the sites has mean.mean.diff'>0. Then I ran the commands below and it worked for me:

select_genes<-rownames(subset(anno_dmrs_prom, mean.mean.diff > 0)) mat<-meth(rnb.set.stdcontsnsxpfil, type="promoters", row.names=TRUE)[select_genes,]

Many thanks for your help, Rahel

ADD REPLYlink modified 3.2 years ago • written 3.2 years ago by rahel1435030
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1145 users visited in the last hour