Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For 1. where is says \"see /home/PyProgBiol_materials/assignment07/codon_to_aa.m

ID: 3552233 • Letter: F

Question




For 1. where is says "see /home/PyProgBiol_materials/assignment07/codon_to_aa.map", it looks like this:



And for 2. where is says "see /home/PyProgBiol_materials/assignment07/inputDNA.tab" looks like this:



And where it says "see /home/PyProgBiol_materials/assignment07/correct_output.tab" it looks like this:



It should be executable, named exactly as shown, and take 2 command-line arguments (in order): a codon_to_aa translation map (see /home/PyProgBioLmaterials/assignment07/codon_to_aa.map) a tab-delimited file of DNA codon sequences (see /home/PyProgBioLmaterials/assignment07/inputDNAtab) The program should output (to the screen), the tab-delimited amino acid (aa) sequences, in the format:

Explanation / Answer

import sys

codontoaa=sys.argv[1]
inputdna=sys.argv[2]

codontoaaFile=open(codontoaa)
inputdnaFile=open(inputdna)

m={}

for i in codontoaaFile.readlines():
    a,b=i.split()
    m[a]=b

out=""
for i in inputdnaFile.readlines():
    a,b=i.split()
    out+=a+" "
    j=0
    while(j<len(b)):
        out+=m[b[j:j+3]]
        j+=3
    out+=" "
print out

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote