Bioinformatics Python Homework

Send your programs by e-mail to yanako@cs.widener.edu (MY COMPUTER SCIENCE ACCOUNT) by 11 AM, Monday, Sept 23

Program 1:
Write a python function: findAllSub (string, sub_string) that finds and prints all occurrences of sub_string in string. Function prints the indices of the beginning of sub_string in string. For example, if the input is: string = .aatcctattctatg. and sub_string = .at., the function prints:
the 'at' occurs at position 1
the 'at' occurs at position 6
the 'at' occurs at position 11

Write a program, that reads a DNA sequence and additional sub-sequence. The program uses function findAllSub to find all occurrences of sub-sequence in the given DNA sequence. You can assume that length (sub-sequence) < length (sequence)

Program 2:
Write a program that reads a DNA sequence and first transcribes DNA into RNA, and prints the resulting RNA sequence and after that translate RNA into protein sequence. The translation part the program will do in two steps: first, the program will divide RNA into codons and prints the list of codons, and second, each codon will be translated into the protein using genetic code table (see on my website). Try to solve this problem using Python methods as much as possible (use maketrans, translate and replace). The most efficient solution will receive bonus points.