[Biopython] Cannot make SeqFeature() comparable?

Peter Cock p.j.a.cock at googlemail.com
Tue Jan 31 14:41:27 UTC 2017


On Tue, Jan 31, 2017 at 2:31 PM, Chevreux, Bastien
<bastien.chevreux at dsm.com> wrote:
>> From: Joshua Klein [mailto:mobiusklein at gmail.com]
>
>> […] When assigning to the class itself, not the module, the new
>> comparator function is called
>
> Yay, that worked, learning something new every day. Thanks a million.

Well spotted - I missed that.

> Peter: the ultimate goal of that request was to be able to call sort() on
> features, with sometimes different and very custom sort criteria. Nothing
> which would fit BioPython really.

I think sorting of local feature locations is semi-doable, something along
the lines of sorting by int(start), int(end), and then strand. Feature
locations which reference another accession would be troublesome,
which is one reason I've not pushed ahead with this idea.

Peter



More information about the Biopython mailing list