Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CODE IN PYTHON dna2codon= def rna2codon(seq): table = {UUU:F, UUC:F, UUA:L, UUG:L, UCU:S, UCC:s, UCA:S, UCG:S, UAU:Y, UAC:Y, UAA:STOP, UAG:STOP, UGU:C, UGC:C, UGA:STOP, UGG:W, CUU:L,
CODE IN PYTHON dna2codon=
def rna2codon(seq): table = {"UUU":"F", "UUC":"F", "UUA":"L", "UUG":"L", "UCU":"S", "UCC":"s", "UCA":"S", "UCG":"S", "UAU":"Y", "UAC":"Y", "UAA":"STOP", "UAG":"STOP", "UGU":"C", "UGC":"C", "UGA":"STOP", "UGG":"W", "CUU":"L", "CUC":"L", "CUA":"L", "CUG":"L", "CCU":"P", "CCC":"P", "CCA":"P", "CCG":"P", "CAU":"H", "CAC":"H", "CAA":"Q", "CAG":"Q", "CGU":"R", "CGC":"R", "CGA":"R", "CGG":"R", "AUU":"I", "AUC":"I", "AUA":"I", "AUG":"M", "ACU":"T", "ACC":"T", "ACA":"T", "ACG":"T", "AAU":"N", "AAC":"N", "AAA":"K", "AAG":"K", "AGU":"S", "AGC":"S", "AGA":"R", "AGG":"R", "GUU":"V", "GUC":"V", "GUA":"V", "GUG":"V", "GCU":"A", "GCC":"A", "GCA":"A", "GCG":"A", "GAU":"D", "GAC":"D", "GAA":"E", "GAG":"E", "GGU":"G", "GGC":"G", "GGA":"G", "GGG":"G",} protein ="" if len(seq)%3 == 0: for i in range(0, len(seq), 3): codon = seq[i:i + 3] if table[codon]!="STOP": protein+= table[codon] return protein print( rna2codon("AUGGCCAUGGCGCCCAGAACUGAGAUCAAUAGUACCCGUAUUAACGGGUGA")) def locate_substring(dna_snippet,dna): indexes = [i for i in range(len(dna_snippet)) if dna_snippet.startswith(dna, i)] return indexes print(locate_substring("GATATATGCATATACTT","ATAT"))def count_dom_phenotype(genotypes): This function takes in a list of six nonnegative integers corresponding to the number of couples in a population possessing a specific genotype pairing, such as AA-AA (both homozygous dominant) or Aa-aa (heterozygous and homozygous recessive). The list of integers represent the number of couples having the following genotypes, in this order: 1. AA-AA 2. AA-Aa 3. AA-aa 4. Aa-Aa 5. Aa-aa 6. aa-aa The function should return the expected number of offspring displaying the dominant phenotype in the next generation, assuming that every couple has exactly two offspring Example: The function should return the expected number of offspring displaying the dominant phenotype in the next generation, assuming that every couple has exactly two offspring Example: Sample input list: (1, 0, 0, 1, 0, 1) The returned number of dominant phenotype offspring: 3.5 def source_rna(protein): This function takes in a string representing a sequence of proteins and returns the total number of different source RNA strings, modulo 1,000,000. Essentially, you are calculating how many strands of mRNA from which this particular protein could have been translated. (HINT: You'll want to use/manipulate the codon table from rna2codon()9 Example: Sample input protein string: "MA" The returned number of possible source RNA sequences: 12 def count_dom_phenotype(genotypes): This function takes in a list of six nonnegative integers corresponding to the number of couples in a population possessing a specific genotype pairing, such as AA-AA (both homozygous dominant) or Aa-aa (heterozygous and homozygous recessive). The list of integers represent the number of couples having the following genotypes, in this order: 1. AA-AA 2. AA-Aa 3. AA-aa 4. Aa-Aa 5. Aa-aa 6. aa-aa The function should return the expected number of offspring displaying the dominant phenotype in the next generation, assuming that every couple has exactly two offspring Example: The function should return the expected number of offspring displaying the dominant phenotype in the next generation, assuming that every couple has exactly two offspring Example: Sample input list: (1, 0, 0, 1, 0, 1) The returned number of dominant phenotype offspring: 3.5 def source_rna(protein): This function takes in a string representing a sequence of proteins and returns the total number of different source RNA strings, modulo 1,000,000. Essentially, you are calculating how many strands of mRNA from which this particular protein could have been translated. (HINT: You'll want to use/manipulate the codon table from rna2codon()9 Example: Sample input protein string: "MA" The returned number of possible source RNA sequences: 12
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started