diff --git a/Code/Replication.py b/Code/Replication.py new file mode 100644 index 0000000..93ac561 --- /dev/null +++ b/Code/Replication.py @@ -0,0 +1,6 @@ +def PatternCount(Text, Pattern): + count = 0 + for i in range(len(Text)-len(Pattern)+1): + if Text[i:i+len(Pattern)] == Pattern: + count = count+1 + return count diff --git a/Notebook.org b/Notebook.org index 1d86d97..5e37ce7 100644 --- a/Notebook.org +++ b/Notebook.org @@ -9,3 +9,16 @@ Locating an ori is key for gene therapy (e.g. viral vectors), to introduce a theraupetic gene. **** Exercise: computational approach to find ori in bacteria + + We'll look for the *DnaA box* sequence, using a sliding window, in that case our code would be the following: + + #+begin_src python + count = 0 + 
for i in range(len(Text)-len(Pattern)+1): + if Text[i:i+len(Pattern)] == Pattern: + count = count+1 + print(Pattern + ": " + count) + #+end_src + +*** Vocabulary + - k-mer: subsquences of length /k/ in a biological sequence