Lab Journal Hemochromatosis Task9

From Bioinformatikpedia
Revision as of 17:07, 24 August 2013 by Betza (talk | contribs) (Created page with "=== mut_seq.py === <source lang="python> import copy seq="rllrshslhylfmgaseqdlglslfealgyvddqlfvfydhesrrveprtpwvssrissqmwlqlsqslkgwdhmftvdfwtimenhnhskeshtlqvilgcemqednstegywkygydg…")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

mut_seq.py

<source lang="python> import copy seq="rllrshslhylfmgaseqdlglslfealgyvddqlfvfydhesrrveprtpwvssrissqmwlqlsqslkgwdhmftvdfwtimenhnhskeshtlqvilgcemqednstegywkygydgqdhlefcpdtldwraaeprawptklewerhkirarqnraylerdcpaqlqqllelgrgvldqqvpplvkvthhvtssvttlrcralnyypqnitmkwlkdkqpmdakefepkdvlpngdgtyqgwitlavppgeeqrytcqvehpgldqpliviw" seq= list(seq)

mut = {53:"M",63:"D",97:"I",217:"I",282:"Y"}

for key in mut.iterkeys(): mut_seq = copy.deepcopy(seq) mut_seq[key-23] = mut[key] ## -(22+1) 22 for PDB - seq offset and 1 for indexing starting at 0 fName= str(key) + mut[key] + ".seq" with open(fName,"w+") as f: f.write("".join(mut_seq[3:]))


</source>