control_enrichment.py 文件源码

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

项目:MIRA 作者: comprna 项目源码 文件源码
def write_fasta(file_list):
    '''
    Writes fasta files for cluster sequqnce from bedfile
    '''

    for infile in file_list:

        ifi = open(infile, "r")
        out_fa_file = infile + ".fa"

        with open(out_fa_file, "w") as of:
            of.close()
            pass

        of = open(out_fa_file,'a+')

        for line in ifi:
            f_header, f_seq = fasta_header(line)
            '''
            Create outfile
            '''
            of.write("{}\n{}\n".format(f_header, f_seq))

        print("done {}".format(out_fa_file))
        ifi.close()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号