[InterMine Dev] Perl webservice bug

JD Wong jdmswong at gmail.com
Fri Feb 3 18:26:36 GMT 2012


That fixed it, thank you for the quick patch!

-JD

On Fri, Feb 3, 2012 at 7:15 AM, Alex Kalderimis <alex at intermine.org> wrote:

> 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
>
> _______________________________________________
> dev mailing list
> dev at intermine.org
> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.intermine.org/pipermail/dev/attachments/20120203/3ed6467b/attachment.html>


More information about the dev mailing list