[biomart-users] Perl API error 500 when querying EnsEMBL

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[biomart-users] Perl API error 500 when querying EnsEMBL

Julien Fumey
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

--
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 [hidden email].
Visit this group at https://groups.google.com/group/biomart-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[biomart-users] Re: Perl API error 500 when querying EnsEMBL

Anthony Colombo
The server may be down.  I am using R biomaRt query and am getting an error "unable to connect to server" getBM()

On Saturday, April 1, 2017 at 1:36:46 AM UTC-7, Julien Fumey wrote:
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

--
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 [hidden email].
Visit this group at https://groups.google.com/group/biomart-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [biomart-users] Perl API error 500 when querying EnsEMBL

Thomas Maurel
In reply to this post by Julien Fumey
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
On 1 Apr 2017, at 09:36, Julien Fumey <[hidden email]> wrote:

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

--
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 [hidden email].
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

--
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 [hidden email].
Visit this group at https://groups.google.com/group/biomart-users.
For more options, visit https://groups.google.com/d/optout.