[Bioperl-l] bug in location->to_FTstring
Hilmar Lapp
hlapp@gnf.org
Tue, 3 Dec 2002 12:38:38 -0800
The strand bug should be fixed on the main trunk (and hence the
upcoming 1.2)
As for flattening, call $splitloc->each_Location() (this does NOT
return the 'top' location object though).
-hilmar
On Tuesday, December 3, 2002, at 07:00 AM, Philip Lijnzaad wrote:
> 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
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>
--
-------------------------------------------------------------
Hilmar Lapp email: lapp at gnf.org
GNF, San Diego, Ca. 92121 phone: +1-858-812-1757
-------------------------------------------------------------