build.py 文件源码

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

项目:hgvm-builder 作者: BD2KGenomics 项目源码 文件源码
def concat_job(job, options, file_ids):
    """
    Merge zero or more VG protobuf files into one by concatenation. Returns the
    merged file ID.

    """

    with job.fileStore.writeGlobalFileStream() as (cat_handle, cat_id):
        # Make one merged file

        for part_id in file_ids:
            # For each part file
            with job.fileStore.readGlobalFileStream(part_id) as part_handle:
                # Open it

                # And stream it to the combined file
                shutil.copyfileobj(part_handle, cat_handle)

    return cat_id
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号