HTMLReport of DESeq2 results with Ensembl Gene IDs
0
0
Entering edit mode
7.0 years ago
rahnaman • 0

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,

Noushin

    rm(list=ls()) 
    
    library(DESeq2)
    library(ReportingTools)
    
    data(mockRnaSeqData)
    ## 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 = as.data.frame(conditions), design = ~ conditions)
    
    test.dse <- DESeqDataSetFromMatrix(countData = mydata_Ensembl,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
    mockRna.dse <- DESeq(mockRna.dse)
    ## repeat for the Ensembl-dataset example
    test.dse <- DESeq(test.dse)

    ## Write mockRna results to a report
    library("org.Mm.eg.db")
    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?
RNA-Seq bioconductor reportingTool R • 2.9k views
ADD COMMENT
1
Entering edit mode

Check this link on Bioconductor.

ADD REPLY

Login before adding your answer.

Traffic: 1712 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6