[Bioperl-guts-l] bioperl-live/Bio/Graphics/Glyph xyplot.pm, 1.33, 1.34

Lincoln Stein lstein at dev.open-bio.org
Sun Jun 3 17:19:22 EDT 2007


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

Modified Files:
	xyplot.pm 
Log Message:
added optional debug statements to the xyplot glyph

Index: xyplot.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/Graphics/Glyph/xyplot.pm,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** xyplot.pm	23 May 2007 22:42:20 -0000	1.33
--- xyplot.pm	3 Jun 2007 21:19:20 -0000	1.34
***************
*** 9,12 ****
--- 9,14 ----
  our $VERSION = ${Bio::Root::Version::VERSION};
  
+ use constant DEBUG=>0;
+ 
  my %SYMBOLS = (
  	       triangle => \&draw_triangle,
***************
*** 106,109 ****
--- 108,112 ----
      next unless defined $s;
      $_->{_y_position}   = $self->score2position($s);
+     warn "y_position = $_->{_y_position}" if DEBUG;
    }
    my $type           = $self->option('graph_type') || $self->option('graphtype') || 'boxes';
***************
*** 155,161 ****
  
    else {
!     warn "score = $score, _top = $self->{_top}, _bottom = $self->{_bottom}, max = $self->{_max_score}";
      my $position      = ($score-$self->{_min_score}) * $self->{_scale};
!     warn "position =$position";
      return $self->{_bottom} - $position;
    }
--- 158,164 ----
  
    else {
!     warn "score = $score, _top = $self->{_top}, _bottom = $self->{_bottom}, max = $self->{_max_score}, min=$self->{_min_score}" if DEBUG;
      my $position      = ($score-$self->{_min_score}) * $self->{_scale};
!     warn "position =$position" if DEBUG;
      return $self->{_bottom} - $position;
    }
***************
*** 168,172 ****
    return -min10(-$a) if $a<0;
    return max10($a*10)/10 if $a < 1;
!   
    my $l=int(log10($a));
    $l = 10**$l; 
--- 171,175 ----
    return -min10(-$a) if $a<0;
    return max10($a*10)/10 if $a < 1;
! 
    my $l=int(log10($a));
    $l = 10**$l; 
***************
*** 180,184 ****
    return -max10(-$a) if $a<0;
    return min10($a*10)/10 if $a < 1;
!   
    my $l=int(log10($a));
    $l = 10**$l; 
--- 183,187 ----
    return -max10(-$a) if $a<0;
    return min10($a*10)/10 if $a < 1;
! 
    my $l=int(log10($a));
    $l = 10**$l; 
***************
*** 275,279 ****
    # connect to center positions of each interval
    my $first_part = shift @parts;
- #  my ($x1,$x2) = ($first_part->{left},$first_part->{left}+$first_part->{width}-1);
    my ($x1,$y1,$x2,$y2) = $first_part->calculate_boundaries($left,$top);
    my $current_x = ($x1+$x2)/2;
--- 278,281 ----
***************
*** 281,285 ****
  
    for my $part (@parts) {
- #    ($x1,$x2) = ($part->{left},$part->{left}+$part->{width}-1);
      ($x1,$y1,$x2,$y2) = $part->calculate_boundaries($left,$top);
      my $next_x = ($x1+$x2)/2;
--- 283,286 ----
***************
*** 307,311 ****
  
    for my $part (@parts) {
- #    my ($x1,$x2) = ($part->{left},$part->{left}+$part->{width}-1);
      my ($x1,$y1,$x2,$y2) = $part->calculate_boundaries($left,$top);
      my $x = ($x1+$x2)/2;
--- 308,311 ----



More information about the Bioperl-guts-l mailing list