[Bioperl-l] bug in location->to_FTstring

Philip Lijnzaad p.lijnzaad@med.uu.nl
Tue, 03 Dec 2002 16:00:19 +0100


Dear all, 

hope you're all doing well!  Quick question. I installed bioperl-1.0.2 from
CPAN, and noticed what looks like a rather serious bug in 

Bio::Location (or Bio::Location::Split). When I read the following file:
------------------------------------------------------------------------
ID   foo
AC   bar
XX
FH   Key             Location/Qualifiers
FH
FT   gene            complement(1..20)
FT                   /gene="YJL225C"
FT   CDS             complement(join(1..4,10..20))
FT                   /gene="YJL225C"
SQ   Sequence 60 BP; 15 A; 15 C; 15 G; 15 T; 0 other;
     cccacacaca caccacaccc acacccacac acaccacacc cacacaccac acccacacca        60
//
------------------------------------------------------------------------

and iterate over the features to extract the locations, like so:

  for my $feat ( $seq->top_SeqFeatures ) { 
  # $feat is a Bio::SeqFeature::Generic
    print $loc=$feat->location->to_FTstring;
  } 

It prints 

  join(1..4,10..20)

which is sort of on the wrong strand. The $feat is a Bio::Location::Split,
it's splittype is JOIN, it's strand is -1, the strands of the sub_Location is
1, so it just looks to_FTstring ignores the strand of the
Split. 

Incidentally, is there a method that 'flattens' the location
description into something with a nesting depth of at most one (e.g.,
complement(join(1..4,10..20)) could better be written as
complement(1..4,10..20)) ? Just wondering. Cheers,

                                                                       Philip

-- 
Philip Lijnzaad
Genomics Laboratory
Dept. of Biomedical Genetics
University Medical Center (UMC), Utrecht
Stratenum, STR 3.223
room 3.126 (not in on Thursdays)
P.O. Box 85060, 3508 AB Utrecht
(Universiteitsweg 100, 3584 CG Utrecht)
The Netherlands
tel: +31 (0)30 253 8464
fax: +31 (0)30 253 9035