命令行工具上传和下载CWL到和从SB供电的平台。
sbpack的Python项目详细描述
sbpack公司
上传(sbpack
)和下载(sbpull
)CWL应用程序到/从任何七桥供电的平台。
解析链接的进程、schemadefs和$include
s和$import
s
安装
(最好在虚拟环境中安装Python程序。 pipx是在隔离环境中安装命令行Python工具的非常有效的工具)
sbpack
需要Python3.6或更高版本
pip3 install pipx # in case you don't have pipx
pipx ensurepath # ensures CLI application directory is on your $PATH
在pypi
上安装最新版本 ^{pr2}$安装最新(未发布)代码
pipx install git+https://github.com/rabix/sbpack.git
# use pipx upgrade ... if upgrading an existing install
使用
$ sbpack -h
sbpack v2020.10.05
Upload CWL apps to any Seven Bridges powered platform
(c) Seven Bridges 2020
usage: sbpack [-h] [--filter-non-sbg-tags] profile appid cwl_path
positional arguments:
profile SB platform profile as set in the SB API credentials file.
appid Takes the form {user}/{project}/{app_id}.
cwl_path Path or URL to the main CWL file to be uploaded.
optional arguments:
-h, --help show this help message and exit
--filter-non-sbg-tags
Filter out custom tags that are not 'sbg:'```
## Uploading workflows defined remotely
`sbpack` handles local paths and remote URLs in a principled manner. This means that
`sbpack` will handle packing and uploading a local workflow that links to a remote workflow
which itself has linked workflows. It will therefore also handle packing a fully
remote workflow.
For example, to pack and upload the workflow located at `https://github.com/Duke-GCB/GGR-cwl/blob/master/v1.0/ATAC-seq_pipeline/pipeline-se.cwl`
go to the `raw` button and use that URL, like:
```bash
sbpack sbg kghosesbg/sbpla-31744/ATAC-seq-pipeline-se https://raw.githubusercontent.com/Duke-GCB/GGR-cwl/master/v1.0/ATAC-seq_pipeline/pipeline-se.cwl
本地包装
cwlpack <cwl> > packed.cwl
$ cwlpack -h
usage: cwlpack [-h] [--filter-non-sbg-tags] cwl_path
positional arguments:
cwl_path Path or URL to the main CWL file to be uploaded.
optional arguments:
-h, --help show this help message and exit
--filter-non-sbg-tags
Filter out custom tags that are not 'sbg:'
cwlpack
实用程序允许您打包工作流并将其打印在stdout
上,而不是
上传到SB平台。在
旁注
有趣的是,打包工作流至少可以避免两个cwltool
错误
[1],[2]。在
拉(拆包)
sbpull
将从任何SB支持的平台检索CWL并将其保存到本地磁盘。在
sbpull sbg admin/sbg-public-data/salmon-workflow-1-2-0/ salmon.cwl
使用--unpack
选项集,它还将递归地分解工作流,提取每个工作流
子进程放入自己的文件中。在
sbpull sbg admin/sbg-public-data/salmon-workflow-1-2-0/ salmon.cwl --unpack
This is useful if you want to use SB platform CWL with your own workflows. You can pull the relevant CWL into your code repository and use it with the rest of your code. If you use the
--unpack
option you can access the individual components of the SB CWL workflow separately.
拉出特定修订版
同时
sbpull sbg admin/sbg-public-data/bismark-0-21-0/ bismark.cwl
会把最新版本的Bismark放在平台上
sbpull sbg admin/sbg-public-data/bismark-0-21-0/2 bismark.cwl
将拉出此工具的修订版2
关于可逆性的注记
sbpack
和{sbpack
工作流,并且
那么sbpull --unpack
它们看起来会不同。
凭据文件和配置文件
如果使用sbgapi,则已经有了API配置文件。如果
不,你应该创造一个。它位于
~/.sevenbridges/credentials
。(Documentation)
简而言之,SBG配置文件中的每个部分(例如[cgc]
)都是一个
配置文件名,有两个条目。身份验证和端点
令牌,从平台上的“开发人员”选项卡中获取。在
[sbg-us]
api_endpoint = https://api.sbgenomics.com/v2
auth_token = <dev token here>
[sbg-eu]
api_endpoint = https://eu-api.sbgenomics.com/v2
auth_token = <dev token here>
[sbg-china]
api_endpoint = https://api.sevenbridges.cn/v2
auth_token = <dev token here>
[cgc]
api_endpoint = https://cgc-api.sbgenomics.com/v2
auth_token = <dev token here>
[cavatica]
api_endpoint = https://cavatica-api.sbgenomics.com/v2
auth_token = <dev token here>
[nhlbi]
api_endpoint = https://api.sb.biodatacatalyst.nhlbi.nih.gov/v2
auth_token = <dev token here>
在同一平台上可以有多个配置文件,例如,如果 是企业用户,并且您属于多个部门。请参考 有关更多详细信息,请参阅API文档。在
运行测试套件
拉动测试需要设置两个环境变量
SB_AUTH_TOKEN
SB_API_ENDPOINT
- 项目
标签: