DNA carries genetic instructions for the development, functioning, growth, and reproduction of all known organisms and many viruses. In this homework, you will perform basic operations on DNA codons, such as generating random DNA sequences, extracting index(es) of the desired nucleotide(s), and removing the invalid ones. Below are the detailed instructions for the functions you should write. 1. generate_random_codons ( \( n \), nuc_list) This function requires two parameters: \( \mathrm{n} \) : The number of codons to randomly generate nuc_list: A nucleotide list that contains characters of nucleotides desired, such as \( \left[{ }^{*} \mathrm{~A},{ }^{*}, \mathrm{C},{ }^{*}, \mathrm{~T}^{*}, \mathrm{G}^{\prime} \mathrm{G}\right] \) This function will randomly select the characters in the nuc_list to construct DNA codons (length \( =3 \) ) \( n \) times, store them in the list, and return the list. 2. remove_invalid (codon_list, invalid_codons) This function requires two parameters: codon_list: A list of codons that the invalid codons will be removed from invalid_codons: This is a list which includes invalid codons. While writing your program, use the following invalid codon list: invalid_codons = ['GGA','GGT',GGG','GGC ',GCA', 'GCT,'GCC ,'GCG'] The function first asks to the user if (s)he wants to remove the invalid codons. If the answer's first letter is " \( \mathrm{y} \) " or " \( \mathrm{Y} \) ", the function removes the invalid codons from the list (if there is any). If there is no invalid codon in the list, print a message accordingly. The function also shows how many codons are removed. Then, the updated list must be returned by the function. 3. extract_seq_index (codon_list, desired_seq) This function requires two parameters:
codon_list: A list of codons that a desired codon's index is extracted from desired_seq: Nucleotide(s) that will be searched in the codon list This function takes a list of codons and retums the list of index(es) of the desired nucleotide(s). 4. main 0 - Firstly, nucleotide list must be defined ([ \( \left.\mathrm{A}^{\prime}, \mathrm{C}^{\prime}, \mathrm{T}^{\prime}, \mathrm{G}^{\prime}\right] \) ). - Get from the user an integer input: the number of random codons. - Generate the random codon list by calling generate_random_codons function. - Ask if the user wants to remove the invalid codons. If invalid codons exist and the user wants to remove them, they are removed from randomly created list. And the number of codons removed is printed. - Then, the desired nucleotide sequence is asked to the user and if it is found in the list, the function prints the list of index(es). Here you need to use updated list (the list after you remove the invalid ones). Sample Outputs (to get the same outputs, use random.seed(199) in your code):