[Bioperl-l] Can Bio::Graphics render a muti_segments picture?

tongw tongw at genomics.org.cn
Wed May 14 18:23:05 EDT 2003


Hi, Lincoln, 
        I met the same problem emerged in the mail of Lucas Quincy Ton
in Feb 3,2003:
        "Using the 'dna' glyph of Bio::Graphics  to render GC-content
plot, I get the plot but with just 
a straight line in the middle (50%) from lelf to right".  And you
answered, "I have checked in a new version of the dna.pm module that
should fix this so that the GC content glyph will work 
correctly".
        So I want to know whether the problem in dna glyph has been
fixed in bioperl version 1.2.
 
 
Wei Tong


-----Original Message-----
From: Lincoln Stein [mailto:lstein at cshl.org] 
Sent: 2003Äê5ÔÂ14ÈÕ 05:41
To: tongw
Cc: bioperl-l at bioperl.org
Subject: Re: [Bioperl-l] Can Bio::Graphics render a muti_segments
picture?


Hi Wei,

If you are trying to wrap the picture so that it spans multiple lines,
like a 
paragraph of text, then Bio::Graphics won't do that automatically.  The
best 
that you can do is to generate one very long GD image, and then to break
it 
into small rectangles and paste them back together into the desired
geometry 
using the $gd->copy() function.

Lincoln


On Monday 12 May 2003 11:00 pm, tongw wrote:
> Hi, dear Lincoln:
>        Thanks for your so quick response. It`s the problem of my 
> English expression about my previous question. My puzzle is:
>     When your sequence is too long to be drawn in one line, can 
> Bio::Graphics help us to draw the long sequence in muti_parts, such as

> drawing a 200k sequence in two parts, each is 100k. But not to say how

> to draw  a muti_segments feature in a sequence.
>        Because I want to write a script to draw the picture of genes` 
> annotation of small genomes by the Bio::Graphics module, which are too

> long to display in one line. Kind Regards.
>                                                     Wei Tong
>
>
> -----Original Message-----
> From: Lincoln Stein [mailto:lstein at cshl.org]
> Sent: 2003Äê5ÔÂ12ÈÕ 21:54
> To: tongw; bioperl-l at bioperl.org
> Subject: Re: [Bioperl-l] Can Bio::Graphics render a muti_segments 
> picture?
>
>
> Here's an example of drawing a multi-segment object:
>
> use strict;
> use Bio::Graphics;
> use Bio::SeqFeature::Generic;
>
> my $Generic = 'Bio::SeqFeature::Generic';  # to reduce typing
>
> # create a feature to use for the scale arrow
> my $whole_region = $Generic->new(-start=>1, 
> -end=>10000,-seq_id=>'whole');
>
> # create a multi-segment feature
> my $blue1        =
> $Generic->new(-start=>5000,-end=>9000,-seq_id=>'blue1');
> $blue1->add_SeqFeature($Generic->new(-start=>5000,-end=>6000));
> $blue1->add_SeqFeature($Generic->new(-start=>7000,-end=>7500));
> $blue1->add_SeqFeature($Generic->new(-start=>8000,-end=>9000));
>
> my $panel = 
> Bio::Graphics::Panel->new(-segment=>$whole_region,-width=>800);
> $panel->add_track($whole_region,
>                   -glyph  => 'arrow',
>                   -double => 1,
>                   -tick   => 2);
>
> $panel->add_track($blue1,
>                   -glyph   => 'segments',
>                   -label   => 1,
>                   -bgcolor => 'blue');
>
> print $panel->png;
>
> Best,
>
> Lincoln
>
> On Monday 12 May 2003 06:18 am, tongw wrote:
> > Greeting all, especially the developers of Bioperl:
> >     It`s my first time to locate the mail list of Bioperl, and I 
> > have applied the Bioperl modules to sovle the problems in my 
> > research, which is more comfotable than write the perl scripts, 
> > specially in the
> >
> > format changing and drawing the picture by GD module.
> >   But I meet a question: I think the Bio::Graphics only draw the 
> > whole
> >
> > sequence in one segment. I want to know whether there is some 
> > methods to render a muti_segments picture, and it is more necessary 
> > when the sequence is very long. Kind Regards. Specially thank 
> > Lincoln, your howto docment about Graphics helps me to grasp the 
> > main usages in graphics module.
> >
> >                                                        Wei Tong
> >
> >
> > ============================================
> >
> > Wei Tong
> >
> > Bioinformatics Department
> > Beijing Genomics Institute/
> > Genomics & Bioinformatics Center Chinese Academy of Science Beijing 
> > Airport Industrial Zone B6 Beijing 101300, P.R. China
> >
> > Tel: 0086-10-80481833 (Office)
> > Email : tongw at genomics.org.cn
> > http://www.genomics.org.cn 
> > ============================================
> >
> >
> >
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at bioperl.org 
> > http://pw600a.bioperl.org/mailman/listinfo/bioperl-l

-- 
========================================================================
Lincoln D. Stein                           Cold Spring Harbor Laboratory
lstein at cshl.org			                  Cold Spring Harbor, NY
========================================================================





More information about the Bioperl-l mailing list