[Biopython-dev] [Bug 2779] Seq.count() docstring should note unexpected behaviour

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Thu Mar 5 10:22:40 UTC 2009


http://bugzilla.open-bio.org/show_bug.cgi?id=2779





------- Comment #5 from biopython-bugzilla at maubp.freeserve.co.uk  2009-03-05 05:22 EST -------
Prior to Biopython 1.45, the count method only worked with single letter search
strings.  I changed this just over a year ago for Biopython 1.45 as Bug 2386,
but unfortunately at the time none of us considered this
overlapping/non-overlapping behaviour.  With hindsight we should have had this
debate then.

http://cvs.biopython.org/cgi-bin/viewcvs/viewcvs.cgi/biopython/Bio/Seq.py.diff?r1=1.19&r2=1.20&cvsroot=biopython

We should either:

(a) stick with the python string compatible behaviour (which has been a general
principle for the Seq class), but document this issue more clearly as a
non-overlapping search does run counter to biological usage.

or,

(b) Or change the behaviour as Leighton suggests to do an overlapping search. 
This could break any code relying on the old python string-like behaviour.

I agree we need to have a discussion of this over on the main mailing list, as
making the change could break people's code.


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Biopython-dev mailing list