命令行工具上传和下载CWL到和从SB供电的平台。

sbpack的Python项目详细描述


sbpack公司

PyPI version

上传(sbpack)和下载(sbpull)CWL应用程序到/从任何七桥供电的平台。 解析链接的进程、schemadefs和$includes和$imports

安装

(最好在虚拟环境中安装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和{}在文本上是不可逆的。已包装和未包装的CWL 但是,如果您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

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Spring引导jar文件可重用(本地maven存储库)   没有标题的java Webpush通知不会出现   本地类的优先级。java文件还是从java包中导入的类?   java Sparks enableHiveSupport   java通过AJAX调用我的WebService通常会导致服务器故障   java添加到链表末尾   java提供了对Spring数据Mongo存储库的限制   仅显示字符的程序显示“?”在爪哇   java Oracle 10.2.0.4.0和OJDBC1212。1.0.0.jar | |无法获取JDBC连接;嵌套的异常是ja│ │ ORA01882:未找到时区区域   使用Netflix Eureka的java JSONException   java我们如何为akka非类型处理器编写单元测试   java 安卓在触摸和移动时获取按钮文本   java将字符串转换为int数组bluej