---
# System prepended metadata

title: 'mu=random.sample(ncode, nucnum)'

---


munum=int(input('determine the number of mutations: '))

print('determine the type of the mutation: ')
print('1: Point mutation/substitution')
print('2: Deletion mutation')
print('3: Insertion mutation')
print('4: Inversion mutation')
print('5: Translocation mutation')

gseq='atgactgaatataaacttgtggtagttggagctggtggcgtaggcaagagtgccttgacgatacagctaattcagaatcattttgtggacgaatatgatccaacaatagaggattcctacaggaagcaagtagtaattgatggagaaacctgtctcttggatattctcgacacagcaggtcaagaggagtacagtgcaatgagggaccagtacatgaggactggggagggctttctttgtgtatttgccataaataatactaaatcatttgaagatattcaccattatagagaacaaattaaaagagttaaggactctgaagatgtacctatggtcctagtaggaaataaatgtgatttgccttctagaacagtagacacaaaacaggctcaggacttagcaagaagttatggaattccttttattgaaacatcagcaaagacaagacagagagtggaggatgctttttatacattggtgagagagatccgacaatacagattgaaaaaaatcagcaaagaagaaaagactcctggctgtgtgaaaattaaaaaatgcattataatgtaa'

phe1=['ttt','ttc']
leu2=['tta','ttg','ctt','ctc','ctg','cta']
ile3=['att','atc','ata']
met4=['atg']
val5=['gtt','gtc','gta','gtg']
ser6=['tct','tcc','tca','tcg','agt','agc']
pro7=['cct','ccc','cca','ccg']
thr8=['act','acc','aca','acg']
ala9=['gct','gcc','gca','gcg']
tyr10=['tat','tac']
his11=['cat','cac']
gln12=['caa','cag']
asn13=['aat','aac']
lys14=['aaa','aag']
asp15=['gat','gac']
glu16=['gaa','gag']
cys17=['tgt','tgc']
trp18=['tgg']
arg19=['cgt','cgc','cga','cgg','aga','agg']
gly20=['ggt','ggc','gga','ggg']
stop=['taa','tag','tga']

gcode=[phe1, leu2, ile3, met4, val5, ser6, pro7, thr8, ala9, tyr10, his11, gln12, asn13, lys14, asp15, glu16, cys17, trp18, arg19, gly20]

aacode=['F','L','I','M','V','S','P','T','A','Y','H','Q','N','K','D','E','C','W','R','G']

ncode=['a','c','g','t']
mpi=[]
gseqc=gseq
gseqlist=list(gseq)
import random
for i in range(munum):
    mutype=int(input('choose your mutation types: '))
    nucnum=int(input('Determine the number of nucleotide you want to mutate: '))
    mi=random.sample(range(0,len(gseqlist)-1), nucnum)
    print(mi)
    mn=random.sample(gseq, nucnum)
    print(mn)
    if mutype==1:
        ncode3=ncode.copy()
        cmi=gseqlist[mi]
        print(cmi)
        
    
    
 #   mu=random.sample(ncode, nucnum)
#    print(mu)
    
    
        
