consensus_iAssembler.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:LoReAn 作者: lfaino 项目源码 文件源码
def fasta2Dict(fasta_filename):
    """
    Prepare a dictionary of all the sequences that is used together with
    the fasta file to make single fasta files for the assembly
    """
    fasta_file = open(fasta_filename, 'r')
    fasta_dict2 = SeqIO.to_dict(SeqIO.parse(fasta_file, 'fasta'))
    fasta_dict = {}
    for key, seq2 in list(fasta_dict2.items()):
        seq = str(seq2.seq).replace("N", "")
        fasta_dict[key] = seq
        del fasta_dict2[key]
    fasta_file.close()
    return fasta_dict
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号