[Bioperl-l] Bio::Location::Split

Amir Karger akarger at CGR.Harvard.edu
Mon Oct 16 15:54:33 UTC 2006

I recently came across bug 2101, where Bio::Location::Split::to_FTstring
gives the incorrect order for multi-sublocation locations on the minus
strand. That is, I found it by getting incorrect results, and then found
it in Bugzilla and in the September archives.

I'm converting CDS files from one format to another. E.g., I read an
EMBL file with a chromosome and CDS features, and want to output the
location in a FASTA header. If I do something like:

foreach (<$in>) {
    foreach my $feat ($seq->getSeqFeatures) {
        print $feat->location->to_FTstring()

I get the wrong results for multi-exon CDSs on the -1 strand, as
described in the bug report.

Is there a relatively easy way around this? I assume I can't get at the
original string of the location, which in this case is all I need. Can I
just flip the order of the exons in certain cases? Chris F, can you tell
me the preliminary solution you mentioned?

I must say I'm sort of surprised this wasn't found before. It seems like
a not-that-rare occurrence. Oh well.


- Amir Karger
Research Computing
Life Sciences Division
Harvard University

More information about the Bioperl-l mailing list