[InterMine Dev] Perl webservice bug

JD Wong jdmswong at gmail.com
Thu Feb 2 18:28:13 GMT 2012


The perl webservice will not fetch an object reference after the first in a
sequence.

Consider:
use feature ':5.10';
use strict;

use Webservice::InterMine "flymine.org/query";

my $service = get_service();
#my $gene = resultset('Gene')->select('*')->where(
'chromosome.primaryIdentifier' => '2R',
my $query = $service->select('Gene.*')->where(
'chromosome.primaryIdentifier' => '2R',
  'chromosomeLocation.start' => { '>' => 9100000 },
  'chromosomeLocation.end' => { '<' => 9200000 },
  'organism.species' => 'melanogaster',
 );
my $list = $query->results( as => 'objects' );

foreach my $gene ( @$list*[3..7]* ){
    printf ("%s => %s\n", $gene->getPrimaryIdentifier,
*    #defined $gene->organism ? $gene->organism->species : "undef org");*
*    defined $gene->chromosomeLocation ? $gene->chromosomeLocation->start :
"undef chr");*
}

say '<=== End execution ===>';

This code only produces:
FBgn0043010 => 9108444
FBgn0011763 => undef chr
FBgn0040754 => undef chr
FBgn0033813 => undef chr
<=== End execution ===>

Only the first gene reference object is resolved no matter what slice of
@$list is iterated through or whether it asks for organism or
chromosomelocation.
This seems like a web service issue, bug perhaps?

Cheers,
-JD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.intermine.org/pipermail/dev/attachments/20120202/42b6f13f/attachment.html>


More information about the dev mailing list