Question: HTMLReport of DESeq2 results with Ensembl Gene IDs
gravatar for rahnaman
5.5 years ago by
United States
rahnaman0 wrote:

Hello All,

I would like to generate an HTML report from DESeq2 results of RNASeq analysis using Bioconductor ReportingTool  package in R. 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 gene IDs become NULL following Ensembl-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_Ensembl 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_Ensembl?

Many Thanks,


    ## the 2nd dataset which has arbitrary Ensembl gene IDs (instead of the Entrez IDs)
    mydata_Ensembl <- mockRnaSeqData[1:5,]
    row.names(mydata_Ensembl) <- c("ENSMUSG00000030359", "ENSMUSG00000020804", "ENSMUSG00000025375", "ENSMUSG00000015243", "ENSMUSG00000028125")
    conditions <- c(rep("case",3), rep("control", 3))
    mockRna.dse <- DESeqDataSetFromMatrix(countData = mockRnaSeqData,colData =, design = ~ conditions)
    test.dse <- DESeqDataSetFromMatrix(countData = mydata_Ensembl,colData =, 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
    mockRna.dse <- DESeq(mockRna.dse)
    ## repeat for the Ensembl-dataset example
    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="", factor = colData(mockRna.dse)$conditions, reportDir="./reports")
    ## How to write test.dse results to a report?
ADD COMMENTlink modified 5.5 years ago by Emily_Ensembl20k • written 5.5 years ago by rahnaman0

Check this link on Bioconductor.

ADD REPLYlink written 5.5 years ago by komal.rathi3.6k
Please log in to add an answer.


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