pipetteSynchronousRunner.py 文件源码

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

项目:firecloud_developer_toolkit 作者: broadinstitute 项目源码 文件源码
def pipetteSynchronousRunner(args):
    full_script_path = os.path.abspath(args[0])
    scriptDir = os.path.dirname(full_script_path)    

    communicationDirBase = args[1]
    fh_outdir = args[2]
    pipelineCmdStr = ' '.join(args[3:])

    if os.path.exists(communicationDirBase):
        fns = os.listdir(communicationDirBase)
        if len(fns)>0:
            raise Exception('For running single pipelines, comm_dir must start empty')
    if communicationDirBase not in pipelineCmdStr:
        raise Exception('Pipeline script must accept the comm_dir as an argument')

    os.symlink(fh_outdir,os.path.join(communicationDirBase,'firehose_outdir'))

    # run the pipeline, write its description to communicationDirBase/launch
    subprocess.check_call(pipelineCmdStr,shell=True)

    runMode = 'runone'
    retryMode = 'False'
    main = pipetteServer.Main()
    main.run_server(communicationDirBase, scriptDir, runMode, retryMode)
    # if one or more pipelines fail, an exception will be thrown once all that can be run has been attempted.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号