Subject: | statistical_summary error when drawing Bio::Graphics::Wiggle object |
Date: | Thu, 14 Jun 2012 09:18:54 -0700 (PDT) |
To: | <bug-Bio-Graphics [...] rt.cpan.org> |
From: | "Stephen Montgomery" <smontgom [...] stanford.edu> |
Hi -
When using the Bio::Graphics package for loading and visualizing UCSC
format WIG files with the following code
my $wig_file = "read_depth.wig.txt"; ##file in UCSC WIG format
my $loader = Bio::Graphics::Wiggle::Loader->new('data/', 'wib');
my $fh = IO::File->new($wig_file);
$loader->load($fh);
my $wig = $loader->current_track->{seqids}->{$chr}->{wig}; ## this is a
confirmed Bio::Graphics::Wiggle object
$panel->add_track($wig, ##Display the Bio::Graphics::Wiggle object ,
$panel is a Bio::Graphics::Panel object
-glyph => 'wiggle_xyplot',
-font2color => 'red',
-key => $genotype,
-bump => +1,
-height => 12,
-label => 1,
-description => 1,
);
I get this error
Can't locate object method "statistical_summary" via package
"Bio::Graphics::Wiggle" at
/usr/local/share/perl/5.10.1/Bio/Graphics/Glyph/wiggle_data.pm line 396.
An example of the data I am loading in read_depth.wig.txt is:
variableStep chrom=chr11
72111918 0.0255582042800561
72111919 0.0255582042800561
72111920 0.0255582042800561
72111921 0.0255582042800561
.
Any help would be much appreciated! But I think this might be a bug.
All the best,
Stephen
PS (As an aside, another minor bug, but seqid needs to be seq_id in the
Bio::Graphics::Wiggle object so that it doesn't throw an error at line 290
of Bio/SeqFeature/Lite.pm You may encounter that error.)