byte compiled files
Peteris Martinsons
peteris_martinsons at swh-t.lv
Fri Jul 27 09:02:44 EDT 2001
A little bit shorter (and perhaps faster) version :)
#do not need to instantiate on each run of function
repeats = ('AAAA', 'CCCC', 'GGGG', 'TTTT')
nucleotids = ('A', 'G', 'C', 'T' )
...
def checkValidData(bsite):
for x in bsite: #check new bsite contains valid charactors
if x not in nucleotids: return 0
for x in repeats:
if (string.find(bsite, x) != -1): return 0
return 1
Peteris Martinsons
More information about the Python-list
mailing list