[Bioperl-l] basic questions
Chris Fields
cjfields at uiuc.edu
Tue Jun 12 18:35:15 UTC 2007
Bio::Restriction::EnzymeCollection holds Bio::Restriction::Enzyme
objects, each with its own name(). Using grouped methods like
'$collection->cutters(6)' will retrieve a new EnzymeCollection
containing all six-cutters from the original collection. You should
use one of the EnzymeCollection accessor methods to retrieve the
enzyme that you wanted first or iterate through them all. This works
for me:
use Bio::Restriction::EnzymeCollection;
my $all_collection = Bio::Restriction::EnzymeCollection->new();
my $six_cutter_collection = $all_collection->cutters(6);
for my $enz ($six_cutter_collection->each_enzyme){
print $enz->name,"\t",$enz->site,"\t",$enz->overhang_seq,"\n";
}
chris
On Jun 12, 2007, at 1:11 PM, L Xu wrote:
> Thank you very much, it did make the script advanced a bit but I
> got the following error:
>
> C:\~Scripts>perl t9.pl
> Can't locate object method "name" via package
> "Bio::Restriction::EnzymeCollectio
> n" at t9.pl line 5, <DATA> line 532.
>
> I checked the documentation , there is no "name" method for the
> package. Thanks.
More information about the Bioperl-l
mailing list