[Bioperl-l] Restriction::Analysis strange error - please help

Garrett Sorensen garrettsorensen at gmail.com
Wed Jan 26 09:57:51 EST 2005


Thanks Remo..   To test this module that is the only code I'm using
right now...  I'm no longer grabbing a subsequence so it can't be
calculation error.  To test all I'm trying to do is read in sequences
from a fasta file and digest them.  It runs fine for a few hundred
sequences generating fragments as it should, then out of nowhere it
will run into the same error, but with different coordinates.

Possibly this module isn't working properly for me?

 ------------- EXCEPTION  -------------
 MSG: Bad start,end parameters. Start [2002] has to be less than end
 [2001]
STACK Bio::PrimarySeq::subseq
/home/garrett/Perl/lib/perl5/site_perl/5.8.5/Bio/PrimarySeq.pm:362
STACK Bio::Seq::subseq
 /home/garrett/Perl/lib/perl5/site_perl/5.8.5/Bio/Seq.pm:636
STACK Bio::Restriction::Analysis::fragment_maps
 /home/garrett/Perl/lib/perl5/site_perl/5.8.5/Bio/Restriction/
 Analysis.pm:552
 STACK toplevel Restriction_analyser_multi_CpG_a.pl:182




On Wed, 26 Jan 2005 12:34:20 +0100, Remo Sanges <sanges at biogem.it> wrote:
> On Jan 26, 2005, at 3:12 AM, Garrett Sorensen wrote:
> 
> > Thanks for the suggestion Rob but still having issues.  I've boiled
> > the code down to just reading in fasta sequences and digesting the
> > whole sequences - opposed to digesting a subsequence as done
> > initially.  It digests a few hundred sequences without issue and then
> > runs into the same error, but reports different corrdinates of course.
> >
> > If it is only reading in a fasta sequence and digesting it how is it
> > calculating wrong start/end coordinates for itself?  And the fact that
> > it will work great on many sequences but then calculates wrong
> > coordinates for one seems strange...  Any ideas?
> >
> > I've tried feeding Restriction::Analysis both a SeqIO object and a
> > PrimarySeq with the same result.
> >
> > Here is the code:
> >
> > use strict;
> > use Bio::SeqIO;
> > use Bio::PrimarySeq;
> > use Bio::Restriction::Analysis;
> > use Bio::PrimarySeq;
> > use Data::Dumper;
> >
> > my $in  = Bio::SeqIO->new(-file => "$file",  -format => 'fasta');
> > while ( my $seq = $in->next_seq ) {
> >     my $ra=Bio::Restriction::Analysis->new(-seq=>$seq);
> >     my @fragments = $ra->fragments('NlaIII');
> >     print join ("\n\n", @fragments);
> >     }
> > exit
> >
> 
> Garrett,
> 
> this code that you post isn' t really very helpful...
> You should have a problem at a certain point in your code
> where you ask for a ->subseq with the start bigger than end...
> The problem should come from your calculations, not from
> module's errors....
> 
> HTH
> 
> Remo
> 
> > On Tue, 25 Jan 2005 17:20:47 -0800, Rob Edwards <rob at salmonella.org>
> > wrote:
> >> It is hard to locate the exact error without more information. The
> >> error is caused because at some point you are trying to get a sequence
> >> that starts at position 2002, but the sequence is only 2001 nt long
> >> (hence the error that 2002 must be < 2001). I would suggest that the
> >> error is at some point where you are taking the 2kb fragment around
> >> the
> >> site. The most obvious thing to start with is what are the start/end
> >> coordinates that are called immediately before the error, and do they
> >> make sense given the length of the sequence?
> >>
> >> Rob
> >>
> >> On Jan 25, 2005, at 9:45 AM, Garrett Sorensen wrote:
> >>
> >>> Hello,  I'm new to the mailing list.  Thanks in advance for any help.
> >>>
> >>> I'm really stumped by the following error when running restriction
> >>> analysis on large numbers of seq objects.  This only occurs sometimes
> >>> when dealing with large numbers of sequences.
> >>>
> >>>
> >>> ------------- EXCEPTION  -------------
> >>> MSG: Bad start,end parameters. Start [2002] has to be less than end
> >>> [2001]
> >>> STACK Bio::PrimarySeq::subseq
> >>> /home/garrett/Perl/lib/perl5/site_perl/5.8.5/Bio/PrimarySeq.pm:362
> >>> STACK Bio::Seq::subseq
> >>> /home/garrett/Perl/lib/perl5/site_perl/5.8.5/Bio/Seq.pm:636
> >>> STACK Bio::Restriction::Analysis::fragment_maps
> >>> /home/garrett/Perl/lib/perl5/site_perl/5.8.5/Bio/Restriction/
> >>> Analysis.pm:552
> >>> STACK toplevel Restriction_analyser_multi_CpG_a.pl:182
> >>>
> >>>
> >>> Incase it helps here is what my program is doing:
> >>> -Reads in multiple fasta sequences (~7kb average size) on at a time
> >>> and creates a SeqIO object for each.
> >>> -Restriction sites for a particular enzyme are determined for each
> >>> SeqIO object and then a fragment 2kb in size is created around that
> >>> site.
> >>> -A new Seq object is created using the above fragment using
> >>> "$upStreamSeqobj = Bio::Seq->new (-seq => $upStreamSeq);"
> >>> -This new Seq object is fed into Restriction Analysis to generate
> >>> fragments for another enzyme.
> >>>
> >>> Thanks so much for any help, best regards,
> >>> Garrett
> >>> _______________________________________________
> >>> Bioperl-l mailing list
> >>> Bioperl-l at portal.open-bio.org
> >>> http://portal.open-bio.org/mailman/listinfo/bioperl-l
> >>>
> >>
> >>
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at portal.open-bio.org
> > http://portal.open-bio.org/mailman/listinfo/bioperl-l
> >
> 
>


More information about the Bioperl-l mailing list