[Bioperl-l] Bio::Restriction::IO and REBASE file

Chris Fields cjfields at uiuc.edu
Fri May 26 21:19:08 UTC 2006


The POD documentation is a bit misleading for Bio::Restriction::IO.  Brian's
right, there needs to be more flexibility with the case for the formats
used.  I found a few other odd things as well which I may file bug reports
for.  Looks like another post for the project priority list.

 

Chris

 

  _____  

From: Jelena Obradovic [mailto:jobradovic at gmail.com] 
Sent: Friday, May 26, 2006 3:56 PM
To: Chris Fields
Cc: Jelena Obradovic; Bioperl-l at lists.open-bio.org
Subject: Re: [Bioperl-l] Bio::Restriction::IO and REBASE file

 

Hi guys, I tried with the other formats, and it works fine with "withrefm"
format but not with "withref".

Thanks a lot for your reponse.

Cheers,

Jelena

On 5/26/06, Chris Fields <cjfields at uiuc.edu> wrote:



> -----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  <mailto:jelenaob at gmail.com> 
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l




-- 
Jelena Obradovic
Email: jobradovic at gmail.com




More information about the Bioperl-l mailing list