Dear all,
I would like to manually extract differential methylation data tables from RnBDiffMeth object. By the "data table" I mean a table in which I have both genomic region annotations and corresponding methylation statistics (such tables are normally attached in report generated by rnb.run.differential function).
I have created RnBDiffMeth object using command:
regions <- rnb.execute.computeDiffMeth(
x = Inference_result$rnb.set,
pheno.cols = c("i_vs_c", "b_vs_rest", "b_vs_c", "i_vs_rest", "e_vs_c"),
region.types = c("tiling", "cpgislands", "genes", "promoters", "tiling200bp")
columns.adj = rnb.getOption("covariate.adjustment.columns"),
adjust.sva = rnb.getOption("differential.adjustment.sva"),
pheno.cols.adjust.sva = rnb.getOption("inference.targets.sva"))
To extract data tables from this object, I have tried functions exportDMRs2regionFile (which does not generate statistical data) and get.table (which, as far as I see, has only "orphaned" statistics, with no key which would allow me to match these statistics to corresponding genomic region). Is there a way to annotate get.table with genomic data?
I am doing this as a way to learn the RnBeads package to find a solution or workaround for another issue Im having.
Best, Adrian
1 answer
Hi Adrian, the get.table() method returns the differential statistics you are looking for. If you want to add the region annotation data, you can extract this from your RnBSet object using
regionAnnot <- annotation(rnb.set)
This will return a table with exactly the same row ordering as get.table() if you use the corresponding RnBSet object, that you used for differential methylation computation.
Hope that helps.
Best, Fabian
Log in to answer this question.