Biopython's .count() methods, like Python's str.count(), perform a non-overlapping count, how can I do an overlapping one?
For example, these code snippets return 2, but I want the answer 3:
>>> from Bio.Seq import Seq
>>> Seq('AAAA').count('AA')
2
>>> 'AAAA'.count('AA')
2
re.finditerwould be better for that. Also,UnknownSeqtype objects require a rather different approach to maximize memory efficiency – Chris_Rands Aug 10 '17 at 14:34