Skip to content

Commit

Permalink
copy code over from wiggle_data to more properly handle the draw_cove…
Browse files Browse the repository at this point in the history
…rage implementation
  • Loading branch information
hyphaltip committed Mar 20, 2012
1 parent 0d2e7b1 commit af47c12
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/Bio/Graphics/Glyph/wiggle_xyplot.pm
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,15 @@ sub draw {

sub draw_coverage {
my $self = shift;
my $feature = shift;
my $feature = shift;
my $array = shift;

$array = [split ',',$array] unless ref $array;
if (! $array || ref($array) ne 'ARRAY'){
unshift(@_,$array);
my @arr = (eval{$feature->get_tag_values('coverage')});
$array = $arr[0];
} else {
$array = [split ',',$array] unless ref $array;
}
return unless @$array;

my ($start,$end) = $self->effective_bounds($feature);
Expand Down

0 comments on commit af47c12

Please sign in to comment.