Command line tool to upload CWL documents to SB powered platforms.
Project description
sbpack
Upload CWL apps to any Seven Bridges powered platform. Resolves linked processes, schemadefs and $include
s and
$import
s.
Installation
(It is good practice to install Python programs in a virtual environment. pipx is a very effective tool for installing command line Python tools in isolated environments)
sbpack
needs Python 3.6 or later
pip3 install pipx # in case you don't have pipx
pipx ensurepath # ensures CLI application directory is on your $PATH
pipx install git+https://github.com/kaushik-work/sbpack.git
# use pipx upgrade ... if upgrading an existing install
Usage
Usage
sbpack <profile> <id> <cwl>
where:
<profile> refers to a SB platform profile as set in the SB API credentials file.
<id> takes the form {user}/{project}/{app_id} which installs (or updates)
"app_id" located in "project" of "user".
<cwl> is the path to the main CWL file to be uploaded. This can be a remote file.
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:
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
Local packing
Usage
cwlpack <cwl> > packed.cwl
The cwlpack
utility allows you to pack a workflow and print it out on stdout
instead of
uploading it to a SB platform.
Credentials file and profiles
If you use the SBG API you already have an API configuration file. If
not, you should create one. It is located in
~/.sevenbridges/credentials
. (Documentation)
Briefly, each section in the SBG configuration file (e.g. [cgc]
) is a
profile name and has two entries. The end-point and an authentication
token, which you get from your developer tab on the platform.
[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>
You can have several profiles on the same platform if, for example, you are an enterprise user and you belong to several divisions. Please refer to the API documentation for more detail.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for sbpack-2020.6.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9303f6762584e24fc5f25e495b8be2557760585d9127e9dcba9b3b0220091027 |
|
MD5 | d5b14870baeeeccdb6409aab80563c6a |
|
BLAKE2b-256 | 5a971da1029922db92914b64b8c7a93ec987336d0d9824c8abc632f11b29d3aa |