Question: why does ReportingTools does not work with yeast annotations
0
gravatar for Assa Yeroslaviz
2.2 years ago by
Assa Yeroslaviz1.1k
Munich
Assa Yeroslaviz1.1k wrote:

Hi,

I'm having trouble using the ReportingTools package with the yeast genome.

I did a RNA-Seq experiment with S. cerevisiae and analyzed it for DE genes and enriched GO categories. Now I would like to try and present them in an HTML report using the ReportingTools package.

It works for the DESeqDataSet object by using the modifyDF parameter and converting the Ensmebl IDs internally. For that I am using this function:

fun <- function(df, object, ...){
     df$ENSEMBL <- rownames(df)
    annot <- select(org.Sc.sgd.db, df$ENSEMBL, c("ALIAS","GENENAME", "ENTREZID"), "ENSEMBL")
    if(nrow(annot) > nrow(df)) annot <- annot[!duplicated(annot[,1]),]
    df <- data.frame(annot, df)
    df <- df[ , -which(names(df) %in% c("ENSEMBL.1"))]
    df$ENSEMBL <- hwrite(as.character(df$ENSEMBL), link = paste0(" http://www.ensembl.org/Saccharomyces_cerevisiae/Gene/Summary?g=", as.character(df$GENENAME)), table = FALSE)
    df
}

For the GOstats package I need to use the ensembl IDs, as the annotation package used is org.Sc.sgd.db, which has the systematic yeast identifier as the central IDs. Therefor it does not work with entrez IDs.

>selectedIDs <- ... # "YAL067C" "YAL065C" "YAL046C"
>universeIDs <- ... "YAL067C" "YAL065C" "YAL046C"

>BPParams <- new("GOHyperGParams",
                geneIds = selectedIDs,
                universeGeneIds = universeIDs,
                annotation ="org.Sc.sgd" ,
                ontology = "BP",
                pvalueCutoff = 0.01,
                conditional = TRUE,
                testDirection = "over")

>BPResults <- hyperGTest(BPParams)

>BPResults
Gene to GO BP Conditional test for over-representation 
2712 GO BP ids tested (109 have p < 0.01)
Selected gene set size: 737 
    Gene universe size: 5783 
    Annotation package: org.Sc.sgd

So running the GOstats analysis gives me a GOHyperGResult object

But when I try to run the publish command with it, I get the following error:

BPReport <- HTMLReport(shortName = "BP.enrichmentAnalysis",
                       title = "...",
                       reportDirectory = "./DESeq2reports")
publish(BPResults, BPReport, selectedIDs=selectedIDs, annotation.db="org.Sc.sgd",
        pvalueCutoff= 0.01)

Error in value[[3L]](cond) : 
  Unable to find your annotation.db: org.Sc.sgd

Also trying it with the same function as above give the same error.

Changing the gene IDs from ensembl to entrez IDs also gives the same error.

Any idea why this happens? I would appreciate suggestions to make it possible.

thanks in advance

Assa

> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.6 (El Capitan)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
 [1] grid      parallel  stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] org.Mm.eg.db_3.3.0         GO.db_3.3.0                org.Sc.sgd.db_3.3.0        pheatmap_1.0.8            
 [5] ggrepel_0.6.3              WriteXLS_4.0.0             BiocParallel_1.6.6         hwriter_1.3.2             
 [9] ggplot2_2.1.0              gplots_3.0.1               ReportingTools_2.12.2      knitr_1.14                
[13] RColorBrewer_1.1-2         genefilter_1.54.2          DESeq2_1.12.4              SummarizedExperiment_1.2.3
[17] GenomicRanges_1.24.3       GenomeInfoDb_1.8.7         stringr_1.1.0              biomaRt_2.28.0            
[21] GOstats_2.38.1             graph_1.50.0               Category_2.38.0            Matrix_1.2-7.1            
[25] AnnotationDbi_1.34.4       IRanges_2.6.1              S4Vectors_0.10.3           Biobase_2.32.0            
[29] BiocGenerics_0.18.0
ADD COMMENTlink written 2.2 years ago by Assa Yeroslaviz1.1k
Please log in to add an answer.

Help
Access

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