Hello All,
I would like to generate an HTML report from DESeq2 results of RNASeq analysis. I have followed the example in the ReportingTool documentation and have no problem with that, but unlike that example my deseq result dataset does not have Entrez IDs and instead it has Ensembl IDs. And I have not been able to adapt the report function for my dataset.
I also tried converting Ensembl to Entrez IDs prior to using the "publish" function (below), but the issue is that multiple of my dataset row names become NULL following Ensemble-to-Entrez conversion and that causes error in the downstream "publish" function (I can eliminate those, but prefer not to).
Below I have included an example where mockRnaSeqData has Entrez IDs and report1 is successfully created. The second dataset mydata_Ensemble is a subset of this data which has Ensembl Gene IDs. I greatly appreciate if you could tell me how you modify publish command to work with mydata_Ensemble?
Many Thanks
Noushin
rm(list=ls()) library(DESeq2) data(mockRnaSeqData) mockRnaSeqData <- mockRnaSeqData[1:5,] ## the second dataset which has arbitrary Ensembl gene IDs (instead of the Entrez IDs) mydata_Ensemble <- mockRnaSeqData[1:5,] row.names(mydata_Ensemble) <- c("ENSMUSG00000030359", "ENSMUSG00000020804", "ENSMUSG00000025375", "ENSMUSG00000015243", "ENSMUSG00000028125") conditions <- c(rep("case",3), rep("control", 3)) mockRna.dse <- DESeqDataSetFromMatrix(countData = mockRnaSeqData,colData = as.data.frame(conditions), design = ~ conditions) ## repeat the same for the Ensembl-dataset example test.dse <- DESeqDataSetFromMatrix(countData = mydata_Ensemble,colData = as.data.frame(conditions), design = ~ conditions) colData(mockRna.dse)$conditions <- factor(colData(mockRna.dse)$conditions, levels=c("control", "case")) colData(test.dse)$conditions <- factor(colData(test.dse)$conditions, levels=c("control", "case")) ## Get a DESeqDataSet object for both datasets mockRna.dse <- DESeq(mockRna.dse) test.dse <- DESeq(test.dse) ## Write mockRna results to a report report1 <- HTMLReport(shortName = 'RNAseq_analysis_with_DESeq2_Entrez.html',title = 'RNA-seq analysis of differential expression using DESeq2',reportDirectory = "./reports") publish(mockRna.dse,report1, pvalueCutoff=0.05, annotation.db="org.Mm.eg.db", factor = colData(mockRna.dse)$conditions, reportDir="./reports") finish(report1) ## How to write test.dse results to a report?
hi Noushin,
We try to discourage cross posting on multiple forums, as it scatters the answers and duplicates effort. link to another post: https://www.biostars.org/p/124153/, and at that site someone pointed to this earlier Bioc answer [ReportingTools] HTMLReport of DESeq2 results using Ensembl Gene Ids
I don't see why this would bring confusion! I have not yet received a working answer on this. That reply was a link to a post that I had seen and tried before posting my question. It does not work if not all Ensembl genes have a unique corresponding Entrez id (which happens to be my case!).
Publish function does not work when a dataset has NaN or repeated row names, and when such rows are eliminated from the DESeq dataset prior to 'publish', it generates a completely different error. So I am still hoping one posts a workaround for this problem.