# Create codons dictionary bases = ['t', 'c', 'a', 'g'] codons = [a+b+c for a in bases for b in bases for c in bases] amino_acids = 'FFLLSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG' codon_table = dict(zip(codons, amino_acids)) print(codon_table) DNA = 'atgattccaacgcgaaggtcaagtacgtacagctctcagtgtgtgctactcaccgactccgtcatagcaaccggcgtcgtggtcgttaccattgcataa' # translate the sequence print(_________________) def count_residues(protein_seq): # your code goes here. remove the pass statement. pass protein_sequence = 'DQHTWMYAEGYLNHVYRCDKQRAEDKECNGLYAWALALESHGKGSYYCQGFKTFPNPWPMHMMTFVMADLYQYMEI' aa_counts_dict = count_residues(protein_sequence) # print results hydrophobic = 'AVILMFYW' pos_charged = 'RHK' neg_charged = 'DE' polar = 'STNQ' other = 'CUGP' def residues_type_frequencies(protein_seq): # your code goes here. remove the pass statement. pass aa_sequence = 'DQHTWMYAEGYLNHVYRCDKQRAEDKECNGLYAWALALESHGKGSYYCQGFKTFPNPWPMHMMTFVMADLYQYMEI' aa_types_freq_dict = residues_type_frequencies(protein_sequence) # print results def is_palindrome(seq): # your code goes here. remove the pass statement. pass assert(is_palindrome('GAATTC')) assert(is_palindrome('GATATC')) assert(is_palindrome('AGCTTCTAGTCGACTAGAAGCT')) assert(not is_palindrome('GAACTC')) assert(not is_palindrome('GATATG')) def find_palindromes(seq, n): palindromes = [] for _________________: if _________________: palindromes.append(___________) return palindromes DNA_seq = 'GGAGCTCCCAAAGCCATCAATATTCATCAAAACGAATTCAACGGAGCTCGATATCGCATCGCAAAAGACACC' palindromic_sequences = find_palindromes(DNA_seq,6) assert palindromic_sequences == ['GAGCTC', 'AATATT', 'GAATTC', 'GAGCTC', 'GATATC'] def find_palindromes(seq, n): palindromes = [] while _________________: if _________________: palindromes.append(___________) return palindromes DNA_seq = 'GGAGCTCCCAAAGCCATCAATATTCATCAAAACGAATTCAACGGAGCTCGATATCGCATCGCAAAAGACACC' palindromic_sequences = find_palindromes(DNA_seq,6) assert palindromic_sequences == ['GAGCTC', 'AATATT', 'GAATTC', 'GAGCTC', 'GATATC'] def find_palindromes_no_overlap(S, n): palindromes = [] # your code here return palindromes # test DNA_seq = 'GGAGCTCCCAAAGCCATCAATATTCATCAAAACGAATTCAACGGAGCTCGATATCGCATCGCAAAAGACACC' palindromic_sequences = find_palindromes_no_overlap(DNA_seq,6) assert palindromic_sequences == ['GAGCTC', 'AATATT', 'GAATTC', 'GAGCTC', 'GATATC'] DNA_seq = 'GGAGCTCCCAAAGCCATCAGAATTCGAACATATCGCAAAAGACACC' palindromic_sequences = find_palindromes(DNA_seq,6) assert palindromic_sequences == ['GAGCTC', 'GAATTC', 'TTCGAA'] DNA_seq = 'GGAGCTCCCAAAGCCATCAGAATTCGAACATATCGCAAAAGACACC' palindromic_sequences = find_palindromes_no_overlap(DNA_seq,6) assert palindromic_sequences == ['GAGCTC', 'GAATTC']