Add PatternMatching function
This commit is contained in:
6
Code/PatternMatching.py
Normal file
6
Code/PatternMatching.py
Normal 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
|
||||
Reference in New Issue
Block a user