Add PatternMatching function

This commit is contained in:
2019-10-21 17:35:44 +02:00
parent f5609b5577
commit dc740e1c54
2 changed files with 13 additions and 1 deletions

6
Code/PatternMatching.py Normal file
View File

@@ -0,0 +1,6 @@
def PatternMatching(Pattern, Genome):
positions = []
for i in range(len(Genome)-len(Pattern)+1):
if Genome[i:i+len(Pattern)] == Pattern:
positions.append(i)
return positions