[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 19:22:30 UTC 2007


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





------- Comment #4 from howard.salis at gmail.com  2007-10-30 15:22 EST -------
How about the upper and lower methods for Seq classes?

Then, one could do my_seq.upper().count("ATG")

Would that work well?

-Howard

(In reply to comment #3)
> 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