Create object "Go3AnnDbBimap" and include it in a org.Xx.eg.db package to use with goProfiles and goTools
0
1
Entering edit mode
artur ▴ 80
@artur-6730
Last seen 8.8 years ago
Germany

I would like to compare the GO enrichments of several gene clusters.

I tried to use goProfles and goTools.

Since I am using a non model organism I build my own organism package using AnnotationForge

> keytypes(org.Psp.FOBEG1.eg.db)
[1] "Locus"        "EnsemblNames" "GID"          "GO"           "EVIDENCE"     "ONTOLOGY"     "GOALL"        "EVIDENCEALL"  "ONTOLOGYALL" 

The central Ids of my package are GeneIDs:

> head(keys(org.Psp.FOBEG1.eg.db, keytypes="GID"))->ids
> select(org.Psp.FOBEG1.eg.db, keys=ids, columns="GO", keytype="GID")
        GID         GO
1  11588526       <NA>
2  11588527 GO:0003735
3  11588527 GO:0005840
4  11588527 GO:0006412
5  11588528 GO:0005737
6  11588528 GO:0052906
7  11588529 GO:0005840
8  11588529 GO:0006364
9  11588529 GO:0042274
10 11588529 GO:0043022
11 11588530 GO:0003735
12 11588530 GO:0005840
13 11588530 GO:0006412
14 11588531 GO:0046417
Warning message:
In .generateExtraRows(tab, keys, jointype) :
  'select' resulted in 1:many mapping between keys and return rows

Now, my problem is that I get a similar error with both goTools and goProfiles; therefore I guess I have something wrong in my org. package. The problem is that I do not really understand what I did wrong.

> basicProfile (test1, onto="ALL", level=1, orgPackage="org.Psp.FOBEG1.eg.db")

Error in eval(expr, envir, enclos) : 

  object 'org.Psp.FOBEG1.egGO' not found

> res <-ontoCompare(test1, probeType="org.Psp.FOBEG1.eg")
Starting ontoCompare...
Error in get(paste(probeType, "GO", sep = "")) : 
  object 'org.Psp.FOBEG1.egGO' not found

> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252    LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    

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

other attached packages:
 [1] org.Psp.FOBEG1.eg.db_0.1 hgu133a.db_2.14.0        goTools_1.38.0           goProfiles_1.26.0        GO.db_2.14.0             org.Hs.eg.db_2.14.0     
 [7] GOSemSim_1.22.0          AnnotationDbi_1.26.0     GenomeInfoDb_1.0.2       Biobase_2.24.0           BiocGenerics_0.10.0      RSQLite_0.11.4          
[13] DBI_0.3.0                Rcpp_0.11.2              BiocInstaller_1.14.2    

loaded via a namespace (and not attached):
[1] IRanges_1.22.10 stats4_3.1.1    tools_3.1.1 

 

Looking at the Index.html file of my package it is obvious that the org.Psp.FOBEG1.egGO is missing.

Looking in other organism packages (e.g. org.Hs.eg.db) I understood that org.Xx.egGO is a "Go3AnnDbBimap" object. 

> str(org.Hs.egGO)
Formal class 'Go3AnnDbBimap' [package "AnnotationDbi"] with 9 slots
  ..@ rightTables: Named chr [1:3] "go_bp" "go_cc" "go_mf"
  .. ..- attr(*, "names")= chr [1:3] "BP" "CC" "MF"
  ..@ L2Rchain   :List of 2
  .. ..$ :Formal class 'L2Rlink' [package "AnnotationDbi"] with 8 slots
  .. .. .. ..@ tablename   : chr "genes"
  .. .. .. ..@ Lcolname    : chr "gene_id"
  .. .. .. ..@ tagname     : chr NA
  .. .. .. ..@ Rcolname    : chr "_id"
  .. .. .. ..@ Rattribnames: chr(0)
  .. .. .. ..@ Rattrib_join: chr NA
  .. .. .. ..@ filter      : chr "1"
  .. .. .. ..@ altDB       : chr(0)
  .. ..$ :Formal class 'L2Rlink' [package "AnnotationDbi"] with 8 slots
  .. .. .. ..@ tablename   : chr(0)
  .. .. .. ..@ Lcolname    : chr "_id"
  .. .. .. ..@ tagname     : Named chr "{evidence}"
  .. .. .. .. ..- attr(*, "names")= chr "Evidence"
  .. .. .. ..@ Rcolname    : chr "go_id"
  .. .. .. ..@ Rattribnames: Named chr "NULL"
  .. .. .. .. ..- attr(*, "names")= chr "Ontology"
  .. .. .. ..@ Rattrib_join: chr NA
  .. .. .. ..@ filter      : chr "1"
  .. .. .. ..@ altDB       : chr(0)
  ..@ direction  : int 1
  ..@ Lkeys      : chr NA
  ..@ Rkeys      : chr NA
  ..@ ifnotfound : list()
  ..@ datacache  :<environment: 0x13aa5f18>
  ..@ objName    : chr "GO"
  ..@ objTarget  : chr "Human"

So I would need to create such an object for my organism and include it into the package I created.

