赞
踩
#2.2计算胰岛素序列中的氨基酸频率 #2.2.2python会话示例 # insulin [Homo sapiensl GI:386828 # axtracted 51 amino acids of A+B chain insulin = 'GlVEQCCTSICSLYQLENYCNFVNQHLCGSHLVEALYLVCGERGFFYTPKT' for amino_acid in "ACDEFGHIKLMNPQRSTVWY": number = insulin.count(amino_acid) print (amino_acid, number) #2.2.3程序如何工作 #长命令要跨几行需要在行尾加上\反斜杠或者收尾加三引号 insulin_complete1 = 'MALWMRLLPLLALLALWGPDPAAAFVNQHLCGSHLVEALYLVCGERGFFYTPKTRREAEDLQVGQVELGG\ GPGAGSLQPLALEGSLQKRGIVEQCCTSICSLYQLENYCN' insulin_complete2 = '''MALWMRLLPLLALLALWGPDPAAAFVNQHLCGSHLVEALYLVCGERGFFYTPKTRREAEDLQVGQVELGG GPGAGSLQPLALEGSLQKRGIVEQCCTSICSLYQLENYCN''' #2.3.4字符串变量 #索引 #通过方括号内的数字索引,可以提取字符的某些位置。第一个字符被视为在位置O print( 'Protein'[0])
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。