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
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?
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:
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
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
Bruce.
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:
Many thanks for your help, Rahel