Goseq With Mouse Gene Id'S, Does It Work For Anyone?
7
3
Entering edit mode
12.0 years ago
ethanford ▴ 90

Is anybody able to use the Bioconducter goseq package with mouse (mm9) gene id's?

It works fine when I use hg19 gene id's but when I switch to mouse it cannot find the database.

Below is the error I get:

> library(goseq)
> GO.wall=goseq(pwf, "mm9", "geneSymbol")
Fetching GO annotations...
Error in library(paste(orgstring, "db", sep = "."), character.only = TRUE) : 
  there is no package called ‘org.Gg.eg.db’



> sessionInfo()
R version 2.14.2 (2012-02-29)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

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] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] org.Hs.eg.db_2.6.4     RSQLite_0.11.1         DBI_0.2-5             
[4] AnnotationDbi_1.16.19  Biobase_2.14.0         goseq_1.6.0           
[7] geneLenDataBase_0.99.8 BiasedUrn_1.04        

loaded via a namespace (and not attached):
 [1] biomaRt_2.10.0        Biostrings_2.22.0     BSgenome_1.22.0      
 [4] GenomicFeatures_1.6.9 GenomicRanges_1.6.7   grid_2.14.2          
 [7] IRanges_1.12.6        lattice_0.20-6        Matrix_1.0-5         
[10] mgcv_1.7-13           nlme_3.1-103          RCurl_1.91-1         
[13] rtracklayer_1.14.4    tools_2.14.2          XML_3.9-4            
[16] zlibbioc_1.0.1
rna-seq • 6.9k views
ADD COMMENT
0
Entering edit mode

Difficult to tell from your post, but you may need to install the appropriate genome annotation package; perhaps BSgenome.Mmusculus.UCSC.mm9? from Bioconductor.

ADD REPLY
6
Entering edit mode
12.0 years ago
ethanford ▴ 90

Problem solved. You can load the data base independently.

source("http://bioconductor.org/biocLite.R")
biocLite("org.Mm.eg.db")
ADD COMMENT
0
Entering edit mode
12.0 years ago

Strange.

It's trying to download the chicken annotation database (org.Gg.eg.db). There's obviously code you're not showing, so is this really the code you are using that's throwing the error?

You might try upgrading to latest R and Bioconductor packages and trying again. If it's still failing, perhaps you can provide a small example of your data that's in pwf so we can help to debug.

ADD COMMENT
0
Entering edit mode
12.0 years ago
ethanford ▴ 90

Sorry about the code. Some bad copy pasting on my part. I was trying to simplify it a little, but just made things worse. I was trying several non-human databases, none of which were working. Everything non-human looked the same, e.g. org.Mm.eg.db.

It's all on the computer at the lab. I'll update R and goseq (I thought they were current in that I updated everything a few weeks ago I think). I will put together a better post with all my code first thing in the morning.

thanks!!!!

ADD COMMENT
0
Entering edit mode
12.0 years ago
ethanford ▴ 90

I updated R and goseq and now I get have the same problem with both mm9 and hg19 genomes.

For a time I had this problem with hg19, but after installing a bunch of different R versions and reinstalling goseq several times it just started working. I am at a total loss as to what is going on.

Here is the code, you can replace mm9 with hg19 and get the same result.

$ /usr/bin/R

R version 2.15.0 (2012-03-30)
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> list.files()
[1] "allGenes.txt" "sigGenes.txt"
> library(goseq)
Loading required package: BiasedUrn
Loading required package: geneLenDataBase
> allgenes <- read.table("allGenes.txt")
> testgenes <- read.table("sigGenes.txt")
> 
> vector.allgenes <- as.character(allgenes[[1]])
> vector.testgenes <- as.character(testgenes[[1]])
> 
> gene.vector=as.integer(vector.allgenes%in%vector.testgenes)
> names(gene.vector)=vector.allgenes
> 
> pwf=nullp(gene.vector, "mm9", "geneSymbol")
Loading mm9 length data...
> GO.wall=goseq(pwf, "mm9", "geneSymbol")
Fetching GO annotations...
Error in library(paste(orgstring, "db", sep = "."), character.only = TRUE) : 
  there is no package called ‘org.Mm.eg.db’
> sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

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] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] goseq_1.8.0            geneLenDataBase_0.99.9 BiasedUrn_1.04        

loaded via a namespace (and not attached):
 [1] AnnotationDbi_1.18.0  Biobase_2.16.0        BiocGenerics_0.2.0   
 [4] biomaRt_2.12.0        Biostrings_2.24.1     bitops_1.0-4.1       
 [7] BSgenome_1.24.0       DBI_0.2-5             GenomicFeatures_1.8.1
[10] GenomicRanges_1.8.6   grid_2.15.0           IRanges_1.14.3       
[13] lattice_0.20-6        Matrix_1.0-6          mgcv_1.7-16          
[16] nlme_3.1-103          RCurl_1.91-1          Rsamtools_1.8.4      
[19] RSQLite_0.11.1        rtracklayer_1.16.1    stats4_2.15.0        
[22] tools_2.15.0          XML_3.9-4             zlibbioc_1.2.0

Thanks, Ethan

ADD COMMENT
0
Entering edit mode
12.0 years ago
ethanford ▴ 90

forgot to add a sample of pwf (excuse the one I posted a second ago, it was from a different window)

> head(pwf)
              DEgenes bias.data        pwf
0610005C13Rik       0        NA         NA
0610007C21Rik       0     966.0 0.01400346
0610007L01Rik       0    3614.0 0.05484820
0610007P08Rik       0    4156.0 0.05872086
0610007P14Rik       0    1190.0 0.01745488
0610007P22Rik       0    1187.5 0.01741525
ADD COMMENT
0
Entering edit mode
12.0 years ago
ethanford ▴ 90

Changing R from 2.15.0 back to 2.14.2 makes it so goseq works with hg19 again, but it still does not work with mm9.

ADD COMMENT
2
Entering edit mode

Please edit your original question with new details, rather than adding multiple "answers" which are not actually answers.

ADD REPLY
0
Entering edit mode
12.0 years ago
ethanford ▴ 90

The solution is to download the annotation database from Bioconductor before using goseq. For some reason goseq does it for human but not mouse. Regardless it doesn't matter.

source("http://bioconductor.org/biocLite.R")
biocLite("org.Mm.eg.db")
ADD COMMENT

Login before adding your answer.

Traffic: 2611 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