Write a function make_vax, which takes a list of arbitrary number of dna sequences, and both removes gaps ("-" characters) and transcribes the sequence to mRNA. It returns a list with gap-less mRNA sequences of the same length as the input list.
def make_vax(dna_list):
# your code here
mRNA = transcribe(dna_list)
for i in range(mRNA):
if i == '-':
mRNA.pop(i)
return mRNA
This is the idea that I have but I do not know where to go from here.
My test cases for make_vax are the following, and both of them need to be true.
print(make_vax(["ATGCAT---GCT"])==['AUGCAUGCU'])
print(make_vax(["TTTTTTTTTTTT","ATGCAT---GCT"])==['UUUUUUUUUUUU','AUGCAUGCU'])
I also already have a function which transcribes a inputted dna sequence.
def transcribe(dna):
"""This function will return a RNA sequence after replacing 'T' with 'U'."""
# your code here
rna = dna.replace("T", "U")
return rna