Last active
October 11, 2019 18:59
-
-
Save n005/f0994f535a52b8a3d9f285fd7c35be58 to your computer and use it in GitHub Desktop.
Python code for the automatic association of the genetic code and α-amino acids.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DNA = 'UUUUUCUUAUGUUGABBBUAAUAG' #Input DNA | |
n = 3 | |
list = ["UUU", "UUC", "UUA", "UUG", "CUU", "CUC", "CUA", "CUG", "AUU", "AUC", "AUA", "AUG", "GUU", "GUC", "GUA", "GUG", "UCU", "UCC", "UCA", "UCG", "CCU", "CCC", "CCA", "CCG", "ACU", "ACC", "ACA", "ACG", "GCU", "GCC", "GCA", "GCG", "UAU", "UAC", "UAA", "UAG", "CAU", "CAC", "CAA", "CAG", "AAU", "AAC"," AAA", "AAG", "GAU", "GAC", "GAA", "GAG", "UGU", "UGC", "UGA", "UGG", "CGU", "CGC", "CGA", "CGG", "AGU", "AGC", "AGA", "AGG", "GGU", "GGC", "GGA", "GGG"] | |
list2 = ["Phe", "Phe", "Leu", "Leu", "Leu", "Leu", "Leu", "Leu", "lle", "lle", "lle", "Met", "Val", "Val", "Val", "Val", "Ser", "Ser", "Ser", "Ser", "Pro", "Pro", "Pro", "Pro", "Thr", "Thr", "Thr", "Thr", "Ala", "Ala", "Ala", "Ala", "Tyr", "Tyr", "Cod", "Stp", "His", "His", "Gln", "Gln", "Asn", "Asn", "Lys", "Lys", "Asp", "Asp", "Glu", "Glu", "Cys", "Cys", "Co/", "Try", "Arg", "Arg", "Arg", "Arg", "Ser", "Ser", "Arg", "Arg", "Cly", "Cly", "Cly", "Cly"] | |
list3 = [] | |
e = 1 | |
split_value0 = [DNA[i:i+n] for i in range(0, len(DNA), n)] | |
for a in range(len(split_value0)): | |
for b in range(len(list)): | |
if split_value0[a] == list[b]: | |
list3.append(list2[b]) | |
e = 0 | |
if e == 1: | |
list3.append("000") | |
e = 1 | |
print (split_value0) #Split by 3 DNA | |
print (list3) #Output α-amino acid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code python pour l'association automatique du code génétique et des acides α-aminé. SVT 1re.