[Bioperl-l] Bio::Graphics::Panel

Crabtree, Jonathan crabtree at tigr.org
Thu Aug 5 09:24:35 EDT 2004


If you want to generate two images you'll need to direct $panel->gd->gif
to one file, and $panel1->gd->gif to a second file.  At the moment
you're printing both to STDOUT, so it's not surprising that a subsequent
display of that data shows only the first of the two images (since the
program you're using to display the image probably gets to the end of
the first GIF and thinks that it's done.)  If you're rendering images
for display on the web you could add a parameter to your script that
tells it whether to generate the first of the two images or the second
of the two.  The HTML page that displays the images (which could itself
be generated by a script) would then contain two <IMG> tags, one for the
first image, and the other for the second.

If you want to render multiple Bio::Graphics::Panel images into a single
GIF/PNG, this can be done, although there are some caveats.  I posted
some suggestions about this a while ago, so a search of the list archive
should turn them up.


> -----Original Message-----
> From: bioperl-l-bounces at portal.open-bio.org 
> [mailto:bioperl-l-bounces at portal.open-bio.org] On Behalf Of 
> Miroslava Cuperlovic-Culf
> Sent: Thursday, August 05, 2004 8:52 AM
> To: BioPerl
> Subject: [Bioperl-l] Bio::Graphics::Panel
> Dear All,
> I would like to use Bio::Graphics to present exons  mapped to 
> dna in a 
> gff file.  I get nice figure for exact lengths of exons and 
> introns. But 
> as exons are much shorter than introns it is impossible to see their 
> lengths. Thus I would like to either present exons in correct lengths 
> and introns only as "..." or as a number of bases  or 
> alternatively as 
> several figures, one for each exon. Is either of these 
> possible?  From perldoc for Bio::Graphics I understood that 
> it is possible to open 
> several pictures from one program so I tried to use:
> ...
>  my $panel = Bio::Graphics::Panel->new( ...
> ...
> print $panel->gd->gif;
> $panel ->finished;...
> my $panel1 = Bio::Graphics::Panel->new( ...
> ...
> print $panel1->gd->gif;
> $panel1 ->finished;
> but in this way I only got the first panel opened.
> What am I doing wrong?
> Thanks very much for the ongoing help
> Mira
> -

More information about the Bioperl-l mailing list