submit_split_job.py 文件源码

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

项目:Falco 作者: VCCRI 项目源码 文件源码
def set_mapper_number(manifest_file):
    fastq_counts = 0

    if manifest_file.startswith("s3://"):
        s3 = boto3.resource("s3")

        bucket_name, key_prefix = manifest_file.strip().strip("/")[5:].split("/", 1)

        with tempfile.TemporaryDirectory() as tmpdirname:
            s3.meta.client.download_file(bucket_name, key_prefix, tmpdirname + "/manifest")

            for line in open(tmpdirname+"/manifest"):
                fastq_counts += 1
    else:
        for line in open(manifest_file):
            fastq_counts += 1

    return fastq_counts
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号