我尝试从标头中具有增量 ID 的 .csv 文件创建多 fasta。但是我的脚本效果不佳。有什么建议吗?
M=open('/home/anna/Scrivania/db_mat/matk_2db_c.csv','r')
M_out=open('/home/anna/Scrivania/db_mat/db_matk_bronx.fas', 'w')
for i in range[1,92]:
num = "m" + str(i)
for line in M:
line1=line.split(',')
ID = line1[0]
SEQ = line1[1]
seq =line1[2]
M_out.write('>'+ num +'_' +ID +'_'+ SEQ +'\n' + seq )
M.close()
M_out.close()