[Bioperl-guts-l] bioperl-live/Bio/Graphics/Glyph Factory.pm, 1.17,
1.18 arrow.pm, 1.23, 1.24 processed_transcript.pm, 1.8, 1.9
Lincoln Stein
lstein at pub.open-bio.org
Sat Apr 16 14:44:38 EDT 2005
Update of /home/repository/bioperl/bioperl-live/Bio/Graphics/Glyph
In directory pub.open-bio.org:/tmp/cvs-serv22019/Bio/Graphics/Glyph
Modified Files:
Factory.pm arrow.pm processed_transcript.pm
Log Message:
fiddled with arrow glyph to fix off-by-one errors that appear at base pair scales
Index: arrow.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/Graphics/Glyph/arrow.pm,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** arrow.pm 30 Jun 2004 21:57:27 -0000 1.23
--- arrow.pm 16 Apr 2005 18:44:36 -0000 1.24
***************
*** 161,165 ****
my $first_tick = $major_interval * int(0.5 + $start/$major_interval);
! my $last_tick = $major_interval * int(0.5 + $stop/$major_interval);
for (my $i = $first_tick; $i <= $last_tick; $i += $major_interval) {
--- 161,165 ----
my $first_tick = $major_interval * int(0.5 + $start/$major_interval);
! my $last_tick = $major_interval * int(0.5 + ($stop+2)/$major_interval);
for (my $i = $first_tick; $i <= $last_tick; $i += $major_interval) {
***************
*** 176,190 ****
}
! $abs = $end - $abs if $flipped;
my $tickpos = $dx + $self->map_pt($abs);
! next if $tickpos < $left or $tickpos > $right;
! $gd->line($tickpos,$center-$a2,$tickpos,$center+$a2,$tickpen);
my $label = $scale ? $i / $scale : $i;
my $scaled = $label/$divisor;
$label = sprintf($format,$scaled,$unit_label);
! my $middle = $tickpos - (length($label) * $width)/2;
! next if $middle < $left or $middle > $right;
$gd->string($font,$middle,$center+$a2-1,$label,$font_color)
--- 176,196 ----
}
! $abs = $end - $abs + 1 if $flipped;
my $tickpos = $dx + $self->map_pt($abs);
! next if $tickpos < $x1 || $tickpos > $x2;
!
! $gd->line($tickpos,$center-$a2,$tickpos,$center+$a2,$tickpen)
! unless $tickpos < $left or $tickpos > $right;
!
my $label = $scale ? $i / $scale : $i;
my $scaled = $label/$divisor;
$label = sprintf($format,$scaled,$unit_label);
! my $label_len = length($label) * $width;
!
! my $middle = $tickpos - $label_len/2;
! $middle = $left if $middle < $left;
! $middle = $x2 - $label_len if $middle+$label_len > $x2;
$gd->string($font,$middle,$center+$a2-1,$label,$font_color)
***************
*** 195,199 ****
$first_tick = $minor_interval * int(0.5 + $start/$minor_interval);
! $last_tick = $minor_interval * int(0.5 + $stop/$minor_interval);
my $a4 = $self->height/4;
--- 201,205 ----
$first_tick = $minor_interval * int(0.5 + $start/$minor_interval);
! $last_tick = $minor_interval * int(0.5 + ($stop+2)/$minor_interval);
my $a4 = $self->height/4;
Index: processed_transcript.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/Graphics/Glyph/processed_transcript.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** processed_transcript.pm 13 Apr 2005 21:16:23 -0000 1.8
--- processed_transcript.pm 16 Apr 2005 18:44:36 -0000 1.9
***************
*** 22,27 ****
foreach ($self->parts) {
$exons++ if $_->feature->type =~ /exon/i;
! $utrs++ if $_->feature->type =~ /utr/i;
! $cds++ if $_->feature->type =~ /cds/i;
$self->configure(implied_utrs=>1) if $exons && $cds && !$utrs;
$self->configure(adjust_exons=>1) if $exons && $utrs;
--- 22,27 ----
foreach ($self->parts) {
$exons++ if $_->feature->type =~ /exon/i;
! $utrs++ if $_->feature->type =~ /utr$/i;
! $cds++ if $_->feature->type =~ /^cds/i;
$self->configure(implied_utrs=>1) if $exons && $cds && !$utrs;
$self->configure(adjust_exons=>1) if $exons && $utrs;
Index: Factory.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/Graphics/Glyph/Factory.pm,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** Factory.pm 18 Sep 2004 06:04:55 -0000 1.17
--- Factory.pm 16 Apr 2005 18:44:36 -0000 1.18
***************
*** 311,315 ****
unless ($LOADED_GLYPHS{$glyphclass}++) {
! carp("the requested glyph class, ``$type'' is not available: $@")
unless (eval "require $glyphclass");
}
--- 311,315 ----
unless ($LOADED_GLYPHS{$glyphclass}++) {
! carp("The requested glyph class, ``$type'' is not available: $@")
unless (eval "require $glyphclass");
}
More information about the Bioperl-guts-l
mailing list