[Bioperl-l] Exception thrown with Bio::Restriction::Analysis

Emmanuel Quevillon tuco at pasteur.fr
Wed Aug 26 14:59:24 UTC 2009


Hi,

I am playing with Bio::Restriction::* objects and find it very useful.
Especially I am filtering output for blunt and cohesive enzymes.
However, there's an exception thrown when I use 'cutters' method
from B::R::Analysis :

------------- EXCEPTION: Bio::Root::Exception -------------
MSG: Bad end parameter (34). End must be less than the total length
of sequence (total=7)
STACK: Error::throw
STACK: Bio::Root::Root::throw
/usr/local/share/perl/5.10.0/Bio/Root/Root.pm:357
STACK: Bio::PrimarySeq::subseq
/usr/local/share/perl/5.10.0/Bio/PrimarySeq.pm:388
STACK: Bio::Restriction::Analysis::_enzyme_sites
/usr/local/share/perl/5.10.0/Bio/Restriction/Analysis.pm:891
STACK: Bio::Restriction::Analysis::_cuts
/usr/local/share/perl/5.10.0/Bio/Restriction/Analysis.pm:788
STACK: Bio::Restriction::Analysis::cut
/usr/local/share/perl/5.10.0/Bio/Restriction/Analysis.pm:366
STACK: Bio::Restriction::Analysis::cutters
/usr/local/share/perl/5.10.0/Bio/Restriction/Analysis.pm:681
STACK: Bio::Restriction::Analysis::blunt::_load_simple_digestion
lib/Bio/Restriction/Analysis/blunt.pm:86
STACK: Bio::Restriction::Analysis::blunt::cut_in_frames
lib/Bio/Restriction/Analysis/blunt.pm:65
STACK: ./check_phase.pl:213
-----------------------------------------------------------

The problem with this enzyme is that the cut site is over the enzyme
recognition site (from Rebase withrefm.907):

<1>BceSI
<2>
<3>SSAAGCG(27/27)
<4>
<5>Bacillus cereus
<6>ATCC 10987
<7>
<8>Hegna, I.K., Bratland, H., Kolsto, A., (2001) FEMS Microbiol.
Lett., vol. 202, pp. 189-193.
Xu, S.-Y., Unpublished observations.


For this enzyme, here are the values stored into B::R::Enzyme object
($e):

$e->site => SSAAGCGNNNNNNNNNNNNNNNNNNNNNNNNNNN
$e->cut  => 34
$e->string => SSAAGCG
$e->seq->seq => SSAAGCG


So my question is, wouldn't be faire to set B::PrimarySeq::seq with
value of $e->site when such enzyme are seen in the source file.

NOTE from B::R::Analysis::_enzymes_sites (commented):

    # The following should not be an exception, both Type I and Type III
    # enzymes cut outside of their recognition sequences
    #if ($site < 0 || $site > length($enz->string)) {
    #   $self->throw("This is (probably) not your fault.\nGot a cut
site of $site and a     # sequence of ".$enz->string);
    # }

And this is exactly the problem I'm facing!
In _enzymes_sites the code is trying to subseq our sequence to get
before and after seq as :

       $beforeseq=$enz->seq->subseq(1, $site);
       $afterseq=$enz->seq->subseq($site+1, $enz->seq->length);

and this throws an error as the cutting site is far over (pos 34)
the enzyme know recognition site SSAAGCG (length=7).

Has anybody a clue on how to fix/patch it?

Thanks for any reply

Regards

Emmanuel

-- 
-------------------------
Emmanuel Quevillon
Biological Software and Databases Group
Institut Pasteur
+33 1 44 38 95 98
tuco at_ pasteur dot fr
-------------------------



More information about the Bioperl-l mailing list