[Bioperl-l] Bio::Restriction::IO and REBASE file
Chris Fields
cjfields at uiuc.edu
Fri May 26 19:27:13 UTC 2006
> -----Original Message-----
> From: bioperl-l-bounces at lists.open-bio.org [mailto:bioperl-l-
> bounces at lists.open-bio.org] On Behalf Of Jelena Obradovic
> Sent: Friday, May 26, 2006 11:47 AM
> To: Bioperl-l at lists.open-bio.org
> Subject: [Bioperl-l] Bio::Restriction::IO and REBASE file
>
> Hi there,
>
> I have tried loading enzyme list from a file REBASE bairoch.605 using
> Bio::Restriction::IO;
>
> 1. But for some reason the number of enzymes in the list is always 532
> which is a default set of enzymes in enzyme collection.
>
> Is there any known issue with this module or a workaround?
>
> And here is the code I have been using:
>
> my $re_in=Bio::Restriction::IO->new(-file=>"bairoch_605.dat",-
> format=>"Bairoch")
> || die "can't load the file bairoch.605: $!";
> my $enzymes = $re_in->read;
> print "\nNo of enzymes: ", scalar $enzymes->each_enzyme, "\n";
my $re_in=Bio::Restriction::IO->new(-file=>"bairoch_605.dat",-
format=>"Bairoch");
should be
my $re_in=Bio::Restriction::IO->new(-file=>"bairoch_605.dat",-
format=>"bairoch");
Note the case change for the format; this is noted in the bug report you
submitted earlier. Bio::Restriction::IO works similarly to Bio::SeqIO (i.e.
requires a specific format, which I believe is case-sensitive). Judging by
the modules in Bio/Restriction/IO directory, looks like the
Bio::Restriction::IO format should match one of the following formats:
bairoch, itype2, withrefm, and you can also build your own if needed using
the previous as examples and implementing Bio::Restriction::IO::base.
> 2. The other problem is when trying to use format that is lower-case
> it throws an exception, but when "B" is capitalized it is ok.
> I assume it cannot load a file and does not initilize enzyme
> collection properly.
>
> Can't call method "each_enzyme" on an undefined value at
> .../cgi-bin/seq-load.pl line 51.
My guess? The reason it works with an uppercase ('Bairoch') is that it
can't find the module and uses the default set of enzymes as a fallback.
The exception that you reported when you use lowercase ('bairoch') is real
and I reported it as a bug (there are a few I found in that module).
You might want to try using one of the other formats if you can get the
files in the right format from REBASE. I'm looking into the bugs
specifically associated with Bio::Restriction::IO::bairoch.
> Any thoughts?
>
>
> Thanks in advance,
>
>
> Jelena Obradovic
> jelenaob at gmail.com
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
More information about the Bioperl-l
mailing list