[Bioperl-l] Bio::Graphics 2.24: fails to draw tracks with split locations?

Adam Sjøgren adsj at novozymes.com
Wed Mar 27 12:19:01 UTC 2013


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

and

  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/Glyph.pm line 706, <DATA> line 192.

The test script looks like this:

== =
#!/usr/bin/perl

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)=@_;

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

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

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


  Best regards,

    Adam

-- 
                                                          Adam Sjøgren
                                                    adsj at novozymes.com




More information about the Bioperl-l mailing list