Hi,

I am trying to use the biomart perl API to access Reactome data for Arabidopsis. The script I've written returns 0 entries. When I repeat the same query but using the BioMart section of Reactome (http://www.reactome.org/cgi-bin/mart) it returns 649 entries. What it's happening or what am I doing wrong?

The perl script I've used to access BioMart is:

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

my $confFile = "/users/bi/elowy/src/biomart-perl/conf/new_registry.xml";
#
# NB: change action to 'clean' if you wish to start a fresh configuration
# and to 'cached' if you want to skip configuration step on subsequent runs from the same registry
#

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

my $query = BioMart::Query->new('registry'=>$registry,'virtualSchemaName'=>'default');

$query->setDataset("reaction");
$query->addFilter("species_selection", ["Arabidopsis thaliana"]);
$query->addAttribute("stableidentifier_identifier");
$query->addAttribute("reaction_db_id");

$query->formatter("TSV");

my $query_runner = BioMart::QueryRunner->new();
############################## GET COUNT ############################
# $query->count(1);
# $query_runner->execute($query);
# print $query_runner->getCount();
#####################################################################

And the config file of my Perl api is:

<MartRegistry><MartURLLocation database="test_reactome_mart" default="1" displayName="REACTOME" host="banon.cshl.edu" includeDatasets="complex,pathway,reaction,interaction" martUser="" name="REACTOME" path="/biomart/martservice" port="5555" redirect="1" serverVirtualSchema="default" visible="1" /></MartRegistry>

Thanks,

Ernesto

--
Ernesto Lowy, PhD
Bioinformatics Programmer
Bioinformatics Core Facility
CRG-Center for Genomic Regulation
c/Doctor Aiguader, 88
08003 Barcelona, Spain

Reply via email to