更容易运行工作流,可跨环境配置
janis-pipelines.runner的Python项目详细描述
欢迎来到Janis Runner
janis。是否设计了工作流助手 使构建和运行工作流的过程更容易。
快速启动
pip3 install janis-pipelines[runner]
您可以使用以下命令行在cwltool中运行工作流:
janis run myWorkflow.py --engine cwltool
cli选项:
运行
-运行Janis工作流监视
-监视现有执行中止
-对现有执行发出中止请求输入
-为工作流生成输入文件翻译
-将工作流转换为CWL/WDL元数据
-获取执行时可用的元数据版本
-打印Janis_Runner的版本
运行
您可以使用run
方法运行工作流,下面是运行hello world示例的示例:
janis run hello
查看帮助指南
positional arguments:
workflow Run the workflow defined in this file
optional arguments:
-h, --help show this help message and exit
-n NAME, --name NAME If you have multiple workflows in your file, you may
want to help Janis out to select the right workflow to
run
--inputs INPUTS File of inputs (matching the workflow) to override,
these inputs will take precedence over inputs declared
in the workflow
-o OUTPUT_DIR, --output-dir OUTPUT_DIR
The output directory to which tasks are saved in,
defaults to $HOME.
-e ENVIRONMENT, --environment ENVIRONMENT
Select a preconfigured environment (takes precendence
over engine and filescheme). See the list of
environments with `janis environment list`
--engine {cromwell,cwltool}
Choose an engine to start
-f {local,ssh}, --filescheme {local,ssh}
Choose the filescheme required to retrieve the output
files where your engine is located. By selecting SSH,
Janis will SCP the files using the --filescheme-ssh-
binding SSH shortcut.
--filescheme-ssh-binding FILESCHEME_SSH_BINDING
Only valid if you've selected the ssh filescheme. (eg:
scp cluster:/path/to/output local/output/dir)
--cromwell-url CROMWELL_URL
Location to Cromwell
--validation-reference VALIDATION_REFERENCE
reference file for validation
--validation-truth-vcf VALIDATION_TRUTH_VCF
truthVCF for validation
--validation-intervals VALIDATION_INTERVALS
intervals to validate between
--validation-fields VALIDATION_FIELDS [VALIDATION_FIELDS ...]
outputs from the workflow to validate
--dryrun convert workflow, and do everything except submit the
workflow
--no-watch Submit the workflow and return the task id
--max-cores MAX_CORES
maximum number of cores to use when generating
resource overrides
--max-memory MAX_MEMORY
maximum GB of memory to use when generating resource
overrides
--hint-captureType {targeted,exome,chromosome,30x,90x,300x}
--hint-engine {cromwell}
配置
可以配置janis.runner
的许多属性。
您可以通过两种方式提供yaml配置文件:
- cli:
--config/path/to/config.yml
- 环境变量janis_config path=/path/to/config.yml
- 默认值:
$(home)/.janis/janis.conf
-将在此处另外查找配置。
配置当前未级联,但其目的是级联。
选项
默认值:janis戋runner/management/configuration.py
配置/db目录:
configdir:/path/to/configir/
- 环境变量的第二优先级:
janis_configdir
- 默认值:
(主页)/.janis/
- 数据库:
{configdir}/janis.db
-janis全局数据库
- 环境变量的第二优先级:
执行目录:
executiondir
- 环境变量的第二优先级:
janis_excecutiondir
- 默认值:
(主页)/janis/execution/
- 环境变量的第二优先级:
搜索路径:
搜索路径
- 将从环境变量中另外添加:
janis_searchpath
- 默认值:
(主页)/janis/
- 将从环境变量中另外添加:
发动机
目前有2个引擎支持janis.runner
- cwltool
- 克伦威尔 < > >
连接到现有实例(受良好支持)-将
--cromwell url
参数与端口连接到 允许janis.runner正确连接到此实例。运行并管理它自己的实例。WHE在任务启动时,启动的cromwell实例的
进程id
。 存储在taskdb
中,当任务完成执行时,该进程将手动停止。你可以 断开与任务的连接,但请注意,克伦威尔实例将一直运行,直到您watch
它再次确认已完成,然后手动关闭。 < > >- taskID作为标签绑定在GCP实例上(作为
tid
,允许您查询此信息)。 - Janis使用WDL的开发规范,要求Cromwell-42或更高版本。
- 如果要求janis启动自己的cromwell实例,则需要将jar导出为
$cromwelljar
- 列表:
janis环境列表
- 创建:不可用(建议:
janis environment创建"env"--引擎"engineid"--文件模式"fsid"
) - 删除不可用的(建议:
janis environment-d'env'
) - 本地文件模式
- sshfilescheme(
标识符
,连接字符串
)-我建议创建 ssh快捷方式避免在 数据库。janis使用的连接字符串如下:scp connection string:/path/to/output/local/persist/path
cwltool(默认)
由于cwltool提供元数据的方式,对cwltool的支持非常基础,并且仅限于提交 工作流和链接输出。它不允许你在以后断开和重新连接。够了 作为概念证明和非常基本的工作流程。
您应该包括--logdebug
参数以查看cwltool的输出。
克伦威尔
克伦威尔可以在两种模式下运行:
由于Cromwell具有广泛的元数据端点,这两个选项都提供了报告和进度跟踪。塔斯基德 (6个十六进制字符)作为标签包含在工作流中。您可以断开与作业的连接并重新连接此任务ID 通过命令:
janis watch $tid
运行示例的屏幕截图
(对于目标样本)可以在下面找到。(所有引擎都可以通过通用元数据语义(taskmetadata
)来支持此功能,
cwltool和toil都不支持大量的元数据轮询。
额外克伦威尔评论:
环境
环境是引擎和文件系统的组合。它们使你不必经常指定 发动机(+参数)。
环境信息用作模板,任务在其中存储自己的文件系统和引擎副本。 选择此选项是因为它允许在不丢失工作流元数据的情况下重新定位任务的输出。
< Buff行情>添加和删除环境当前不可用。
操作:
文件系统
对于执行工作流的文件系统有一个薄弱的概念。这个工具实际上只是开发出来的
使用本地文件系统
支持的文件系统:
数据库
janis在环境和任务指针的{configdir}/janis.db
处存储全局sqlite数据库
(默认值:~/.janis/janis.db
)。启动任务时,将复制数据库和工作流文件
到生成的输出文件夹(默认:~/janis/execution/{workflowname}/${yyyymmdd}{tid}/task.db
)。