[Biopython] Sequence object "find" is still case specific?

Michiel de Hoon mjldehoon at yahoo.com
Wed Mar 6 07:45:30 UTC 2013


--- On Mon, 3/4/13, Martin Mokrejs <mmokrejs at fold.natur.cuni.cz> wrote:
> I do use mixed-casing quite often and I think it is
> acceptable to ask user to do the
> .find like:
> 
> s.tostring().upper().find('ACGTT')
> 
> and leave the user slice out the mixed-cased match
> eventually from the original sequence object.

The problem though is that the call to .upper() will be slow if s is a long sequence. Trying this for human chromosome 1 showed that the search will take 20,000 times longer, and is unacceptably slow if you want to execute this search often.

Best,
-Michiel



More information about the Biopython mailing list