I have 2 identical jupyter notebooks and I get BiomartException when I run one but not the other.
0
3
Entering edit mode
4.3 years ago
Maria K ▴ 50

I have 2 copies of a Jupyter notebook, at different locations in my machine. When I run one of the notebooks I get a "BiomartException", but not when I run the other one. The exception I get is:


BiomartException: Query ERROR: caught BioMart::Exception::Database: Could not connect to mysql database ensembl_mart_99: DBI connect('database=ensembl_mart_99;host=127.0.0.1;port=5316','ensro',...) failed: Can't connect to MySQL server on '127.0.0.1' (111) at /net/isilonP/public/ro/ensweb/live/mart/www_99/biomart-perl/lib/BioMart/Configuration/DBLocation.pm line 98.


Anything similar happened to anybody? how did they cope with it?

Thank you :)

biomart python • 1.2k views
ADD COMMENT
3
Entering edit mode

I am getting the same issue in R. I will run a getBM function one time and get that error, then I will try again seconds later and it will run with no error. Here is a simple example that is doing this:

mart.mm <- useMart("ensembl", "mmusculus_gene_ensembl")
name <- "FLT1"
mouseid <-getBM(attributes = "ensembl_gene_id",filters = "external_gene_name",values = name, mart = mart.mm)[1, 1]
mousePheno <- getBM(attributes = "phenotype_description",filters = "ensembl_gene_id",values = mouseid,mart = mart.mm)

Just to clarify--I am accessing mine from the same location each time with inconsistent results.

ADD REPLY
1
Entering edit mode

I believe I am getting the error raised at the same point as you, as I can access the full drosophila dataset, but when I query it I get the exception raised. :/

ADD REPLY
0
Entering edit mode

I'm getting the same problem, from this code:

mart <- useMart("ENSEMBL_MART_ENSEMBL")
mart <- useDataset("hsapiens_gene_ensembl", mart)
annotLookup <- getBM(mart=mart, attributes=c("ensembl_gene_id", "gene_biotype", "external_gene_name"), filter="ensembl_gene_id", values=rownames(cts), uniqueRows=TRUE)

and consistently, i.e. re-trying doesn't help

ADD REPLY
0
Entering edit mode

Moving this to a comment since it is not an answer to the question originally posted above.

Sounds like there is some kind of a database lock that may be preventing access. Have you tried adding a delay before the second query?

ADD REPLY
0
Entering edit mode

looks like from either one location you can't access the MySQL (or ensembl web-) server.

Can you check that you're able to connect to it from both locations you mention?

ADD REPLY
1
Entering edit mode

Hey thanks for your reply!

I do connect to the MySQL server as I can successfully run the below command:

dataset = pb.Dataset(name='dmelanogaster_gene_ensembl', host='http://www.ensembl.org')

It is when I run the below command, requesting for the gene_biotype that I get the issue raised:

fulldataset = dataset.query(attributes=['ensembl_gene_id','external_gene_name','chromosome_name',
                                    'percentage_gene_gc_content', 'strand', 'transcript_length',
                                    'gene_biotype','transcript_biotype', 'start_position','end_position'])
ADD REPLY

Login before adding your answer.

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