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,
Thanks a lot. That does indeed work.
Thanks a lot. That does indeed work.