[InterMine Dev] Perl webservice bug

Alex Kalderimis alex at intermine.org
Fri Feb 3 12:15:08 GMT 2012


A fix for this has been released as Webservice::InterMine 0.9911. This
should also fetch the new version of InterMine::Model (0.9901), where
the issue actually lay.

This issue does not affect the other languages that support lazy
fetching (python and ruby).

Thanks again for a helpful and complete bug report.

Alex

On 02/02/12 18:28, JD Wong wrote:
> 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 <http://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
> 
> 
> _______________________________________________
> dev mailing list
> dev at intermine.org
> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev



More information about the dev mailing list