[Bioperl-l] Problem with Graphics

Iain Wallace iain.m.wallace at gmail.com
Wed Jan 11 07:01:24 EST 2006


Thanks Jason,
That works for me even though I am on linux (not sure why, but it does)

Iain

On 12/14/05, Jason Stajich <jason.stajich at duke.edu> wrote:
> Are you on windows?
>
> Try adding this before calling print.
> binmode (STDOUT);
>
> On Dec 14, 2005, at 10:59 AM, Iain Wallace wrote:
>
> > Hi,
> >
> > I am trying to use the Bio::Graphics module, but am unable to view my
> > output file. When I try to view the file I am told the file is
> > corrupt.
> >
> > Below is the code that I tried and it seems to work (i.e. it doesn't
> > crash and generates an output file)
> >
> > Unfortunately I have no idea what the error could be.
> > Any help/pointers would be greatly appreciated
> >
> > Thanks
> >
> > Iain
> > ---- Code from the How To ---
> >
> > #!/usr/bin/perl
> >
> >     use strict;
> >
> >     use Bio::Graphics;
> >     use Bio::SeqFeature::Generic;
> >
> >   my $panel = Bio::Graphics::Panel->new(-length => 1000,-width  =>
> > 800);
> >     my $track = $panel->add_track(-glyph => 'generic',-label  => 1);
> >
> >     while (<>) { # read blast file
> >       chomp;
> >       next if /^\#/;  # ignore comments
> >      my($name,$score,$start,$end) = split /\t+/;
> >      my $feature =
> > Bio::SeqFeature::Generic->new(-display_name=>$name,-score=>$score,
> >                                                  -start=>$start,-
> > end=>$end);
> >      $track->add_feature($feature);
> >    }
> >
> >    print $panel->png;
> >
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at portal.open-bio.org
> > http://portal.open-bio.org/mailman/listinfo/bioperl-l
>
> --
> Jason Stajich
> Duke University
> http://www.duke.edu/~jes12
>
>
>



More information about the Bioperl-l mailing list