[Bioperl-guts-l] bioperl-live/Bio/Graphics FeatureBase.pm, 1.19, 1.20 Glyph.pm, 1.134, 1.135

Lincoln Stein lstein at dev.open-bio.org
Tue Jan 30 17:21:45 EST 2007


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

Modified Files:
	FeatureBase.pm Glyph.pm 
Log Message:
fixed some of the Glyph documentation; Bio::Graphics::FeatureBase->to_FTString() behaves a little more rationally on minus strand features

Index: Glyph.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/Graphics/Glyph.pm,v
retrieving revision 1.134
retrieving revision 1.135
diff -C2 -d -r1.134 -r1.135
*** Glyph.pm	16 Jan 2007 12:42:13 -0000	1.134
--- Glyph.pm	30 Jan 2007 22:21:43 -0000	1.135
***************
*** 420,427 ****
    my $index = $self->option($color);
    # turn into a color index
!   return $self->factory->translate_color($index) if defined $index;
    return 0;
  }
  
  sub connector {
    return shift->option('connector', at _);
--- 420,434 ----
    my $index = $self->option($color);
    # turn into a color index
!   return $self->translate_color($index) if defined $index;
    return 0;
  }
  
+ sub translate_color {
+   my $self = shift;
+   my $color = shift;
+   # turn into a color index
+   return $self->factory->translate_color($color);
+ }
+ 
  sub connector {
    return shift->option('connector', at _);
***************
*** 1413,1417 ****
  changed.
  
- 
  =item $font = $glyph-E<gt>font
  
--- 1420,1423 ----
***************
*** 1422,1426 ****
  Return the value of the indicated option.
  
! =item $index = $glyph-E<gt>color($color)
  
  Given a symbolic or #RRGGBB-form color name, returns its GD index.
--- 1428,1437 ----
  Return the value of the indicated option.
  
! =item $index = $glyph-E<gt>color($option_name)
! 
! Given an option name that corresponds to a color (e.g. 'fgcolor') look
! up the option and translate it into a GD color index.
! 
! =item $index = $glyph-E<gt>translate_color($color)
  
  Given a symbolic or #RRGGBB-form color name, returns its GD index.
***************
*** 1432,1437 ****
--- 1443,1457 ----
  subparts (e.g. exons) are level 1 and so forth.
  
+ =item @parts = $glyph-E<gt>parts
+ 
+ For glyphs that can contain subparts (e.g. the segments glyph), this
+ method will return the list of subglyphs it contains. Subglyphs are
+ created automatically by the new() method and are created subject to
+ the maximum recursion depth specified by the maxdepth() method and/or
+ the -maxdepth option.
+ 
  =back
  
+ 
  Setting an option:
  

Index: FeatureBase.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/Graphics/FeatureBase.pm,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** FeatureBase.pm	1 Nov 2006 17:25:04 -0000	1.19
--- FeatureBase.pm	30 Jan 2007 22:21:43 -0000	1.20
***************
*** 444,448 ****
    my $low  = $self->min_start;
    my $high = $self->max_end;
!   return "$low..$high";
  }
  sub phase { shift->{phase} }
--- 444,453 ----
    my $low  = $self->min_start;
    my $high = $self->max_end;
!   my $strand = $self->strand;
!   my $str = defined $strand && $strand<0 ? "complement($low..$high)" : "$low..$high";
!   if (my $id = $self->seq_id()) {
!     $str = $id . ":" . $str;
!   }
!   $str;
  }
  sub phase { shift->{phase} }



More information about the Bioperl-guts-l mailing list