Missense Mutation Function
0
0
Entering edit mode
7 weeks ago
eda • 0

a. Write a function that takes three arguments: an RNA sequence, a codon-aminoacid dictionary, and a point mutation on RNA b. The function should call the function you wrote in Q1c to convert the RNA sequence to amino acid sequence (conversion can run either on the whole sequence or a part of it) c. Then the function should return the index of the aminoacid affected by the mutation and if the mutation changes the amino acid that is coded by the codon (missense mutation or not)

Note: Mutation information should be provided as follows: r.123A>G (on RNA, A in position is 123 is replaced by G) p.Pro252Arg (on protein, proline at position 252 is replaced by arginine)

Q1c codes:

Q1 )

a

f = open("C:/Users/hasan/OneDrive/Masaüstü/for phyton/codon-aa-list.txt") aa_temp = f.readlines()[1:]

aaDict = {} for i in aa_temp: key, value = i.split() aaDict[key] = value print(aaDict)

b

g = open("C:/Users/hasan/OneDrive/Masaüstü/for phyton/seq.txt")

seq = g.read().replace(" ", "").upper() seq = seq.replace("\n", "") seq = ''.join([i for i in seq if not i.isdigit()]) print(seq)

c

amino = "" for i in range(0, len(seq)-(3+len(seq)%3), 3): if aaDict[seq[i:i+3]]== "Stop": continue amino += aaDict[seq[i:i+3]] print ("Protein String: ", amino)

d

with open("C:/Users/hasan/OneDrive/Masaüstü/for phyton/results.txt", "w") as z: z.writelines(amino)

z.close() f.close() g.close()

Note

codon-aa-list

Codon   Aminoacid

UUU Phe UUC Phe UUA Leu UUG Leu CUU Leu CUC Leu CUA Leu CUG Leu AUU Ile AUC Ile AUA Ile AUG Met GUU Val GUC Val GUA Val GUG Val UCU Ser UCC Ser UCA Ser UCG Ser CCU Pro CCC Pro CCA Pro CCG Pro ACU Thr ACC Thr ACA Thr ACG Thr GCU Ala GCC Ala GCA Ala GCG Ala UAU Tyr UAC Tyr UAA Stop UAG Stop CAU His CAC His CAA Gln CAG Gln AAU Asn AAC Asn AAA Lys AAG Lys GAU Asp GAC Asp GAA Glu GAG Glu UGU Cys UGC Cys UGA Stop UGG Trp CGU Arg CGC Arg CGA Arg CGG Arg AGU Ser AGC Ser AGA Arg AGG Arg GGU Gly GGC Gly GGA Gly GGG Gly

seq.txt

     1 gaguaguccc uucgcaagcc cucauuucac caggcccccg gcuuggggcg ccuuccuucc
   61 ccauggcggg acaccuggcu ucggauuucg ccuucucgcc cccuccaggu gguggaggug
  121 augggccagg ggggccggag ccgggcuggg uugauccucg gaccuggcua agcuuccaag
  181 gcccuccugg agggccagga aucgggccgg ggguugggcc aggcucugag guguggggga
  241 uucccccaug ccccccgccg uaugaguucu guggggggau ggcguacugu gggccccagg
  301 uuggaguggg gcuagugccc caaggcggcu uggagaccuc ucagccugag ggcgaagcag
  361 gagucggggu ggagagcaac uccgaugggg ccuccccgga gcccugcacc gucaccccug
  421 gugccgugaa gcuggagaag gagaagcugg agcaaaaccc ggaggagucc caggacauca
  481 aagcucugca gaaagaacuc gagcaauuug ccaagcuccu gaagcagaag aggaucaccc
  541 ugggauauac acaggccgau guggggcuca cccugggggu ucuauuuggg aagguauuca
  601 gccaaacgac caucugccgc uuugaggcuc ugcagcuuag cuucaagaac auguguaagc
  661 ugcggcccuu gcugcagaag uggguggagg aagcugacaa caaugaaaau cuucaggaga
  721 uaugcaaagc agaaacccuc gugcaggccc gaaagagaaa gcgaaccagu aucgagaacc
  781 gagugagagg caaccuggag aauuuguucc ugcagugccc gaaacccaca cugcagcaga
  841 ucagccacau cgcccagcag cuugggcucg agaaggaugu gguccgagug ugguucugua
  901 accggcgcca gaagggcaag cgaucaagca gcgacuaugc acaacgagag gauuuugagg
  961 cugcuggguc uccuuucuca gggggaccag uguccuuucc ucuggcccca gggccccauu
 1021 uugguacccc aggcuauggg agcccucacu ucacugcacu guacuccucg gucccuuucc
 1081 cugaggggga agccuuuccc ccugucuccg ucaccacucu gggcucuccc augcauucaa
 1141 acugaggugc cugcccuucu aggaaugggg gacaggggga ggggaggagc uagggaaaga
 1201 aaaccuggag uuugugccag gguuuuuggg auuaaguucu ucauucacua aggaaggaau
 1261 ugggaacaca aagggugggg gcaggggagu uuggggcaac ugguuggagg gaaggugaag
 1321 uucaaugaug cucuugauuu uaaucccaca ucauguauca cuuuuuucuu aaauaaagaa
 1381 gccugggaca caguagauag acacacuua
def unction Bioengineering biocode Python • 239 views
ADD COMMENT
3
Entering edit mode

there is no question here. How To Ask Good Questions On Technical And Scientific Forums

furthermore, we won't do your homework.

ADD REPLY

Login before adding your answer.

Traffic: 1590 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6