[Bioperl-l] significant bug with Bio::LocatableSeq
Michael Kiwala
michael.kiwala at gmail.com
Wed Oct 15 17:55:37 UTC 2008
I'd like to add Bio::Assembly::IO::ace to the list of affected
parsers. I've been off the list for a while, so I know I'm just
jumping right in the middle of something, and it's probably bigger
than I know. But I'd like to help out anyway. :)
I need some background on LocatableSeq in order to understand the
problem. Is it not redundant to pass -start, -end, and -seq? Seems
like normally you would only need -start or -end plus the -seq, right?
Does anyone see a problem with just removing the -end argument to
Bio::LocatableSeq->new() calls in B:A:IO:ace since the -start and -seq
are already being provided?
Thanks,
Michael
> On Mon Sep 15 00:13:57 EDT 2008 Chris Fields wrote:
>
> While debugging some tests in bioperl, I noticed a fairly significant
> issue with Bio::LocatableSeq which is probably due to some
> inconsistencies with start/end coordinates. For some reason this
> started popping up with error messages recently when running AlignIO
> tests on bioperl-live (i.e. something changed which exposed the bug,
> maybe the verbosity level):
>
> 1..295
> ok 1 - use Bio::AlignIO;
> ok 2 - The object isa Bio::AlignIO
> ok 3 - The object isa Bio::Align::AlignI
> ok 4
> ok 5
> ok 6 - The object isa Bio::AlignIO
>
> --------------------- WARNING ---------------------
> MSG: In sequence 02 residue count gives end value 399.
> Overriding value [355] with value 399 for Bio::LocatableSeq::end().
> STACK Bio::LocatableSeq::end /Users/cjfields/bioperl/bioperl-live/blib/
> lib/Bio/LocatableSeq.pm:150
> STACK Bio::LocatableSeq::new /Users/cjfields/bioperl/bioperl-live/blib/
> lib/Bio/LocatableSeq.pm:103
> STACK Bio::AlignIO::arp::next_aln /Users/cjfields/bioperl/bioperl-live/
> blib/lib/Bio/AlignIO/arp.pm:106
> STACK toplevel t/AlignIO.t:34
> ---------------------------------------------------
> .... followed by tons of similar errors.
>
> The problem is, no change is ever made. This is demonstrated by the
> following:
>
> -----------------------------
> #!/usr/bin/perl -w
>
> use strict;
> use warnings;
> use Bio::LocatableSeq;
>
> my $seq = Bio::LocatableSeq->new(
> -id => 'foo',
> -seq => 'A----TGCGCTTCCTCGCTTCCG',
> -start => 10,
> -end => 100, # intentially bad
> -strand => -1);
>
> print $seq->end."\n";
>
> -----------------------------
>
> Results:
>
> --------------------- WARNING ---------------------
> MSG: In sequence foo residue count gives end value 28.
> Overriding value [100] with value 28 for Bio::LocatableSeq::end().
> STACK Bio::LocatableSeq::end /Users/cjfields/bioperl/bioperl-live/Bio/
> LocatableSeq.pm:150
> STACK Bio::LocatableSeq::new /Users/cjfields/bioperl/bioperl-live/Bio/
> LocatableSeq.pm:103
> STACK toplevel seq.pl:7
> ---------------------------------------------------
> 100
>
> The warning pops up when -end is passed to LocatableSeq::new and
> indicates that the passed coordinate doesn't match up with the one
> calculated from the sequence (minus gaps). I've isolated the bug down
> to the end() method and am working on fixing it. Note that this
> affects LocatableSeq::length as well. This appears to affect arp,
> nexus, stockholm, and a few other AlignIO parsers as well.
>
> chris
--
I saved latin. What did you ever do?
-Max Fischer
More information about the Bioperl-l
mailing list