[BioPython] More string methods for the Seq object

Peter biopython at maubp.freeserve.co.uk
Wed Oct 1 15:52:05 UTC 2008


On Mon, Sep 29, 2008 at 1:06 PM, Peter <biopython at maubp.freeserve.co.uk> wrote:
>> I assume you [Bruce] are agreeing with ... follow[ing] the
>> string defaults of white space for stipping or splitting (for
>> consistency, even though this won't typically be useful for
>> sequences).  On balance this would probably be best from
>> a principle of consistency and least surprise for the user -
>> I'll update the patches.
>
> New patch for Seq object split, strip, lstrip and rstrip methods on
> Bug 2596 which follows the python string defaults (splitting on or
> stripping of white space).
> http://bugzilla.open-bio.org/show_bug.cgi?id=2596

There is now a second version of this patch on that bug, which will
also accept Seq objects as arguments to the split, strip, lstrip and
rstrip methods, plus has the start of some tests too.

We (Peter, Martin, Bruce and Leighton) seem to have reached an
agreement about adding split, strip, lstrip and rstrip methods to the
Seq object with the behaviour (arguments and defaults) to follow those
of the python string as closely as possible.

I'd like to encourage others lurking on the list to comment too, but
unless anyone objects, I intend to add these methods in CVS this week,
together with an updated unit test and updates to the tutorial.

Peter



More information about the Biopython mailing list