parallelcopy.py 文件源码

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

项目:hgvm-builder 作者: BD2KGenomics 项目源码 文件源码
def main(args):
    """
    Parses command line arguments and do the work of the program.
    "args" specifies the program arguments, with args[0] being the executable
    name. The return value should be used as the program's exit code.
    """

    if len(args) == 2 and args[1] == "--test":
        # Run the tests
        return doctest.testmod(optionflags=doctest.NORMALIZE_WHITESPACE)

    options = parse_args(args) # This holds the nicely-parsed options object

    # Make a root job
    root_job = Job.wrapJobFn(copy_everything, options,
        cores=1, memory="1G", disk="4G")

    # Run it and see how many jobs fail
    failed_jobs = Job.Runner.startToil(root_job,  options)

    if failed_jobs > 0:
        raise Exception("{} jobs failed!".format(failed_jobs))

    print("All jobs completed successfully")

    return 0
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号