Subject: | Bio::SeqFeature::Collection 1.006000 |
Date: | Wed, 8 Jul 2009 15:47:20 +0100 |
To: | <bug-bioperl [...] rt.cpan.org> |
From: | "ieuan clay \(BI\)" <ieuan.clay [...] bbsrc.ac.uk> |
Hi all,
I am having problems using Bio::SeqFeature::Collection to store Bio::SeqFeature::Gene::GeneStructure objects.
I don't fully understand why the error is occurring (see code example below) - as the geneStructure object itself contains 'DUMMY' code refs in it and the geneStructure objects alone can be added to the collection without any warnings. However, if i associate a transcript object with the geneStructure object with it's add_transcript method, adding the geneStructure object to the collection now produces the error given below.
Please tell me if i am using SeqFeature::Collection in the wrong way/wrong purpose, or if i can provide you with any more information,
Cheers,
Ieuan
The details:
* Distribution name and version
Bio::SeqFeature::Collection 1.006000
* Perl version
v5.10.0 built for x86_64-linux-thread-multi
* Operating System vendor and version
Linux bilinws6.babraham.bbsrc.ac.uk 2.6.29.4-167.fc11.x86_64 #1 SMP Wed May 27 17:27:08 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
Other things that are often helpful:
* Exact cut and pasted error or warning messages
Can't store CODE items at blib/lib/Storable.pm (autosplit into blib/lib/auto/Storable/_freeze.al) line 339, at /usr/local/lib/perl5/site_perl/5.10.0/Bio/SeqFeature/Collection.pm line 519
* The shortest, clearest code you can manage to write which reproduces the bug described.
#!usr/bin/perl
use warnings;
use strict;
use Bio::SeqFeature::Collection;
use Bio::SeqFeature::Gene::GeneStructure;
use Bio::SeqFeature::Gene::Transcript;
my $gene = new Bio::SeqFeature::Gene::GeneStructure;
$gene->set_attributes(-start => 1, -end => 10,);
my $collection = new Bio::SeqFeature::Collection;
## no error
print "Adding \$gene\n";
$collection->add_features([$gene,]);
## make another gene object and add a transcript to it
my $gene_with_error = Bio::SeqFeature::Gene::GeneStructure->new(-start => 11, -end => 12,);
$gene_with_error->set_attributes;
$gene_with_error->add_transcript(Bio::SeqFeature::Gene::Transcript->new(-start => 11, -end => 12,),);
## now produces error
print "Adding \$gene_with_error\n";
$collection->add_features([$gene_with_error,]);
* A patch against the latest released version of this distribution which fixes this bug.
Ha! I wish i new...