Error in .local(x, i, j = j, ...) : 'i' must be length 1 in using OrganismDbi to create
Entering edit mode
amafon95 • 0
Last seen 13 months ago


I am currently writing my masters thesis and am trying to create an object for Pon abelii, for a GO analysis with the R-package clusterProfiler, and this requires this kind of object. For orangutan this does not exists as an already available R-package. I created a TxDB object and wanted to use the command "makeOrganismDbFromTxDb(txdb_Orang, keytype="GENEID", orgdb=NA)", but unfortunately I get one error message I can´t solve:

Error in .local(x, i, j = j, ...) : 'i' must be length 1

Also, the help websites on the internet do not show any helping entries, except updating the packages. This error also appears when I try to create the eg.db object with the commands makeOrganismDbFromBiomart and makeOrganismDbFromUCSC from the ‘OrganismDbi’ package.

Do you might have an idea how I can create this object? I would really appreciate an answer.

Kind regards Amanda

annotation • 483 views
Entering edit mode
Last seen 16 hours ago
United States

The function you are using is intended to make an OrganismDb package, which is distinct from an OrgDb package. The former being a meta-package that combines a TxDb, an OrgDb and the GO.db package so you can make queries that span information in those packages, and the latter being a package that contains functional annotations about an organism (as compared to the genomic information in a TxDb package).

Anyway, you don't have to make anything yourself. You can just get what you need from the AnnotationHub:

> library(AnnotationHub)

> hub <- AnnotationHub()
snapshotDate(): 2020-04-27

> query(hub, "Pongo abelii")
AnnotationHub with 166 records
# snapshotDate(): 2020-04-27
# $dataprovider: Ensembl, UCSC,, Inpar...
# $species: Pongo abelii
# $rdataclass: TwoBitFile, GRanges, EnsDb, OrgDb, Inparanoid8Db
# additional mcols(): taxonomyid, genome, description,
#   coordinate_1_based, maintainer, rdatadateadded, preparerclass, tags,
#   rdatapath, sourceurl, sourcetype 
# retrieve records with, e.g., 'object[["AH6283"]]' 

  AH6283  | Assembly                               
  AH6284  | RefSeq Genes                           
  AH6285  | Ensembl Genes                          
  AH6286  | Genscan Genes                          
  AH6287  | Orangutan mRNAs                        
  ...       ...                                    
  AH80673 |          <-- That is what we want   
  AH82835 | Pongo_abelii.PPYG2.cdna.all.2bit       
  AH82836 | Pongo_abelii.PPYG2.dna_rm.toplevel.2bit
  AH82837 | Pongo_abelii.PPYG2.dna_sm.toplevel.2bit
  AH82838 | Pongo_abelii.PPYG2.ncrna.2bit       

> orgdb <- hub[["AH80673"]]
downloading 1 resources
retrieving 1 resource
  |======================================================================| 100%

loading from cache
> orgdb
OrgDb object:
| ORGANISM: Pongo abelii
| SPECIES: Pongo abelii
| Taxonomy ID: 9601
| Db type: OrgDb
| Supporting package: AnnotationDbi

Please see: help('select') for usage information

## do something random to show functionality

> select(orgdb, head(keys(orgdb)), "SYMBOL")
'select()' returned 1:1 mapping between keys and columns
1 808473    ND1
2 808474   ATP8
3 808475   COX2
4 808476    ND6
5 808477   ND4L
6 808478    ND2
Entering edit mode

Thank you, that works perfectly! That is an even better solution than I was hoping for.

Entering edit mode


I wanted to check some information about the annotation file I retrieved from the package. But suddenly when I use the query(hub, "Pongo abelii") command, I get an error message I don´t understand:

hub <- AnnotationHub() snapshotDate(): 2020-04-27

query(hub, "Pongo abelii") Error in autosocket() : banknameSocket not found, try choosebank() first

What happened from one day to the other, that suddenly this command does not work like before?

Kind regards!

Entering edit mode

autosocket() is defined in the seqinr package, and my guess is that you have selected seqinr::query(). Be explicit about the function that you are using, AnnotationHub::query(hub, "pongo abelii').

> seqinr::query(hub, "Pongo abelii")
Error in autosocket() : banknameSocket not found, try choosebank() first
> AnnotationHub::query(hub, "Pongo abelii")
AnnotationHub with 166 records
# snapshotDate(): 2020-07-20
# $dataprovider: Ensembl, UCSC,, Inpar...
# $species: Pongo abelii

Login before adding your answer.

Traffic: 469 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6