Perl API error 500 when querying EnsEMBL

54 views
Skip to first unread message

Julien Fumey

unread,
Apr 1, 2017, 4:36:46 AM4/1/17
to biomart-users
Hi,
I'm trying to query EnsEMBL zv10 database using Biomart perl API but i'm getting the following error :


Problems with the web server: 500 Server closed connection without sending any data back

Here is the code I'm using to query the database :

use BioMart::Initializer;
use BioMart::Query;
use BioMart::QueryRunner;


my $confFile = "mart_registry.xml";

my $action='cached';
my $initializer = BioMart::Initializer->new('registryFile'=>$confFile, 'action'=>$action);
my $registry = $initializer->getRegistry;


my $query = BioMart::Query->new('registry'=>$registry,'virtualSchemaName'=>'default');
$query
->setDataset("drerio_gene_ensembl");
$query
->addFilter("ensembl_gene_id", [$gene_id]);
$query
->addAttribute("external_gene_name");
$query
->addAttribute("zfin_id");
$query
->addAttribute("entrezgene");
$query
->formatter("CSV");


my $martout = IO::File->new('temporary/mart.csv', '>')or die("impossible de créer le fichier");
my $query_runner = BioMart::QueryRunner->new();
$query_runner
->uniqueRowsOnly(1);
$query_runner
->execute($query);
$query_runner
->printResults($martout);
$martout
->close;

Do you have any idea of what could be wrong ?

Thanks

Julien

Anthony Colombo

unread,
Apr 2, 2017, 11:12:46 PM4/2/17
to biomart-users
The server may be down.  I am using R biomaRt query and am getting an error "unable to connect to server" getBM()

Thomas Maurel

unread,
Apr 3, 2017, 10:54:17 AM4/3/17
to Julien Fumey, biomart-users
Dear Julien,

Please note that we have moved to a new system this release to generate and populate the ensembl marts filters/attributes. As a result, we have improved the consistency of our mart across the vertebrate and other ensembl divisions. The following filters and attributes names have changed and will affect script using the BiomaRt package.
Please find the full list below or on our FTP site: ftp://ftp.ensembl.org/pub/release-88/release_88_biomart_changes.txt

If you replace “zfin_id” with “zfin_id_id” in your script, it should work again.
Also please make sure to set the $action variable from “cached” to “clean”, your script will then re-generate the cache using our newly released 88 version.

Kind Regards,
Thomas
--
You received this message because you are subscribed to the Google Groups "biomart-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biomart-user...@googlegroups.com.
Visit this group at https://groups.google.com/group/biomart-users.
For more options, visit https://groups.google.com/d/optout.

--
Thomas Maurel
Bioinformatician - Ensembl Production Team
European Bioinformatics Institute (EMBL-EBI)
European Molecular Biology Laboratory
Wellcome Trust Genome Campus
Hinxton
Cambridge CB10 1SD
United Kingdom

Érica Souza

unread,
Aug 5, 2020, 3:35:49 PM8/5/20
to biomart-users
Now in 2020, I have the same problem...anyone knows if this could be a down in the server or could be another thing?

Thanks
Reply all
Reply to author
Forward
0 new messages