jorainer / ensembldb

This is the ensembldb development repository.
https://jorainer.github.io/ensembldb
33 stars 10 forks source link

Argument "-P" isn't numeric #129

Open guidohooiveld opened 2 years ago

guidohooiveld commented 2 years ago

Hi Johannes, I am trying to generate a mouse EnsDb for release 105, but unfortunately it doesn't work... I think this has to do with the library ensembldb, but I am not 100% sure. Would you mind double-checking at your site/system? Thanks! G

BTW: I have updated the ENSEMBLAPI to its latest version from Github before starting your function. BTW2: line of error message: https://github.com/jorainer/ensembldb/blob/05619ef18b72d214eaf98da5b4857849a1cfacc2/R/functions-create-EnsDb.R#L63 Argument -P: https://github.com/jorainer/ensembldb/blob/05619ef18b72d214eaf98da5b4857849a1cfacc2/R/functions-create-EnsDb.R#L46-L47

>library(ensembldb)
> source("/usr/lib64/R/library/ensembldb/scripts/generate-EnsDBs.R")
> createEnsDbForSpecies(ens_version = 105,
    species="mus_musculus",
    user = "biocensdb", #as defined above
    host = "localhost",
    pass = "ensembldb",
    local_tmp = "/mnt/files/guido/TMP/")
Going to process 1 species.
Processing species: mus_musculus (1 of 1)
Downloading 79 files ... OK
mus_musculus_core_105_39.alt_allele_attrib: Records: 0  Deleted: 0  Skipped: 0  Warnings: 0
mus_musculus_core_105_39.alt_allele_group: Records: 0  Deleted: 0  Skipped: 0  Warnings: 0
mus_musculus_core_105_39.alt_allele: Records: 0  Deleted: 0  Skipped: 0  Warnings: 0
mus_musculus_core_105_39.analysis_description: Records: 66  Deleted: 0  Skipped: 0  Warnings: 0
> <<snip>>
mus_musculus_core_105_39.translation: Records: 67165  Deleted: 0  Skipped: 0  Warnings: 0
mus_musculus_core_105_39.unmapped_object: Records: 137973  Deleted: 0  Skipped: 0  Warnings: 0
mus_musculus_core_105_39.unmapped_reason: Records: 51  Deleted: 0  Skipped: 0  Warnings: 0
mus_musculus_core_105_39.xref: Records: 1029892  Deleted: 0  Skipped: 0  Warnings: 0
Connecting to localhost at port -P
DBI connect('host=localhost;port=-P','biocensdb',...) failed: Access denied for user 'biocensdb'@'localhost' (using password: NO) at /home/guidoh/ENSEMBLAPI/src/ensembl/modules/Bio/EnsEMBL/Registry.pm line 1771.
Argument "-P" isn't numeric in sprintf at /home/guidoh/ENSEMBLAPI/src/ensembl/modules/Bio/EnsEMBL/Registry.pm line 1771.

-------------------- EXCEPTION --------------------
MSG: Cannot connect to the Ensembl MySQL server at localhost:0; check your settings & DBI error message: Access denied for user 'biocensdb'@'localhost' (using password: NO)
STACK Bio::EnsEMBL::Registry::load_registry_from_db /home/guidoh/ENSEMBLAPI/src/ensembl/modules/Bio/EnsEMBL/Registry.pm:1771
STACK toplevel /usr/lib64/R/library/ensembldb/perl/get_gene_transcript_exon_tables.pl:116
Date (localtime)    = Tue Jan 11 00:57:23 2022
Ensembl API version = 105
---------------------------------------------------
Error in fetchTablesFromEnsembl(version = ens_version, species = species,  : 
  Something went wrong! I'm missing some of the txt files the perl script should have generated.
In addition: Warning message:
In connection_release(conn@ptr) : There is a result object still in use.
The connection will be automatically released when it is closed
>
> sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Fedora Linux 35 (Thirty Five)

Matrix products: default
BLAS/LAPACK: /usr/lib64/libflexiblas.so.3.0

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

other attached packages:
 [1] RMariaDB_1.2.1          RCurl_1.98-1.5          ensembldb_2.18.2       
 [4] AnnotationFilter_1.18.0 GenomicFeatures_1.46.3  AnnotationDbi_1.56.2   
 [7] Biobase_2.54.0          GenomicRanges_1.46.1    GenomeInfoDb_1.30.0    
[10] IRanges_2.28.0          S4Vectors_0.32.3        AnnotationHub_3.2.0    
[13] BiocFileCache_2.2.0     dbplyr_2.1.1            BiocGenerics_0.40.0    
guidohooiveld commented 2 years ago

BTW, and for completeness: through lgatto's recent post (https://github.com/jorainer/ensembldb/issues/128) I realized that you already made available the mouse EnsDb v105 through the AnnotationHub...! Thanks so much! I will make use of that one now.

> query(ah, c("EnsDb", "v105", "Mus musculus"))
AnnotationHub with 1 record
# snapshotDate(): 2021-10-20
# names(): AH98078
# $dataprovider: Ensembl
# $species: Mus musculus
# $rdataclass: EnsDb
# $rdatadateadded: 2021-10-20
# $title: Ensembl 105 EnsDb for Mus musculus
# $description: Gene and protein annotations for Mus musculus based on Ensem...
# $taxonomyid: 10090
# $genome: GRCm39
# $sourcetype: ensembl
# $sourceurl: http://www.ensembl.org
# $sourcesize: NA
# $tags: c("105", "Annotation", "AnnotationHubSoftware", "Coverage",
#   "DataImport", "EnsDb", "Ensembl", "Gene", "Protein", "Sequencing",
#   "Transcript") 
# retrieve record with 'object[["AH98078"]]' 
>
jorainer commented 2 years ago

Yes, I will keep adding EnsDb for each new Ensembl release, so no need to create them on your own. That can in fact be a quite tricky thing, since the Ensembl Perl API needs a relatively old version of Perl and also an older version of BioPerl.