Skip to content

Commit

Permalink
support get_tag_values() and get_SeqFeatures() calls rather than nons…
Browse files Browse the repository at this point in the history
…tandard Bio::Graphics::Feature API
  • Loading branch information
lstein committed Mar 17, 2009
1 parent a8296b6 commit 3e11d98
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions lib/Bio/Graphics/Glyph/ideogram.pm
@@ -1,6 +1,6 @@
package Bio::Graphics::Glyph::ideogram;

# $Id: ideogram.pm,v 1.3 2009-03-10 16:02:58 scottcain Exp $
# $Id: ideogram.pm,v 1.4 2009-03-17 12:45:07 lstein Exp $
# Glyph to draw chromosome ideograms

use strict qw/vars refs/;
Expand Down Expand Up @@ -74,8 +74,8 @@ sub draw_component {
# force odd width so telomere arcs are centered
$y2 ++ if ($y2 - $y1) % 2;

my ($stain) = $feat->attributes('stain');
($stain) = $feat->attributes('Stain') unless $stain;
my ($stain) = $feat->get_tag_values('stain');
($stain) = $feat->get_tag_values('Stain') unless $stain;

# Some genome sequences don't contain substantial telomere sequence (i.e. Arabidopsis)
# We can suggest their presence at the tips of the chromosomes by setting fake_telomeres = 1
Expand Down Expand Up @@ -316,7 +316,7 @@ sub parts {
my $self = shift;
my $f = $self->feature;
my $level = $self->level + 1;
my @subf = sort {$a->start <=> $b->start} $f->segments;
my @subf = sort {$a->start <=> $b->start} $f->get_SeqFeatures;
return $self->factory->make_glyph($level,@subf);
}

Expand Down
6 changes: 3 additions & 3 deletions lib/Bio/Graphics/Glyph/wiggle_xyplot.pm
Expand Up @@ -182,8 +182,8 @@ sub draw_plot {
my $y1 = $bottom - ($mean+$variance - $min_score) * $y_scale;
my $y2 = $bottom - ($mean-$variance - $min_score) * $y_scale;
my $y = $bottom - ($mean - $min_score) * $y_scale;
my $mean_color = $self->panel->translate_color('red:0.25');
my $variance_color = $self->panel->translate_color('grey:0.05');
my $mean_color = $self->panel->translate_color('yellow:0.80');
my $variance_color = $self->panel->translate_color('grey:0.25');
$gd->filledRectangle($left,$y1,$right,$y2,$variance_color);
$gd->line($left,$y,$right,$y,$mean_color);

Expand All @@ -194,7 +194,7 @@ sub draw_plot {
$gd->string($font,$x1,$y1-$font->height/2,'+1sd',$fcolor);
$gd->string($font,$x1,$y2-$font->height/2,'-1sd',$fcolor);
$gd->string($font,$x1,$y2-$font->height/2,'-1sd',$fcolor);
$gd->string($font,$x2,$y -$font->height/2,'mn', $fcolor);
$gd->string($font,$x2,$y -$font->height/2,'mn', $variance_color);
}
}

Expand Down

0 comments on commit 3e11d98

Please sign in to comment.