def fasta2dict(fasta_name):
with open(fasta_name) as fa:
fa_dict = {}
for line in fa:
line = line.replace('\n','')
if line.startswith('>'):
seq_name = line[1:]
fa_dict[seq_name] = ''
else:
fa_dict[seq_name] += line.replace('\n','')
return fa_dict
fasta dict
发布于 2024-03-10 3 次阅读
Comments NOTHING