[BioC] namespace error with goProfiles package

Alex Sanchez sanplaale at gmail.com
Sat Jun 14 19:35:49 CEST 2008


Juerg and Martin

Thanks for notifying the problem and for the suggestion. I will review 
the code, make the necessary changes, and as soon as it is done I will 
let you know

Alex

-----------------------------------------------------------------------------------------------------
Alex Sanchez
Departament d'Estadistica. Universitat de Barcelona. asanchez at ub.edu
Statistics and Bioinformatics Unit. Hospital de Vall d'Hebron. 
alesanch at ir.vhebron.net
----------------------------------------------------------------------------------------------------

Martin Morgan wrote:
> Juerg --
>
> Thanks for the report.
>
> Most packages use 'GO.db', but 'safe' Depends on 'GO'. The first time 
> you run your code, the search path looks something like
>
> > search()
>  [1] ".GlobalEnv"            "package:goProfiles"    "package:GO.db"
>  [4] "package:AnnotationDbi" "package:RSQLite"       "package:DBI"
>  [7] "package:Biobase"       "package:tools"         "package:stats"
> [10] "package:graphics"      "package:utils"         "package:datasets"
> [13] "package:grDevices"     "package:methods"       "Autoloads"
> [16] "package:base"
>
> whereas after loading 'safe' you get
>
> > search()
>  [1] ".GlobalEnv"            "package:safe"          "package:GO"
>  [4] "package:SparseM"       "package:annotate"      "package:xtable"
>  [7] "package:goProfiles"    "package:GO.db"     "package:AnnotationDbi"
> [10] "package:RSQLite"       "package:DBI"           "package:Biobase"
> [13] "package:tools"         "package:stats"         "package:graphics"
> [16] "package:utils"         "package:datasets"      "package:grDevices"
> [19] "package:methods"       "Autoloads"             "package:base"
>
> Note 'package:GO' in position 3. goProfiles tries to perform an 
> operation (toTable) that works with objects from GO.db but not from 
> GO. Unfortunately, goProfiles looks on the search path (implicitly) 
> instead of asking for GO.db in particular. This means that after 
> loading safe it finds the mapping in GO, and the error occurs.
>
> There are three different solutions.
>
> 1. You can work around this by issuing
>
> > detach('package:GO')
>
> after library(safe). This might cause problems if 'safe' really only 
> works with GO, and not with GO.db
>
> 2. the 'safe' maintainer (cc'd) can update their package to use 
> 'GO.db' instead of GO. This will have to be done before the next 
> release anyway.
>
> 3. The 'goProfiiles' maintainer (also cc'd) can modify their package 
> code to explicitly request the appropriate version of GO, e.g.,
>
> library(annotate)
> getAnnMap("TERM", "GO.db")
>
> Thanks again for the report.
>
> Martin
>
> Straubhaar, Juerg wrote:
>> The following code is from the goProfiles package and works fine:
>>
>> require(goProfiles)
>> data(prostateIds)
>> welsh.MF <- basicProfile(welsh01EntrezIDs, onto = "MF",level = 2, 
>> orgPackage = "org.Hs.eg.db")
>> singh.MF <- basicProfile(singh01EntrezIDs, onto = "MF",level = 2, 
>> orgPackage = "org.Hs.eg.db")
>> welsh.singh.MF <- mergeProfilesLists(welsh.MF,singh.MF, profNames = 
>> c("Welsh", "Singh"))
>> printProfiles(welsh.singh.MF, percentage = TRUE)
>>
>> But if I load the libraries:
>>
>> library(mouse4302.db)
>> library(annaffy)
>> library(annotate)
>> library(GSEAlm)
>> library(safe)
>>
>> and run the above code an error is produced:
>>
>> Error in function (classes, fdef, mtable)  :   unable to find an 
>> inherited method for function "toTable", for signature "environment"
>>
>>> sessionInfo()
>> R version 2.7.0 (2008-04-22) x86_64-pc-linux-gnu
>> locale:
>> C
>>
>> attached base packages:
>> [1] tools     stats     graphics  grDevices utils     datasets  
>> methods  [8] base    
>> other attached packages:
>>  [1] org.Hs.eg.db_2.2.0  goProfiles_1.2.0    safe_2.2.0          [4] 
>> GO_2.2.0            SparseM_0.78        GSEAlm_1.0.0        [7] 
>> annotate_1.18.0     xtable_1.5-2        annaffy_1.12.1     [10] 
>> KEGG.db_2.2.0       GO.db_2.2.0         mouse4302.db_2.2.0 [13] 
>> AnnotationDbi_1.2.1 RSQLite_0.6-8       DBI_0.2-4          [16] 
>> Biobase_2.0.1
>>
>> If I load only the libraries:
>>
>> library(mouse4302.db)
>> library(annaffy)
>> library(annotate)
>> library(GSEAlm)
>>
>> or only the library
>>
>> library(safe)
>>
>> the above code works.
>>
>> Kind regards,
>> Juerg
>> UMASS Med School
>>
>>     [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives: 
>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>
>



More information about the Bioconductor mailing list