[Bioperl-guts-l] bioperl-live/Bio/Graphics/Glyph Factory.pm, 1.29, 1.30

Lincoln Stein lstein at dev.open-bio.org
Mon Feb 5 18:05:03 EST 2007


Update of /home/repository/bioperl/bioperl-live/Bio/Graphics/Glyph
In directory dev.open-bio.org:/tmp/cvs-serv15707/Bio/Graphics/Glyph

Modified Files:
	Factory.pm 
Log Message:
changes to glyph creation to more easily allow glyphs to explicitly control types of their subglyphs

Index: Factory.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/Graphics/Glyph/Factory.pm,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** Factory.pm	3 Feb 2007 21:44:22 -0000	1.29
--- Factory.pm	5 Feb 2007 23:05:01 -0000	1.30
***************
*** 281,288 ****
  }
  
! =head2 glyph
  
!   Title    : glyph
!   Usage    : @glyphs = $f->glyph($level,$feature1,$feature2...)
    Function : transform features into glyphs.
    Returns  : a list of Bio::Graphics::Glyph objects
--- 281,288 ----
  }
  
! =head2 make_glyph
  
!   Title    : make_glyph
!   Usage    : @glyphs = $f->glyph($level,[$type,]$feature1,$feature2...)
    Function : transform features into glyphs.
    Returns  : a list of Bio::Graphics::Glyph objects
***************
*** 291,295 ****
  
  The level is used to track the level of nesting of features that have
! subfeatures.
  
  =cut
--- 291,295 ----
  
  The level is used to track the level of nesting of features that have
! subfeatures. The option $type argument can be used to force the glyph type
  
  =cut
***************
*** 299,308 ****
    my $self  = shift;
    my $level = shift;
    my @result;
    my $panel = $self->panel;
!   my $flip   = $panel->flip;
  
    for my $f (@_) {
!     my $type = $self->feature_to_glyph($f);
      my $glyphclass = 'Bio::Graphics::Glyph';
      $type ||= 'generic';
--- 299,310 ----
    my $self  = shift;
    my $level = shift;
+   my $forced_type  = shift unless ref($_[0]);
+ 
    my @result;
    my $panel = $self->panel;
!   my $flip  = $panel->flip;
  
    for my $f (@_) {
!     my $type = $forced_type || $self->feature_to_glyph($f);
      my $glyphclass = 'Bio::Graphics::Glyph';
      $type ||= 'generic';
***************
*** 325,328 ****
--- 327,331 ----
  }
  
+ 
  =head2 feature_to_glyph
  



More information about the Bioperl-guts-l mailing list