Obtaining annotated results from rnbeads
1
0
Entering edit mode
Mark Dunning ★ 1.1k
@mark-dunning-3319
Last seen 21 months ago
Sheffield, Uk

I'm trying to use rnbeads to analyse some EPIC methylation arrays. I'm calling the functions individually, rather than running the single report script, so that I have more control over the differential analysis.

I use this code to perform differential methylation and export tables

rnb.set <- rnb.execute.import(data.source = "idats", data.type = "idat.dir")
rnb.set.unfiltered <- rnb.set
result <- rnb.run.preprocessing(rnb.set.unfiltered, dir.reports=report.dir)
rnb.set <- result$rnb.set

# Specify the sample annotation table columns for which
# differential methylation is to be computed
cmp.cols <- "Sample_Group"
# Specify the region types
reg.types <- c("genes", "promoters")
# Conduct the analysis
 diffmeth <- rnb.execute.computeDiffMeth(rnb.set, cmp.cols,
region.types=reg.types)

comparison <- get.comparisons(diffmeth)[1]
tab.genes <- get.table(diffmeth, comparison, "genes", return.data.frame=TRUE)
tab.prom <- get.table(diffmeth, comparison, "promoters", return.data.frame=TRUE)
write.csv(tab.genes, file="Genes_Sample_Group.csv",row.names=FALSE)
write.csv(tab.prom, file="Promoters_Sample_Group.csv",row.names=FALSE)

However, the resulting tables don't contain any useful identifiers (e.g. gene symbol) only a row number. How can I add annotation to these tables? There must be a function somewhere because the tables generated by the report (which I did run once) had annotation

Thanks,

rnbeads EPIC • 1.5k views
ADD COMMENT
1
Entering edit mode
mscherer ▴ 50
@mscherer-19737
Last seen 2.8 years ago
Spain/Barcelona/Centre for Genomic Regu…

Dear Mark,

That is easily solved. The obtained results have the same dimension as the methylation and annotation matrices stored in the rnb.set object. You can access this information using:

anno.genes <- annotation(rnb.set,"genes")
anno.proms <- annotation(rnb.set,"promoters")

This includes all the information you need, like gene symbol, genomic location or Ensembl/Entrez ID. You can obtain the methylation matrix using:

meth.matrix <- meth(rnb.set,"genes/promoters")

Hope that helps!

ADD COMMENT
0
Entering edit mode

Thanks a lot. That does indeed work.

ADD REPLY
0
Entering edit mode

Thanks a lot. That does indeed work.

ADD REPLY

Login before adding your answer.

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