您好我是python的新手.我有以下问题:我想写一个脚本,给定带有歧义的(dna)序列,写入所有可能的序列,(如果少于100,如果有超过100个可能的序列,则适当的错误消息是印刷品)对于DNA核苷酸含糊不清:http://www.bioinformatics.org/sms/iupac.html
示例:对于“AYGH”脚本输出的序列“ACGA”, “ACGC”, “ACGT”, “ATGA”, “ATGC”,和“ATGT”.A,C,G和T是默认核苷酸.所有其他人可以有不同的值(见链接).
所以我写了这个:
def possible_sequences (seq):
poss_seq = ''
for i in seq:
if i=='A'or i=='C'or i=='G'or i=='T':
poss_seq += i
else:
if i== 'R':
poss_seq += 'A' # OR 'G', how should i implement this?
elif i == 'Y':
poss_seq += 'C' # OR T
elif i == 'S':
poss_seq += 'G' # OR C
elif i == 'W':
poss_seq += 'A' # OR T
elif …Run Code Online (Sandbox Code Playgroud) 码:
os.startfile("C:\finished.py")
Run Code Online (Sandbox Code Playgroud)
返回:
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\**x0cinished**.py'
Run Code Online (Sandbox Code Playgroud)
期望:拿C:\ finished.py
什么可能导致python像这样改变我的输入?