-
-
Save audy/b2feb4adfe46920e853d to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/python | |
import sys | |
fname = sys.argv[-1] | |
codon_to_aa = {} | |
codon_to_aa["gct"] = "A" | |
codon_to_aa["gcc"] = "A" | |
codon_to_aa["gca"] = "A" | |
codon_to_aa["gcg"] = "A" | |
codon_to_aa["cgt"] = "R" | |
codon_to_aa["cgc"] = "R" | |
codon_to_aa["cga"] = "R" | |
codon_to_aa["cgg"] = "R" | |
codon_to_aa["aga"] = "R" | |
codon_to_aa["agg"] = "R" | |
codon_to_aa["aat"] = "N" | |
codon_to_aa["aac"] = "N" | |
codon_to_aa["gat"] = "D" | |
codon_to_aa["gac"] = "D" | |
codon_to_aa["tgt"] = "C" | |
codon_to_aa["tgc"] = "C" | |
codon_to_aa["caa"] = "Q" | |
codon_to_aa["cag"] = "Q" | |
codon_to_aa["gaa"] = "E" | |
codon_to_aa["gag"] = "E" | |
codon_to_aa["ggt"] = "G" | |
codon_to_aa["ggc"] = "G" | |
codon_to_aa["gga"] = "G" | |
codon_to_aa["ggg"] = "G" | |
codon_to_aa["cat"] = "H" | |
codon_to_aa["cac"] = "H" | |
codon_to_aa["att"] = "I" | |
codon_to_aa["atc"] = "I" | |
codon_to_aa["ata"] = "I" | |
codon_to_aa["atg"] = "M" | |
codon_to_aa["tta"] = "L" | |
codon_to_aa["ttg"] = "L" | |
codon_to_aa["ctt"] = "L" | |
codon_to_aa["ctc"] = "L" | |
codon_to_aa["cta"] = "L" | |
codon_to_aa["ctg"] = "L" | |
codon_to_aa["aaa"] = "K" | |
codon_to_aa["aag"] = "K" | |
codon_to_aa["ttt"] = "F" | |
codon_to_aa["ttc"] = "F" | |
codon_to_aa["cct"] = "P" | |
codon_to_aa["ccc"] = "P" | |
codon_to_aa["cca"] = "P" | |
codon_to_aa["ccg"] = "P" | |
codon_to_aa["tct"] = "S" | |
codon_to_aa["tcc"] = "S" | |
codon_to_aa["tca"] = "S" | |
codon_to_aa["tcg"] = "S" | |
codon_to_aa["agt"] = "S" | |
codon_to_aa["agc"] = "S" | |
codon_to_aa["act"] = "T" | |
codon_to_aa["acc"] = "T" | |
codon_to_aa["aca"] = "T" | |
codon_to_aa["acg"] = "T" | |
codon_to_aa["tgg"] = "W" | |
codon_to_aa["tat"] = "Y" | |
codon_to_aa["tac"] = "Y" | |
codon_to_aa["gtt"] = "V" | |
codon_to_aa["gtc"] = "V" | |
codon_to_aa["gta"] = "V" | |
codon_to_aa["gtg"] = "V" | |
codon_to_aa["taa"] = "*" | |
codon_to_aa["tga"] = "*" | |
codon_to_aa["tag"] = "*" | |
linestring = open(fname, "r") | |
for line in linestring: | |
line.split()[1] | |
if linearr[0].isupper: | |
linearr[0] = x | |
print x_linestring.find("D"+"E"+"C"+"H") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment