what is often before a pattern ?
jstroud at ucla.edu
Thu Jun 8 23:38:02 CEST 2006
joh12005 at yahoo.fr wrote:
> i'm looking for a way to detect sequence objects which are often before
> a pattern.
> say for example some list like:
> a = "a0 a1 a2 a3 a4 myPatternMatchHere".split()
> b = "a5 a2 a4 myPatternMatchHere".split()
> c = "a6 a7 a2 a3 a8 a4 myPatternMatchHere".split()
> d = "a9 a10 a2 myPatternMatchHere".split()
> a2 a3 a4 is the most interesting because it appears 2 times upon 4, and
> overlap a2 a4, and we have some clues that a2 is also important as it
> appears 4/4.
> maybe have you some suggestions or idioms where i should look after
Look into suffix trees.
UCLA-DOE Institute for Genomics and Proteomics
Los Angeles, CA 90095
More information about the Python-list