[Bioperl-l] problems with $enzyme->site(); for enzyme NlaIII or TspRI

felipe wettstein karl@gromski.ch
Mon, 28 Oct 2002 17:40:10 +0100


doing $enzyme->site(); for the enzymes NlaIII or TspRI stops my program  
with the following error:

------------- EXCEPTION  -------------
MSG: in subseq, start [5] has to be greater than end [4]
STACK Bio::PrimarySeq::subseq /Library/Perl/Bio/PrimarySeq.pm:336
STACK Bio::Tools::RestrictionEnzyme::site  
/Library/Perl/Bio/Tools/RestrictionEnzyme.pm:510
STACK toplevel ./restritest.pl:17

--------------------------------------

i use perl 5.8, mac os x.

the following program fails with 'NlaIII' or 'TspRI', but not when i  
uncomment the line with 'next if...'. does anybody have an idea whats  
going wrong? i mean, it is not exxxtreeeemly important to know, but  
maybe it would help. thanks a lot.


felipe wettstein

------------------------------------------------------------------------ 
-------


#!/usr/bin/perl -w
use Bio::Tools::RestrictionEnzyme;
use Bio::PrimarySeq;

$enzyme = Bio::Tools::RestrictionEnzyme->new(-name=>'EcoRI');
@enz_list=$enzyme->available_list();

$i=0;
foreach $enzyme (@enz_list) {
	$enz_list[$i] = Bio::Tools::RestrictionEnzyme->new(-name=>$enzyme);
	print "\n";
	print $enz_list[$i]->name();
	print "\t";
	print $enz_list[$i]->string();
#	next if ($enz_list[$i]->name()eq 'NlaIII')||($enz_list[$i]->name()eq  
'TspRI');
	print "\t";
	print $enz_list[$i]->site();
	$i++;
}