[Bioperl-l] multiple glyph elements in one track

Scott Cain cain at cshl.edu
Thu Dec 21 14:47:32 UTC 2006


Hello Anh Thu,

You can provide a callback for the glyph argument that returns different
glyphs depending on what you want to do (ie, how you've coded your
callback).  This example is from the perldoc for Bio::Graphics::Panel:

        $panel->add_track(\@exons,
                          -glyph => sub { my $feature = shift;
                                          $feature->source_tag eq ’curated’                                                    
                                                    ? ’ellipse’ : ’generic’; }
                         );

Scott

 
On Thu, 2006-12-21 at 15:31 +0100, Anh-Thu Tieu wrote:
> Hello,
> 
>  I use bioperl 1.5.2. Does anyone know how I could create two seperate 
> glyph elements on the same track with the Bio::Graphics::Panel module? 
> My aim is to have two (e.g. two different) clickable imagemap elements 
> on the same track. Until now I can merely create two glyph elements 
> (transcript2 or generic options) per track with only one imagemap 
> element (e.g. the same imagemap element is used for the entire track as 
> the entire (=both elements) glyph's coordinates are returned to the 
> image_and_map function as one set of coordinate).
> 
> Thank you for your help.
> 
> Best regards,
> 
> Anh Thu
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
-- 
------------------------------------------------------------------------
Scott Cain, Ph. D.                                         cain at cshl.edu
GMOD Coordinator (http://www.gmod.org/)                     216-392-3087
Cold Spring Harbor Laboratory
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.open-bio.org/pipermail/bioperl-l/attachments/20061221/9ec29c3e/attachment.sig>


More information about the Bioperl-l mailing list