Shared9 edges from 1 vertex.sagewsOpen in CoCalc
Author: Leonardo Pesce
Views : 5
G=Graph({'000':['001','002','003','010','020','030','100','200','300'], '001':['002','003','011','021','031','101','201','301'], '002':['003','012','022','032','102','202','302'], '003':['013','023','033','103','203','303'], '010':['011','012','013','020','030','110','210','310'], '011':['012','013','021','031','111','211','311'], '012':['013','022','032','112','212','312'], '013':['023','033','113','213','313'], '020':['021','022','023','030','120','220','320'], '021':['022','023','031','121','221','321'], '022':['023','032','122','222','322'], '023':['033','123','223','323'], '030':['031','032','033','130','230','330'], '031':['032','033','131','231','331'], '032':['033','132','232','332'], '033':['133','233','333'], '100':['101','102','103','110','120','130','200','300'], '101':['102','103','111','121','131','201','301'], '102':['103','112','122','132','202','302'], '103':['113','123','133','203','303'], '110':['111','112','113','120','130','210','310'], '111':['112','113','121','131','211','311'], '112':['113','122','132','212','312'], '113':['123','133','213','313'], '120':['121','122','123','130','220','320'], '121':['122','123','131','221','321'], '122':['123','132','222','322'], '123':['133','223','323'], '130':['131','132','133','230','330'], '131':['132','133','231','331'], '132':['133','232','332'], '133':['233','333'], '200':['201','202','203','210','220','230','300'], '201':['202','203','211','221','231','301'], '202':['203','212','222','232','302'], '203':['213','223','233','303'], '210':['211','212','213','220','230','310'], '211':['212','213','221','231','311'], '212':['213','222','232','312'], '213':['223','233','313'], '220':['221','222','223','230','320'], '221':['222','223','231','321'], '222':['223','232','322'], '223':['233','323'], '230':['231','232','233','330'], '231':['232','233','331'], '232':['233','332'], '233':['333'], '300':['301','302','303','310','320','230'], '301':['302','303','311','321','331'], '302':['303','312','322','332'], '303':['313','323','333'], '310':['311','312','313','320','330'], '311':['312','313','321','331'], '312':['313','322','332'], '313':['323','333'], '320':['321','322','323','330'], '321':['322','323','331'], '322':['323','332'], '323':['333'], '330':['331','332','333'], '331':['332','333'], '332':['333']}) G.plot(figsize=[10,10])
G=Graph({'CCC':['CCA','CCU','CCG','CAC','CUC','CGC','ACC','UCC','GCC'], 'CCA':['CCU','CCG','CAA','CUA','CGA','ACA','UCA','GCA'], 'CCU':['CCG','CAU','CUU','CGU','ACU','UCU','GCU'], 'CCG':['CAG','CUG','CGG','ACG','UCG','GCG'], 'CAC':['CAA','CAU','CAG','CUC','CGC','AAC','UAC','GAC'], 'CAA':['CAU','CAG','CUA','CGA','AAA','UAA','GAA'], 'CAU':['CAG','CUU','CGU','AAU','UAU','GAU'], 'CAG':['CUG','CGG','AAG','UAG','GAG'], 'CUC':['CUA','CUU','CUG','CGC','AUC','UUC','GUC'], 'CUA':['CUU','CUG','CGA','AUA','UUA','GUA'], 'CUU':['CUG','CGU','AUU','UUU','GUU'], 'CUG':['CGG','AUG','UUG','GUG'], 'CGC':['CGA','CGU','CGG','AGC','UGC','GGC'], 'CGA':['CGU','CGG','AGA','UGA','GGA'], 'CGU':['CGG','AGU','UGU','GGU'], 'CGG':['AGG','UGG','GGG'], 'ACC':['ACA','ACU','ACG','AAC','AUC','AGC','UCC','GCC'], 'ACA':['ACU','ACG','AAA','AUA','AGA','UCA','GCA'], 'ACU':['ACG','AAU','AUU','AGU','UCU','GCU'], 'ACG':['AAG','AUG','AGG','UCG','GCG'], 'AAC':['AAA','AAU','AAG','AUC','AGC','UAC','GAC'], 'AAA':['AAU','AAG','AUA','AGA','UAA','GAA'], 'AAU':['AAG','AUU','AGU','UAU','GAU'], 'AAG':['AUG','AGG','UAG','GAG'], 'AUC':['AUA','AUU','AUG','AGC','UUC','GUC'], 'AUA':['AUU','AUG','AGA','UUA','GUA'], 'AUU':['AUG','AGU','UUU','GUU'], 'AUG':['AGG','UUG','GUG'], 'AGC':['AGA','AGU','AGG','UGC','GGC'], 'AGA':['AGU','AGG','UGA','GGA'], 'AGU':['AGG','UGU','GGU'], 'AGG':['UGG','GGG'], 'UCC':['UCA','UCU','UCG','UAC','UUC','UGC','GCC'], 'UCA':['UCU','UCG','UAA','UUA','UGA','GCA'], 'UCU':['UCG','UAU','UUU','UGU','GCU'], 'UCG':['UAG','UUG','UGG','GCG'], 'UAC':['UAA','UAU','UAG','UUC','UGC','GAC'], 'UAA':['UAU','UAG','UUA','UGA','GAA'], 'UAU':['UAG','UUU','UGU','GAU'], 'UAG':['UUG','UGG','GAG'], 'UUC':['UUA','UUU','UUG','UGC','GUC'], 'UUA':['UUU','UUG','UGA','GUA'], 'UUU':['UUG','UGU','GUU'], 'UUG':['UGG','GUG'], 'UGC':['UGA','UGU','UGG','GGC'], 'UGA':['UGU','UGG','GGA'], 'UGU':['UGG','GGU'], 'UGG':['GGG'], 'GCC':['GCA','GCU','GCG','GAC','GUC','UGC'], 'GCA':['GCU','GCG','GAA','GUA','GGA'], 'GCU':['GCG','GAU','GUU','GGU'], 'GCG':['GAG','GUG','GGG'], 'GAC':['GAA','GAU','GAG','GUC','GGC'], 'GAA':['GAU','GAG','GUA','GGA'], 'GAU':['GAG','GUU','GGU'], 'GAG':['GUG','GGG'], 'GUC':['GUA','GUU','GUG','GGC'], 'GUA':['GUU','GUG','GGA'], 'GUU':['GUG','GGU'], 'GUG':['GGG'], 'GGC':['GGA','GGU','GGG'], 'GGA':['GGU','GGG'], 'GGU':['GGG']}) G.plot3d('white')
3D rendering not yet implemented
G=Graph({ 'CCC':{'CCA':['4'],'CCU':['4'],'CCG':['4'],'CAC':['0'],'CUC':['0'],'CGC':['0'],'ACC':['0'],'UCC':['0'],'GCC':['0']}, 'CCA':{'CCU':['4'],'CCG':['4'],'CAA':['0'],'CUA':['0'],'CGA':['0'],'ACA':['0'],'UCA':['0'],'GCA':['0']}, 'CCU':{'CCG':['4'],'CAU':['0'],'CUU':['0'],'CGU':['0'],'ACU':['0'],'UCU':['0'],'GCU':['0']}, 'CCG':{'CAG':['0'],'CUG':['0'],'CGG':['0'],'ACG':['0'],'UCG':['0'],'GCG':['0']}, 'CAC':{'CAA':['0'],'CAU':['2'],'CAG':['0'],'CUC':['0'],'CGC':['0'],'AAC':['0'],'UAC':['0'],'GAC':['0']}, 'CAA':{'CAU':['0'],'CAG':['2'],'CUA':['0'],'CGA':['0'],'AAA':['0'],'UAA':['0'],'GAA':['0']}, 'CAU':{'CAG':['0'],'CUU':['0'],'CGU':['0'],'AAU':['0'],'UAU':['0'],'GAU':['0']}, 'CAG':{'CUG':['0'],'CGG':['0'],'AAG':['0'],'UAG':['0'],'GAG':['0']}, 'CUC':{'CUA':['6'],'CUU':['6'],'CUG':['6'],'CGC':['0'],'AUC':['0'],'UUC':['0'],'GUC':['0']}, 'CUA':{'CUU':['6'],'CUG':['6'],'CGA':['0'],'AUA':['0'],'UUA':['0'],'GUA':['0']}, 'CUU':{'CUG':['6'],'CGU':['0'],'AUU':['0'],'UUU':['0'],'GUU':['0']}, 'CUG':{'CGG':['0'],'AUG':['0'],'UUG':['0'],'GUG':['0']}, 'CGC':{'CGA':['6'],'CGU':['6'],'CGG':['6'],'AGC':['0'],'UGC':['0'],'GGC':['0']}, 'CGA':{'CGU':['6'],'CGG':['6'],'AGA':['0'],'UGA':['0'],'GGA':['0']}, 'CGU':{'CGG':['6'],'AGU':['0'],'UGU':['0'],'GGU':['0']}, 'CGG':{'AGG':['0'],'UGG':['0'],'GGG':['0']}, 'ACC':{'ACA':['4'],'ACU':['4'],'ACG':['4'],'AAC':['0'],'AUC':['0'],'AGC':['0'],'UCC':['0'],'GCC':['0']}, 'ACA':{'ACU':['4'],'ACG':['4'],'AAA':['0'],'AUA':['0'],'AGA':['0'],'UCA':['0'],'GCA':['0']}, 'ACU':{'ACG':['4'],'AAU':['0'],'AUU':['0'],'AGU':['0'],'UCU':['0'],'GCU':['0']}, 'ACG':{'AAG':['0'],'AUG':['0'],'AGG':['0'],'UCG':['0'],'GCG':['0']}, 'AAC':{'AAA':['0'],'AAU':['2'],'AAG':['0'],'AUC':['0'],'AGC':['0'],'UAC':['0'],'GAC' :['0']}, 'AAA':{'AAU':['0'],'AAG':['2'],'AUA':['0'],'AGA':['0'],'UAA':['0'],'GAA':['0']}, 'AAU':{'AAG':['0'],'AUU':['0'],'AGU':['0'],'UAU':['0'],'GAU':['0']}, 'AAG':{'AUG':['0'],'AGG':['0'],'UAG':['0'],'GAG':['0']}, 'AUC':{'AUA':['3'],'AUU':['3'],'AUG':['0'],'AGC':['0'],'UUC':['0'],'GUC':['0']}, 'AUA':{'AUU':['3'],'AUG':['0'],'AGA':['0'],'UUA':['0'],'GUA':['0']}, 'AUU':{'AUG':['0'],'AGU':['0'],'UUU':['0'],'GUU':['0']}, 'AUG':{'AGG':['0'],'UUG':['0'],'GUG':['0']}, 'AGC':{'AGA':['0'],'AGU':['6'],'AGG':['0'],'UGC':['0'],'GGC':['0']}, 'AGA':{'AGU':['0'],'AGG':['6'],'UGA':['0'],'GGA':['0']}, 'AGU':{'AGG':['0'],'UGU':['0'],'GGU':['0']}, 'AGG':{'UGG':['0'],'GGG':['0']}, 'UCC':{'UCA':['6'],'UCU':['6'],'UCG':['6'],'UAC':['0'],'UUC':['0'],'UGC':['0'],'GCC':['0']}, 'UCA':{'UCU':['6'],'UCG':['6'],'UAA':['0'],'UUA':['0'],'UGA':['0'],'GCA':['0']}, 'UCU':{'UCG':['6'],'UAU':['0'],'UUU':['0'],'UGU':['0'],'GCU':['0']}, 'UCG':{'UAG':['0'],'UUG':['0'],'UGG':['0'],'GCG':['0']}, 'UAC':{'UAA':['0'],'UAU':['2'],'UAG':['0'],'UUC':['0'],'UGC':['0'],'GAC':['0']}, 'UAA':{'UAU':['0'],'UAG':['3'],'UUA':['0'],'UGA':['3'],'GAA':['0']}, 'UAU':{'UAG':['0'],'UUU':['0'],'UGU':['0'],'GAU':['0']}, 'UAG':{'UUG':['0'],'UGG':['0'],'GAG':['0']}, 'UUC':{'UUA':['0'],'UUU':['2'],'UUG':['0'],'UGC':['0'],'GUC' :['0']}, 'UUA':{'UUU':['0'],'UUG':['6'],'UGA':['0'],'GUA':['0']}, 'UUU':{'UUG':['0'],'UGU':['0'],'GUU':['0']}, 'UUG':{'UGG':['0'],'GUG':['0']}, 'UGC':{'UGA':['0'],'UGU':['2'],'UGG':['0'],'GGC':['0']}, 'UGA':{'UGU':['0'],'UGG':['0'],'GGA':['0']}, 'UGU':{'UGG':['0'],'GGU':['0']}, 'UGG':{'GGG':['0']}, 'GCC':{'GCA':['4'],'GCU':['4'],'GCG':['4'],'GAC':['0'],'GUC':['0'],'UGC':['0']}, 'GCA':{'GCU':['4'],'GCG':['4'],'GAA':['0'],'GUA':['0'],'GGA':['0']}, 'GCU':{'GCG':['4'],'GAU':['0'],'GUU':['0'],'GGU':['0']}, 'GCG':{'GAG':['0'],'GUG':['0'],'GGG':['0']}, 'GAC':{'GAA':['0'],'GAU':['2'],'GAG':['0'],'GUC':['0'],'GGC':['0']}, 'GAA':{'GAU':['0'],'GAG':['2'],'GUA':['0'],'GGA':['0']}, 'GAU':{'GAG':['0'],'GUU':['0'],'GGU':['0']}, 'GAG':{'GUG':['0'],'GGG':['0']}, 'GUC':{'GUA':['4'],'GUU':['4'],'GUG':['4'],'GGC':['0']}, 'GUA':{'GUU':['4'],'GUG':['4'],'GGA':['0']}, 'GUU':{'GUG':['4'],'GGU':['0']}, 'GUG':{'GGG':['0']}, 'GGC':{'GGA':['4'],'GGU':['4'],'GGG':['4']}, 'GGA':{'GGU':['4'],'GGG':['4']}, 'GGU':{'GGG':['4']}}) G.plot(figsize=[10,10], color_by_label=True, vertex_labels=True, vertex_size=200) G=Graph({ 'CCC':{'CCA':['4'],'CCU':['4'],'CCG':['4'],'CAC':['0'],'CUC':['0'],'CGC':['0'],'ACC':['0'],'UCC':['0'],'GCC':['0']}, 'CCA':{'CCU':['4'],'CCG':['4'],'CAA':['0'],'CUA':['0'],'CGA':['0'],'ACA':['0'],'UCA':['0'],'GCA':['0']}, 'CCU':{'CCG':['4'],'CAU':['0'],'CUU':['0'],'CGU':['0'],'ACU':['0'],'UCU':['0'],'GCU':['0']}, 'CCG':{'CAG':['0'],'CUG':['0'],'CGG':['0'],'ACG':['0'],'UCG':['0'],'GCG':['0']}, 'CAC':{'CAA':['0'],'CAU':['2'],'CAG':['0'],'CUC':['0'],'CGC':['0'],'AAC':['0'],'UAC':['0'],'GAC':['0']}, 'CAA':{'CAU':['0'],'CAG':['2'],'CUA':['0'],'CGA':['0'],'AAA':['0'],'UAA':['0'],'GAA':['0']}, 'CAU':{'CAG':['0'],'CUU':['0'],'CGU':['0'],'AAU':['0'],'UAU':['0'],'GAU':['0']}, 'CAG':{'CUG':['0'],'CGG':['0'],'AAG':['0'],'UAG':['0'],'GAG':['0']}, 'CUC':{'CUA':['6'],'CUU':['6'],'CUG':['6'],'CGC':['0'],'AUC':['0'],'UUC':['0'],'GUC':['0']}, 'CUA':{'CUU':['6'],'CUG':['6'],'CGA':['0'],'AUA':['0'],'UUA':['0'],'GUA':['0']}, 'CUU':{'CUG':['6'],'CGU':['0'],'AUU':['0'],'UUU':['0'],'GUU':['0']}, 'CUG':{'CGG':['0'],'AUG':['0'],'UUG':['0'],'GUG':['0']}, 'CGC':{'CGA':['6'],'CGU':['6'],'CGG':['6'],'AGC':['0'],'UGC':['0'],'GGC':['0']}, 'CGA':{'CGU':['6'],'CGG':['6'],'AGA':['0'],'UGA':['0'],'GGA':['0']}, 'CGU':{'CGG':['6'],'AGU':['0'],'UGU':['0'],'GGU':['0']}, 'CGG':{'AGG':['0'],'UGG':['0'],'GGG':['0']}, 'ACC':{'ACA':['4'],'ACU':['4'],'ACG':['4'],'AAC':['0'],'AUC':['0'],'AGC':['0'],'UCC':['0'],'GCC':['0']}, 'ACA':{'ACU':['4'],'ACG':['4'],'AAA':['0'],'AUA':['0'],'AGA':['0'],'UCA':['0'],'GCA':['0']}, 'ACU':{'ACG':['4'],'AAU':['0'],'AUU':['0'],'AGU':['0'],'UCU':['0'],'GCU':['0']}, 'ACG':{'AAG':['0'],'AUG':['0'],'AGG':['0'],'UCG':['0'],'GCG':['0']}, 'AAC':{'AAA':['0'],'AAU':['2'],'AAG':['0'],'AUC':['0'],'AGC':['0'],'UAC':['0'],'GAC' :['0']}, 'AAA':{'AAU':['0'],'AAG':['2'],'AUA':['0'],'AGA':['0'],'UAA':['0'],'GAA':['0']}, 'AAU':{'AAG':['0'],'AUU':['0'],'AGU':['0'],'UAU':['0'],'GAU':['0']}, 'AAG':{'AUG':['0'],'AGG':['0'],'UAG':['0'],'GAG':['0']}, 'AUC':{'AUA':['3'],'AUU':['3'],'AUG':['0'],'AGC':['0'],'UUC':['0'],'GUC':['0']}, 'AUA':{'AUU':['3'],'AUG':['0'],'AGA':['0'],'UUA':['0'],'GUA':['0']}, 'AUU':{'AUG':['0'],'AGU':['0'],'UUU':['0'],'GUU':['0']}, 'AUG':{'AGG':['0'],'UUG':['0'],'GUG':['0']}, 'AGC':{'AGA':['0'],'AGU':['6'],'AGG':['0'],'UGC':['0'],'GGC':['0']}, 'AGA':{'AGU':['0'],'AGG':['6'],'UGA':['0'],'GGA':['0']}, 'AGU':{'AGG':['0'],'UGU':['0'],'GGU':['0']}, 'AGG':{'UGG':['0'],'GGG':['0']}, 'UCC':{'UCA':['6'],'UCU':['6'],'UCG':['6'],'UAC':['0'],'UUC':['0'],'UGC':['0'],'GCC':['0']}, 'UCA':{'UCU':['6'],'UCG':['6'],'UAA':['0'],'UUA':['0'],'UGA':['0'],'GCA':['0']}, 'UCU':{'UCG':['6'],'UAU':['0'],'UUU':['0'],'UGU':['0'],'GCU':['0']}, 'UCG':{'UAG':['0'],'UUG':['0'],'UGG':['0'],'GCG':['0']}, 'UAC':{'UAA':['0'],'UAU':['2'],'UAG':['0'],'UUC':['0'],'UGC':['0'],'GAC':['0']}, 'UAA':{'UAU':['0'],'UAG':['3'],'UUA':['0'],'UGA':['3'],'GAA':['0']}, 'UAU':{'UAG':['0'],'UUU':['0'],'UGU':['0'],'GAU':['0']}, 'UAG':{'UUG':['0'],'UGG':['0'],'GAG':['0']}, 'UUC':{'UUA':['0'],'UUU':['2'],'UUG':['0'],'UGC':['0'],'GUC' :['0']}, 'UUA':{'UUU':['0'],'UUG':['6'],'UGA':['0'],'GUA':['0']}, 'UUU':{'UUG':['0'],'UGU':['0'],'GUU':['0']}, 'UUG':{'UGG':['0'],'GUG':['0']}, 'UGC':{'UGA':['0'],'UGU':['2'],'UGG':['0'],'GGC':['0']}, 'UGA':{'UGU':['0'],'UGG':['0'],'GGA':['0']}, 'UGU':{'UGG':['0'],'GGU':['0']}, 'UGG':{'GGG':['0']}, 'GCC':{'GCA':['4'],'GCU':['4'],'GCG':['4'],'GAC':['0'],'GUC':['0'],'UGC':['0']}, 'GCA':{'GCU':['4'],'GCG':['4'],'GAA':['0'],'GUA':['0'],'GGA':['0']}, 'GCU':{'GCG':['4'],'GAU':['0'],'GUU':['0'],'GGU':['0']}, 'GCG':{'GAG':['0'],'GUG':['0'],'GGG':['0']}, 'GAC':{'GAA':['0'],'GAU':['2'],'GAG':['0'],'GUC':['0'],'GGC':['0']}, 'GAA':{'GAU':['0'],'GAG':['2'],'GUA':['0'],'GGA':['0']}, 'GAU':{'GAG':['0'],'GUU':['0'],'GGU':['0']}, 'GAG':{'GUG':['0'],'GGG':['0']}, 'GUC':{'GUA':['4'],'GUU':['4'],'GUG':['4'],'GGC':['0']}, 'GUA':{'GUU':['4'],'GUG':['4'],'GGA':['0']}, 'GUU':{'GUG':['4'],'GGU':['0']}, 'GUG':{'GGG':['0']}, 'GGC':{'GGA':['4'],'GGU':['4'],'GGG':['4']}, 'GGA':{'GGU':['4'],'GGG':['4']}, 'GGU':{'GGG':['4']}}) G.plot3d(figsize=[10,10], color_by_label=True, vertex_labels=True, vertex_size=0)
3D rendering not yet implemented
#red are the edges that changes from one amino scid to another #blue are the amino acid made by 6 codons #yellow are the amino acid made by 4 codons #purple are the amino acid made by 3 codons one of them is for the codons that produce the stop signal(made by only 2 edge and 3 vertices) #green are the amino acid made by 2 codons #2 vertices have only red edges around them this two are the two amino acid made by only one codon (Met('AUG') and Trp('UGG')) # # observation: # 1) yellow regions tend to cluster together # 2) at most three of nine edges are colored (if we don't consider red as a color)