[Bioperl-l] Genbank file : bad features (tag) order with /translation

Peter Cock p.j.a.cock at googlemail.com
Wed Aug 3 10:45:21 EDT 2011

On Wed, Aug 3, 2011 at 3:08 PM, Chris Fields <cjfields at illinois.edu> wrote:
> Yes, it uses a hash based on the feature tags.  Not sure how Biopython
> handles it but my guess is something similar (Peter?).

Yes, we key on the feature qualifier (e.g. note or product) and
the values are a list of qualifier values (e.g. you can have two

> The output order was never a chief concern of ours.  To tell the truth
> our main focus has never been simple conversion, except to transform
> data into a format that is more manageable/normalized.
> For those interested in making this change, all the code  for printing
> features is in one method in Bio::SeqIO::genbank, _print_GenBank_FTHelper().
> The best way to handle this would be to allow an optional coderef/callback
> that takes the feature (or the tags) and allows custom sorting and printing;
> I don't want to get into messy semantics on how to specifically sort tags,
> best to let the user decide.

For Biopython switching from the default dictionary (hash type) to
an order preserving dictionary would be one option. I too have
no wish to try and implement qualifier sorting without an explicit


More information about the Bioperl-l mailing list