Adam Sjøgren | 27 Mar 13:19 2013

Bio::Graphics 2.24: fails to draw tracks with split locations?

We just upgraded Bio::Graphics from 1.995 to 2.24, and noticed a problem
with drawing panels that have tracks with split locations - an exception
is thrown in 2.24.

Here are the outputs of the test-script I've made:

  Bio::Graphics::VERSION: 1.995
  Simple location  ... ok
  Join location  ... ok


  Bio::Graphics::VERSION: 2.24
  Simple location  ... ok
  Join location  ... Can't locate object method "has_tag" via package "Bio::Location::Simple" at
/usr/share/perl5/Bio/Graphics/ line 706, <DATA> line 192.

The test script looks like this:

== =

use strict;
use warnings;

use Bio::Graphics;

use Bio::SeqFeature::Generic;
use Bio::Factory::FTLocationFactory;

print "Bio::Graphics::VERSION: $Bio::Graphics::VERSION\n";

test_panel_with_location('1..12',              'Simple location');
test_panel_with_location('join(1..10,15..20)', 'Join location');

sub test_panel_with_location {
    my ($location_string, $msg)= <at> _;

    print "$msg  ... ";
    my $location=Bio::Factory::FTLocationFactory->from_string($location_string);
    my $seq=Bio::SeqFeature::Generic->new;

    my $panel=Bio::Graphics::Panel->new(-length=>500, -width=>500);
    eval { $panel->png };
    print $ <at>  || "ok\n";
== =

Am I doing something wrong in the script, or is this a regression in
Bio::Graphics somewhere?

  Best regards,



                                                          Adam Sjøgren
                                                    adsj <at>