[ReportingTools] HTMLReport of DESeq2 results using Ensembl Gene Ids
Entering edit mode
Jason Hackney ▴ 160
Last seen 7.7 years ago
Hi Dimitra, There are a couple of ways to do this using ReportingTools. Probably the easiest way is to write a short function that will collect the annotations of interest from the biomart and pass that function on to the publish call in the .modifyDF parameter. Here's a mock-up that I would use for the annotation function: ## Assuming that you already have a mart and that the rownames of your ## data set are Ensembl gene IDs add.anns <- function(df, mart, ...) { nm <- rownames(df) anns <- getBM( attributes = c("ensembl_gene_id", "hgnc_symbol", "description"), filters = "ensembl_gene_id", values = nm, mart = mart) anns <- anns[match(nm, anns[, 1]), ] colnames(anns) <- c("ID", "Gene Symbol", "Gene Description") df <- cbind(anns, df[, 2:nrow(df)]) rownames(df) <- nm df } And here's the relevant portion of the publish call that you might make to take advantage of this function: publish(DESeqDS, htmlReport, .modifyDF = list(add.anns, modifyReportDF), mart = mart) You'll want to include the default modifyReportDF method to get the automatic plot generation. Hope that helps, Jason On Dec 11, 2013, at 6:45 AM, Dimitra Alexopoulou wrote: > Dear Jason and Gabriel, > > I have just started using ReportingTools and I have successfully created an HTMLReport of my DESeq2 results. > Since I'm mainly working with Ensembl Gene Ids and not with Entrez, I was wondering how it would be possible to publish the data showing not only the Ensembl Gene Ids, but also the gene abbreviation or the gene description (as can be done when working with Entrez). > I can get these through biomaRt, but I don't know how I should integrate this into the publish function. > So far I can either have the following columns on my html output: > > 1. when I publish the DESeqDataSet: > ID(my own Ensembl Gene Ids) Image logFC p-Value Adjusted p-Value > > 2. when I publish a data frame: > ID(my own Ensembl Gene Ids) external_gene_id entrezgene description > > Ideally, I would like to have the following: > ID(my own Ensembl Gene Ids) Gene Abbreviation Gene Description Image logFC p-Value Adjusted p-Value > > Is there a way to publish the DESeqDataSet by using as annotation.db one containing Ensembl Gene Id centered information? > Or do I need to convert the DESeqDataSet to a data.frame, add the additional biomaRt information, and then convert this new data.frame into a new DESeqDataSet (which I'm not even sure if it is possible)? > > Thanks in advance, > Dimitra > > > -- > Dimitra Alexopoulou, PhD > Deep Sequencing Group - SFB655 > Affiliation: > DFG Research Center for Regenerative Therapies (CRTD) > Biotechnology Center (Biotec) > Technische Universität Dresden > > + + + New address and phone + + + > > Deep Sequencing Group - SFB655 > c/o > DFG-Center for Regenerative Therapies Dresden > Cluster of Excellence / TU Dresden > Fetscherstraße 105 > 01307 Dresden > > Phone: +49 (351) 458 82362 > Email: dimitraa(at)biotec.tu-dresden.de > Web: http://www.biotec.tu-dresden.de/ > > we are supported by: > SFB 655, CRTD, Biotec, EU FP7, EFRE > -- Jason A. Hackney, Ph.D. Bioinformatics and Computational Biology Genentech, Inc. hackney.jason@gene.com 650-467-5084 [[alternative HTML version deleted]]
Sequencing Annotation convert biomaRt ReportingTools DESeq2 Sequencing Annotation convert • 2.5k views
Entering edit mode
Last seen 2.6 years ago
United Kingdom

This is a great solution and it took me far too long to track down why it wasn't working! 

Change the line:

df <- cbind(anns, df[, 2:nrow(df)])​


df <- cbind(anns, df[, 2:ncol(df)])

Login before adding your answer.

Traffic: 194 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6