Question: I have 2 identical jupyter notebooks and I get BiomartException when I run one but not the other.
3
gravatar for Maria K
8 months ago by
Maria K50
UK
Maria K50 wrote:

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 • 385 views
ADD COMMENTlink modified 8 months ago by Biostar ♦♦ 20 • written 8 months ago by Maria K50
3

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 REPLYlink modified 8 months ago • written 8 months ago by bripaisley20
1

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 REPLYlink written 8 months ago by Maria K50

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 REPLYlink modified 8 months ago • written 8 months ago by steveh30

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 REPLYlink written 8 months ago by genomax90k

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 REPLYlink modified 8 months ago • written 8 months ago by lieven.sterck8.5k
1

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 REPLYlink written 8 months ago by Maria K50
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 880 users visited in the last hour