Can anyone help me to get around this problem or provide me with useful information/links/example/tutorials?

Thanks a lot!

 

goprofiles AnnotationForge Bimap GO • 3.2k views
ADD COMMENT
1
Entering edit mode

Please don't cross-post on here and biostars.

ADD REPLY
0
Entering edit mode

Sorry about that, I will avoid it in the future!

ADD REPLY
0
Entering edit mode

I understood that i have to create my org.Xx.egGO map, which should be an object of class "Go3AnDbBimap".

Looking into

> colnames(org.Hs.egGO)
[1] "gene_id"  "go_id"    "Evidence" "Ontology"

I see that I have all these information already in my package

 keytypes(org.Psp.FOBEG1.eg.db)
​[1] "Locus"        "EnsemblNames" "GID"          "GO"           "EVIDENCE"     "ONTOLOGY"     "GOALL"        "EVIDENCEALL"  "ONTOLOGYALL" 

Is there anyone who can give me any suggestion or direct me to tutorials/Vignettes/links I could use to add the map org.Xx.egGO into my package?

ADD REPLY
0
Entering edit mode

This is a bit of a shot in the dark, but would it make sense and try to use the same letter case?

ADD REPLY
0
Entering edit mode

Hi Laurent, thank you for your answer.

As you can see in the org.Hs.eg.db 

> ls("package:org.Hs.eg.db")
 [1] "org.Hs.eg"                "org.Hs.eg.db"             "org.Hs.eg_dbconn"         "org.Hs.eg_dbfile"         "org.Hs.eg_dbInfo"         "org.Hs.eg_dbschema"      
 [7] "org.Hs.egACCNUM"          "org.Hs.egACCNUM2EG"       "org.Hs.egALIAS2EG"        "org.Hs.egCHR"             "org.Hs.egCHRLENGTHS"      "org.Hs.egCHRLOC"         
[13] "org.Hs.egCHRLOCEND"       "org.Hs.egENSEMBL"         "org.Hs.egENSEMBL2EG"      "org.Hs.egENSEMBLPROT"     "org.Hs.egENSEMBLPROT2EG"  "org.Hs.egENSEMBLTRANS"   
[19] "org.Hs.egENSEMBLTRANS2EG" "org.Hs.egENZYME"          "org.Hs.egENZYME2EG"       "org.Hs.egGENENAME"        "org.Hs.egGO"              "org.Hs.egGO2ALLEGS"      
[25] "org.Hs.egGO2EG"           "org.Hs.egMAP"             "org.Hs.egMAP2EG"          "org.Hs.egMAPCOUNTS"       "org.Hs.egOMIM"            "org.Hs.egOMIM2EG"        
[31] "org.Hs.egORGANISM"        "org.Hs.egPATH"            "org.Hs.egPATH2EG"         "org.Hs.egPFAM"            "org.Hs.egPMID"            "org.Hs.egPMID2EG"        
[37] "org.Hs.egPROSITE"         "org.Hs.egREFSEQ"          "org.Hs.egREFSEQ2EG"       "org.Hs.egSYMBOL"          "org.Hs.egSYMBOL2EG"       "org.Hs.egUCSCKG"         
[43] "org.Hs.egUNIGENE"         "org.Hs.egUNIGENE2EG"      "org.Hs.egUNIPROT" 

There is an object called org.Hs.egGO, tha it is not present in my package

> ls("package:org.Psp.FOBEG1.eg.db")
[1] "org.Psp.FOBEG1.eg"          "org.Psp.FOBEG1.eg.db"       "org.Psp.FOBEG1.eg_dbconn"   "org.Psp.FOBEG1.eg_dbfile"   "org.Psp.FOBEG1.eg_dbInfo"  
[6] "org.Psp.FOBEG1.eg_dbschema" "org.Psp.FOBEG1.egORGANISM" 

This object is a Go3AnnDbBimap class object.

> class(org.Hs.egGO)
[1] "Go3AnnDbBimap"
attr(,"package")
[1] "AnnotationDbi"

Now, for what I understood I should be able to create a new map (meaning Bimap file) call it org.Psp.FOBEG1.egGO and put it into my package org.Psp.FOBEG1.eg.db. Unfortunately, so far I have no idea how to do that.

 

ADD REPLY
1
Entering edit mode

I would assume that this is what is needed indeed. Maybe you could post a question about that specifically, describing how you created your org.Psp.FOBEG1.eg package, as it looks like the root of the issues described in this post.

ADD REPLY
0
Entering edit mode

Thank you very much Laurent. I think I will follow your suggestion.

ADD REPLY
0
Entering edit mode

May I ask why do you need to create the package? I have tried with the GOTermsFrame idType and it seems to work, after some headaches to know how to properly call basicProfile()

basicProfile(GOTermsFrame, idType = "GOTermsFrame", onto = "BP", level = 2)

GOTermsFrame with data.frame fields: "GeneID"   "Ontology" "GOID"

ADD REPLY
0
Entering edit mode

Hi artur,

I have the exact same problem. Did you get the solution?

It would help me a lot!

Thanks!

Bastien

ADD REPLY

Login before adding your answer.

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