[Bioperl-l] Bio:Graphics for drawing secondary structure

Scott Cain cain.cshl at gmail.com
Thu Aug 7 14:08:39 UTC 2008


Hi Matthew,

I don't have any code examples, but people have used GBrowse for
protein secondary structure, which uses Bio::Graphics underneath the
hood.

If you want to put more than one glyph and/or more than one color in a
track, it is fairly easy.  You just need to provide a callback for
each option when you create the track, like this:

  $panel->add_track($features_array_ref,
                    -glyph       => sub { #code to set the glyph
according the attributes of the feature  },
                    -bgcolor     => sub { #code to set the color },
                    -fgcolor     => 'black',
                 ...etc...
  );

For more information, see the biographics howto:

  http://www.bioperl.org/wiki/HOWTO:Graphics

Scott



On Thu, Aug 7, 2008 at 8:42 AM, Matthew Betts <betts at embl.de> wrote:
>
> Hi,
>
> Has any one tried to draw secondary structure with Bio::Graphics? i.e. two
> different types of glyph with different colours on the same track.
>
> Could use a hash reference to get the different glyph types (would be nice
> if there was a cylinder glyph and a thick arrow glyph), or heterogeneous
> segments to get the different colours, but I can't see how to do both at
> the same time.
>
> Any example code or suggestions on how I could implement it would be
> great.
>
> Thanks,
>
> Matthew
>
> --
> Matthew Betts PhD, Russell Group (Structural Bioinformatics)
> EMBL, Meyerhofstrasse 1, D-69117 Heidelberg, Germany
> phone: +49 (0)6221 387 8305; mailto:betts at embl.de
> _______________________________________________
> 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.cshl at gmail.com
GMOD Coordinator (http://www.gmod.org/) 216-392-3087
Cold Spring Harbor Laboratory



More information about the Bioperl-l mailing list