how to define and save hyper/hypo methylated data in RnBeads
0
0
Entering edit mode
7.7 years ago
rahel14350 ▴ 40

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:

>library(RnBeads.hg19)
>data(small.example.object)
>logger.start(fname=NA)
>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

RnBeads 450k infinnium methylation hyper/hypo • 2.3k views
ADD COMMENT
1
Entering edit mode

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 REPLY
0
Entering edit mode

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 as.data.frame.default(x[[i]], optional = TRUE) : 
  cannot coerce class "structure("GOHyperGResult", package = "GOstats")" to a data.fra

me

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 REPLY
1
Entering edit mode

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),]

Bruce.

ADD REPLY
0
Entering edit mode

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 REPLY

Login before adding your answer.

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