Search
Question: ReportingTools problem with GO report
0
gravatar for Assa Yeroslaviz
4.6 years ago by
Assa Yeroslaviz1.4k
Munich, Germany
Assa Yeroslaviz1.4k wrote:
Hi Josh and Bioc User, I am having a problem creating the GO HTML report for a gene set out of GOstats analysis. Here is what I do: selectedIDs <- resSig$entrez #selectedIDs <- na.omit(selectedIDs) # not sure if needed universeIDs <- res$entrez # universeIDs <- na.omit(universeIDs) # not sure if needed goParams <- new("GOHyperGParams", geneIds = selectedIDs, universeGeneIds = universeIDs, annotation ="org.Mm.eg" , ontology = "BP", pvalueCutoff = 0.01, conditional = TRUE, testDirection = "over") goResults <- hyperGTest(goParams) df <- summary(goResults) #dim(summary(goResults, pvalue=0.1)) #dim(summary(goResults, categorySize=10)) htmlReport(goResults, file="test_report.html") # this works just fine BPReport <- HTMLReport(shortName ='GO-BP_analysis_rnaseq', title = paste("GO analysis of DE genes in the comparisonn of ", group1, "vs.", group2, sep="") ,reportDirectory = "./GO_reports") publish(goResults, BPReport, selectedIDs=selectedIDs, annotation.db=" org.Mm.eg",pvalueCutoff= 0.05, makePlot=TRUE) finish(BPReport) But when I run the publidh command I get the error: Error in unlist(mget(ids, ann.map, ifnotfound = NA)) : error in evaluating the argument 'x' in selecting a method for function 'unlist': Error in .checkKeysAreWellFormed(keys) : keys must be supplied in a character vector with no NAs I also tried your example from the web site ( http://research-pub.gene.com/ReportingTools/microarray3.R) and got a similar error massage: library(GOstats) tt <- topTable(fit, coef = 2, n = 100) selectedIDs <- unlist(mget(tt$ID, hgu95av2ENTREZID)) universeIDs <- unlist(mget(featureNames(ALL), hgu95av2ENTREZID)) goParams <- new("GOHyperGParams", geneIds = selectedIDs, universeGeneIds = universeIDs, annotation = annotation(ALL), ontology = "BP", pvalueCutoff = 0.01, conditional = TRUE, testDirection = "over") goResults <- hyperGTest(goParams) ################################################### ### Make the GO report ################################################### goReport <- HTMLReport(shortName = 'go_analysis', title = 'GO analysis of BCR/ABL translocation', reportDirectory = './reports') publish(goResults, goReport, selectedIDs = selectedIDs, annotation.db = 'org.Hs.eg') Warning message: No results met the specified criteria. Returning 0-row data.frame Error in unlist(mget(ids, ann.map, ifnotfound = NA)) : error in evaluating the argument 'x' in selecting a method for function 'unlist': Error in .checkKeysAreWellFormed(keys) : keys must be supplied in a character vector with no NAs So I guess the prolem is not with my data set. I would like to know if this have anything to do with the new version of R? thanks in afdvance, Assa > sessionInfo() R version 3.1.0 (2014-04-10) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] parallel stats graphics grDevices utils datasets methods [8] base other attached packages: [1] xtable_1.7-3 org.Mm.eg.db_2.14.0 GOstats_2.30.0 [4] graph_1.42.0 Category_2.30.0 GO.db_2.14.0 [7] Matrix_1.1-2 biomaRt_2.20.0 edgeR_3.6.0 [10] limma_3.20.1 ReportingTools_2.4.0 AnnotationDbi_1.26.0 [13] Biobase_2.24.0 RSQLite_0.11.4 DBI_0.2-7 [16] knitr_1.5 rtracklayer_1.24.0 gplots_2.13.0 [19] RColorBrewer_1.0-5 genefilter_1.46.0 DESeq2_1.4.0 [22] RcppArmadillo_0.4.200.0 Rcpp_0.11.1 GenomicRanges_1.16.2 [25] GenomeInfoDb_1.0.2 IRanges_1.22.3 BiocGenerics_0.10.0 [28] BiocInstaller_1.14.1 loaded via a namespace (and not attached): [1] annotate_1.42.0 AnnotationForge_1.6.0 BatchJobs_1.2 [4] BBmisc_1.5 BiocParallel_0.6.0 Biostrings_2.32.0 [7] biovizBase_1.12.0 bitops_1.0-6 brew_1.0-6 [10] BSgenome_1.32.0 caTools_1.17 cluster_1.14.4 [13] codetools_0.2-8 colorspace_1.2-4 dichromat_2.0-0 [16] digest_0.6.4 evaluate_0.5.3 fail_1.2 [19] foreach_1.4.2 formatR_0.10 Formula_1.1-1 [22] gdata_2.13.3 geneplotter_1.42.0 GenomicAlignments_1.0.0 [25] GenomicFeatures_1.16.0 ggbio_1.12.0 ggplot2_0.9.3.1 [28] grid_3.1.0 gridExtra_0.9.1 GSEABase_1.26.0 [31] gtable_0.1.2 gtools_3.4.0 Hmisc_3.14-4 [34] hwriter_1.3 iterators_1.0.7 KernSmooth_2.23-10 [37] lattice_0.20-24 latticeExtra_0.6-26 locfit_1.5-9.1 [40] MASS_7.3-29 munsell_0.4.2 PFAM.db_2.14.0 [43] plyr_1.8.1 proto_0.3-10 RBGL_1.40.0 [46] RCurl_1.95-4.1 reshape2_1.2.2 R.methodsS3_1.6.1 [49] R.oo_1.18.0 Rsamtools_1.16.0 R.utils_1.29.8 [52] scales_0.2.4 sendmailR_1.1-2 splines_3.1.0 [55] stats4_3.1.0 stringr_0.6.2 survival_2.37-7 [58] tools_3.1.0 VariantAnnotation_1.10.0 XML_3.98-1.1 [61] XVector_0.4.0 zlibbioc_1.10.0 [[alternative HTML version deleted]]
ADD COMMENTlink modified 4.0 years ago by ankitabioinformatics0 • written 4.6 years ago by Assa Yeroslaviz1.4k
0
gravatar for Assa Yeroslaviz
4.6 years ago by
Assa Yeroslaviz1.4k
Munich, Germany
Assa Yeroslaviz1.4k wrote:
Hi all, I have solved the problem above by creating a character vector of the list of genes. thanks and sorry Assa On Thu, Apr 24, 2014 at 10:37 AM, Assa Yeroslaviz <frymor@gmail.com> wrote: > Hi Josh and Bioc User, > > I am having a problem creating the GO HTML report for a gene set out of > GOstats analysis. > > Here is what I do: > > selectedIDs <- resSig$entrez > #selectedIDs <- na.omit(selectedIDs) # not sure if needed > universeIDs <- res$entrez > # universeIDs <- na.omit(universeIDs) # not sure if needed > goParams <- new("GOHyperGParams", > geneIds = selectedIDs, > universeGeneIds = universeIDs, > annotation ="org.Mm.eg" , > ontology = "BP", > pvalueCutoff = 0.01, > conditional = TRUE, > testDirection = "over") > goResults <- hyperGTest(goParams) > df <- summary(goResults) > #dim(summary(goResults, pvalue=0.1)) > #dim(summary(goResults, categorySize=10)) > htmlReport(goResults, file="test_report.html") # this works just fine > > BPReport <- HTMLReport(shortName ='GO-BP_analysis_rnaseq', title = > paste("GO analysis of DE genes in the comparisonn of ", group1, "vs.", > group2, sep="") ,reportDirectory = "./GO_reports") > publish(goResults, BPReport, selectedIDs=selectedIDs, annotation.db=" > org.Mm.eg",pvalueCutoff= 0.05, makePlot=TRUE) > finish(BPReport) > > But when I run the publidh command I get the error: > > Error in unlist(mget(ids, ann.map, ifnotfound = NA)) : > error in evaluating the argument 'x' in selecting a method for function > 'unlist': Error in .checkKeysAreWellFormed(keys) : > keys must be supplied in a character vector with no NAs > > > I also tried your example from the web site ( > http://research-pub.gene.com/ReportingTools/microarray3.R) and got a > similar error massage: > > library(GOstats) > tt <- topTable(fit, coef = 2, n = 100) > selectedIDs <- unlist(mget(tt$ID, hgu95av2ENTREZID)) > universeIDs <- unlist(mget(featureNames(ALL), hgu95av2ENTREZID)) > goParams <- new("GOHyperGParams", > geneIds = selectedIDs, > universeGeneIds = universeIDs, > annotation = annotation(ALL), > ontology = "BP", > pvalueCutoff = 0.01, > conditional = TRUE, > testDirection = "over") > goResults <- hyperGTest(goParams) > > > ################################################### > ### Make the GO report > ################################################### > goReport <- HTMLReport(shortName = 'go_analysis', > title = 'GO analysis of BCR/ABL translocation', > reportDirectory = './reports') > publish(goResults, goReport, selectedIDs = selectedIDs, annotation.db = 'org.Hs.eg') > > > Warning message: > No results met the specified criteria. Returning 0-row data.frame > > > Error in unlist(mget(ids, ann.map, ifnotfound = NA)) : > error in evaluating the argument 'x' in selecting a method for function 'unlist': Error in .checkKeysAreWellFormed(keys) : > keys must be supplied in a character vector with no NAs > > > So I guess the prolem is not with my data set. > I would like to know if this have anything to do with the new version of R? > > thanks in afdvance, > > Assa > > > > sessionInfo() > R version 3.1.0 (2014-04-10) > Platform: x86_64-pc-linux-gnu (64-bit) > > locale: > [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C > [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 > [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 > [7] LC_PAPER=en_US.UTF-8 LC_NAME=C > [9] LC_ADDRESS=C LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C > > attached base packages: > [1] parallel stats graphics grDevices utils datasets methods > [8] base > > other attached packages: > [1] xtable_1.7-3 org.Mm.eg.db_2.14.0 > GOstats_2.30.0 > [4] graph_1.42.0 Category_2.30.0 > GO.db_2.14.0 > [7] Matrix_1.1-2 biomaRt_2.20.0 > edgeR_3.6.0 > [10] limma_3.20.1 ReportingTools_2.4.0 > AnnotationDbi_1.26.0 > [13] Biobase_2.24.0 RSQLite_0.11.4 > DBI_0.2-7 > [16] knitr_1.5 rtracklayer_1.24.0 > gplots_2.13.0 > [19] RColorBrewer_1.0-5 genefilter_1.46.0 > DESeq2_1.4.0 > [22] RcppArmadillo_0.4.200.0 Rcpp_0.11.1 > GenomicRanges_1.16.2 > [25] GenomeInfoDb_1.0.2 IRanges_1.22.3 > BiocGenerics_0.10.0 > [28] BiocInstaller_1.14.1 > > loaded via a namespace (and not attached): > [1] annotate_1.42.0 AnnotationForge_1.6.0 > BatchJobs_1.2 > [4] BBmisc_1.5 BiocParallel_0.6.0 > Biostrings_2.32.0 > [7] biovizBase_1.12.0 bitops_1.0-6 > brew_1.0-6 > [10] BSgenome_1.32.0 caTools_1.17 > cluster_1.14.4 > [13] codetools_0.2-8 colorspace_1.2-4 > dichromat_2.0-0 > [16] digest_0.6.4 evaluate_0.5.3 > fail_1.2 > [19] foreach_1.4.2 formatR_0.10 > Formula_1.1-1 > [22] gdata_2.13.3 geneplotter_1.42.0 > GenomicAlignments_1.0.0 > [25] GenomicFeatures_1.16.0 ggbio_1.12.0 > ggplot2_0.9.3.1 > [28] grid_3.1.0 gridExtra_0.9.1 > GSEABase_1.26.0 > [31] gtable_0.1.2 gtools_3.4.0 > Hmisc_3.14-4 > [34] hwriter_1.3 iterators_1.0.7 > KernSmooth_2.23-10 > [37] lattice_0.20-24 latticeExtra_0.6-26 > locfit_1.5-9.1 > [40] MASS_7.3-29 munsell_0.4.2 > PFAM.db_2.14.0 > [43] plyr_1.8.1 proto_0.3-10 > RBGL_1.40.0 > [46] RCurl_1.95-4.1 reshape2_1.2.2 > R.methodsS3_1.6.1 > [49] R.oo_1.18.0 Rsamtools_1.16.0 > R.utils_1.29.8 > [52] scales_0.2.4 sendmailR_1.1-2 > splines_3.1.0 > [55] stats4_3.1.0 stringr_0.6.2 > survival_2.37-7 > [58] tools_3.1.0 VariantAnnotation_1.10.0 > XML_3.98-1.1 > [61] XVector_0.4.0 zlibbioc_1.10.0 > > [[alternative HTML version deleted]]
ADD COMMENTlink written 4.6 years ago by Assa Yeroslaviz1.4k
0
gravatar for ankitabioinformatics
4.0 years ago by
ankitabioinformatics0 wrote:

