Question: [ReportingTools] HTMLReport of DESeq2 results using Ensembl Gene Ids
gravatar for Jason Hackney
6.0 years ago by
Jason Hackney160
Jason Hackney160 wrote:
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) > Web: > > we are supported by: > SFB 655, CRTD, Biotec, EU FP7, EFRE > -- Jason A. Hackney, Ph.D. Bioinformatics and Computational Biology Genentech, Inc. 650-467-5084 [[alternative HTML version deleted]]
ADD COMMENTlink modified 4.9 years ago by andrew.j.skelton73320 • written 6.0 years ago by Jason Hackney160
Answer: [ReportingTools] HTMLReport of DESeq2 results using Ensembl Gene Ids
gravatar for andrew.j.skelton73
4.9 years ago by
United Kingdom
andrew.j.skelton73320 wrote:

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)])
ADD COMMENTlink written 4.9 years ago by andrew.j.skelton73320
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 290 users visited in the last hour