This repository contains python code for the optional parts of labs in my Computations in Genetic Engineering (BME808) course at Ryerson University.
In part A of lab 2, The task is to write a python script that calculates the frequency of nuceleotide on a string. In part B of lab 2, The task is to write a python script that translates a nucleotide sequence into its corresponding amino acid sequence. see DNA mutation for a more robust implementation
In lab 3 the task is to write a python program that does 2 things.
- it first counts the number of 'N's and 'A's in a DNA sequence.
- It then looks for the longest nucleotide repeat in a DNA sequence. e.g: If dna = 'AACCCGCTTAAAAC'. The longest nucleotide repeat = 'AAAA' at location 10. 'A' repeats 4 times
Lab 4 involves the implementation of a global alignment algorithm known as the Needleman wunsch algortithm. It uses dynamic programing to find the optimal global alignment between to DNA sequences. see https://en.wikipedia.org/wiki/Needleman%E2%80%93Wunsch_algorithm See program for my implementation of the algorithm which uses path finding to achive the alignement between the sequences.
To use this program, you can import it as a module and then use it like
from needle import find_global_alignment
alignment1, alignment2, score, percentIdentity, percentGaps = find_global_alignment(pathToSeq1, pathToseq2)