Dear Jonathan,

Thanks for your prompt response,

I changed the order of attributes and it works fine,

Regards,

Ernesto

On 11/01/10 14:44, Jonathan Guberman wrote:
Ernesto,

You seem to have uncovered a bug in the Biomart code. If the database is a URL source and the first column is empty, the results won't display. This problem doesn't occur for DB sources, which is why it works on the Reactome site directly but not on Central Portal. We're working to correct the problem on our end, but in the meantime there is an easy workaround, which is simply to change to order of the attributes so that a non-empty column comes first. I.e., in your Perl code, change the lines
$query->addAttribute("stableidentifier_identifier");
$query->addAttribute("reaction_db_id");
to
$query->addAttribute("reaction_db_id");
$query->addAttribute("stableidentifier_identifier");

I hope that helps for now, and I will let you know once the problem has been fixed.


*Jonathan Guberman, PhD*
Application Programmer
*
**Ontario Institute for Cancer Research**
*MaRS Centre, South Tower
101 College Street, Suite 800
Toronto, Ontario, Canada M5G 0A3

Tel:         647-260-7818
Toll-free: 1-866-678-6427
www.oicr.on.ca <http://www.oicr.on.ca>

On 2010-10-31, at 5:07 AM, Ernesto Lowy wrote:

Hi Arek,

Well, using the web gui at www.biomart.org <http://www.biomart.org> did not produce any result either. But using the Mart web gui at Reactome produced 649 entries,

BW,

E.
________________________________________
From: Arek Kasprzyk [arek.kaspr...@oicr.on.ca]
Sent: 30 October 2010 23:59
To: Ernesto Lowy; mart-dev@ebi.ac.uk <mailto:mart-dev@ebi.ac.uk>
Subject: Re: [mart-dev] Problem retrieving data for Arabidopsis Reactome using biomart perl API

Hi Ernesto,
Please check first if you can get it using web GUI. The problem maybe at the source


a


On 29/10/10 12:08 PM, "ernesto" <ernesto.l...@crg.es <mailto:ernesto.l...@crg.es>> wrote:

 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 <http://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





Arek Kasprzyk
Director, Bioinformatics Operations and Principal Investigator

Ontario Institute for Cancer Research
MaRS Centre, South Tower
101 College Street, Suite 800
Toronto, Ontario, Canada M5G 0A3

Tel:                        416-673-8559
Toll-free:             1-866-678-6427
www.oicr.on.ca <http://www.oicr.on.ca>

This message and any attachments may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this message in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this message may not be that of the organization.






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

Reply via email to