Skip to content

Commit

Permalink
wiggle file processing was transiently broken
Browse files Browse the repository at this point in the history
  • Loading branch information
lstein committed Mar 26, 2009
1 parent e5b7425 commit f3170c3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/Bio/Graphics/Glyph/wiggle_density.pm
@@ -1,5 +1,5 @@
package Bio::Graphics::Glyph::wiggle_density;
# $Id: wiggle_density.pm,v 1.4 2009-03-23 17:24:14 lstein Exp $
# $Id: wiggle_density.pm,v 1.5 2009-03-26 03:13:08 lstein Exp $

use strict;
use base qw(Bio::Graphics::Glyph::box Bio::Graphics::Glyph::smoothing Bio::Graphics::Glyph::wiggle_minmax);
Expand Down Expand Up @@ -53,7 +53,7 @@ sub draw_wigfile {
my $wigfile = shift;

eval "require Bio::Graphics::Wiggle" unless Bio::Graphics::Wiggle->can('new');
my $wig = $wigfile->isa('Bio::Graphics::Wiggle')
my $wig = ref $wigfile &&a $wigfile->isa('Bio::Graphics::Wiggle')
? $wigfile
: eval { Bio::Graphics::Wiggle->new($wigfile) };

Expand Down
2 changes: 1 addition & 1 deletion lib/Bio/Graphics/Glyph/wiggle_xyplot.pm
Expand Up @@ -30,7 +30,7 @@ sub draw_wigfile {
my $wigfile = shift;

eval "require Bio::Graphics::Wiggle" unless Bio::Graphics::Wiggle->can('new');
my $wig = $wigfile->isa('Bio::Graphics::Wiggle')
my $wig = ref $wigfile && $wigfile->isa('Bio::Graphics::Wiggle')
? $wigfile
: eval { Bio::Graphics::Wiggle->new($wigfile) };
unless ($wig) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Bio/Graphics/Wiggle.pm
Expand Up @@ -228,7 +228,7 @@ use constant HEADER_LEN => 256;
# seqid, step, min, max, span, mean, stdev, version, start
use constant HEADER => '(Z50LFFLFFSL)@'.HEADER_LEN;
use constant BODY => 'C';
use constant DEBUG => 1;
use constant DEBUG => 0;
use constant DEFAULT_SMOOTHING => 'mean';
use constant VERSION => 0;

Expand Down
2 changes: 1 addition & 1 deletion lib/Bio/Graphics/Wiggle/Loader.pm
Expand Up @@ -351,7 +351,7 @@ sub minmax {
my $chrom = $self->{track_options}{chrom};

if ((my $size = stat($infh)->size) > BIG_FILE) {
warn "wiggle file is very large; resorting to genome-wide sample statistics";
warn "Wiggle file is very large; resorting to genome-wide sample statistics for $chrom.\n";
$self->{FILEWIDE_STATS} ||= $self->sample_file($infh,BIG_FILE_SAMPLES);
for (keys %{$self->{FILEWIDE_STATS}}) {
$seqids->{$chrom}{$_} = $self->{FILEWIDE_STATS}{$_};
Expand Down

0 comments on commit f3170c3

Please sign in to comment.