Hello,

I am also getting the following waring :

> gene_IDs_of_interest = head(unique(unlist(geneIds(GO_gsc))), 500)
> GO_BP = test_GO(gene_IDs_of_interest, ontology = "BP", gsc=GO_gsc, pval = 0.01)
> head(summary(GO_BP))

[1] GOBPID    Pvalue    OddsRatio ExpCount  Count     Size      Term     
<0 rows> (or 0-length row.names)
Warning message:
No results met the specified criteria.  Returning 0-row data.frame

I am using the codes given on

https://github.com/davfre/GOstatsPlus/blob/master/R/test-GO.R

https://github.com/davfre/GOstatsPlus/blob/master/vignettes/GOstatsPlus.Rmd

But if I run just for head (first six entries), I am getting the the values.

> gene_IDs_of_interest = head(unique(unlist(geneIds(GO_gsc))))
> GO_BP = test_GO(gene_IDs_of_interest, ontology = "BP", gsc=GO_gsc, pval = 0.01)
> head(summary(GO_BP))

>summary(GO_BP)
       GOBPID       Pvalue OddsRatio ExpCount Count Size
1  GO:0008152 0.0001011770 10.491228 15.38028    23   26
2  GO:0009058 0.0002195926       Inf  8.28169    14   14
3  GO:0044237 0.0004129494  8.666667 14.19718    21   24
4  GO:0009987 0.0005816573  6.229167 18.92958    26   32

...

Structure gene_IDs_of_interest:

> gene_IDs_of_interest = head(unique(unlist(geneIds(GO_gsc))),500)
> length(gene_IDs_of_interest)
[1] 130
> str(gene_IDs_of_interest)
 chr [1:130] "comp561024_c1_seq1" "comp559796_c2_seq1" ...

My input file which looks like this:
          go_id evidence             gene_id
1    GO:0000003      ISA  comp561024_c1_seq1
2    GO:0002376      ISA  comp550730_c0_seq1
3    GO:0002376      ISA  comp557737_c4_seq4
4    GO:0002376      ISA  comp562807_c1_seq1
.....

I think I am not defining the list "gene_Ids_of_Interest" properly. I would really appreciate any help.

Thanks

ADD COMMENTlink written 4.0 years ago by ankitabioinformatics0
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.2.0
Traffic: 366 users visited in the last hour