[Biopython-dev] [Bug 2386] Bio.Seq.Seq and MutableSeq count() method only works for single residues

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Tue Oct 30 15:06:38 EDT 2007


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





------- Comment #3 from biopython-bugzilla at maubp.freeserve.co.uk  2007-10-30 15:06 EST -------
I really don't want to make the Seq count method different to the python string
count method.

Speaking of which, the string uses count(sub [, start[, end]]) to allow
searching with a optional start and further optional end index.  I should
probably add that.

In the case of single letter searches, my_seq.count("A") + my_seq.count("a") is
a simple enough way of doing things.  Counting case insensistive variants of a
longer sub-sequence like "ATG" wouldn't be so easy.  I would be nice if the
python re library would work directly on Seq objects (without having to
explicitly turn them into strings first).


-- 
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