McCloud用户的一个命令行助手。
项目描述
简介
mccloud_cli
是McCloud服务的一个命令行界面。McCloud提供了一个简单的手段,在云中运行Shasta基因组组装。 mccloud_cli
可以生成预签名URL,用于McCloud Web UI,并可以直接从命令行提交McCloud作业。
要使用mccloud_cli
,您必须安装并正确设置AWS命令行,使其与您的AWS账户协同工作。有关此先决条件的更多信息,请参阅AWS CLI用户指南。
快速入门
- 确保您已安装AWS CLI并正确设置,使其与您的账户协同工作。一个好的测试是能够成功将数据移动到您的自己的S3桶中(例如,
aws --profile your-aws-profile-name s3 ls s3://your-bucket-name/
) - [可选] 我们强烈建议您在虚拟环境中运行所有Python程序。设置并激活虚拟环境。
pip install mccloud-cli
mccloud_cli --help
预签名URL示例
mccloud_cli
可以生成 AWS 预签名 URL。这在你想要将数据存储在你自己的 AWS S3 桶中(即私有的)时很有用,但暂时授予 McCloud 读取输入数据的访问权限,并将结果写回到你的桶中。
重要提示:AWS S3 预签名 URL 是一种标准的数据共享方式,但假设你不会将 URL 分享给任何人。有关预签名 URL 的更多信息,请阅读 AWS S3 用户指南。
使用方法
$ mccloud_cli generate-s3-presigned-url --help
Usage: mccloud_cli generate-s3-presigned-url [OPTIONS]
Options:
--profile TEXT Use a specific profile from your AWS credential file.
--no-confirmation BOOLEAN Perform requested actions without user confirmation.
-i, --input-url TEXT S3 URL which will be presigned to allow READ (input) access.
--expires-in INTEGER Number of seconds until the pre-signed URLs expire. [default: 172800]
--help Show this message and exit.
例如
$ mccloud_cli generate-s3-presigned-url --profile my-aws-profile -i s3://my-bucket/reads.fasta.gz -o s3://my-bucket/results.tar.gz
This action will generate AWS S3 presigned URLs for the input and output URLs you have specified, with an expiration time 172800 seconds [2 days] from now.
Read (input) URLs:
------------------
s3://my-bucket/reads.fasta.gz
Do you wish to proceed? [y/N]: y
Your presigned URLs will expire in 24 hours.
Please launch the McCloud job with these URLs.
Presigned INPUT URLs:
---------------------
https://s3.amazonaws.com/my-bucket/reads.fasta.gz?AWSAccessKeyId=...
作业提交示例
mccloud_cli
也可以从命令行直接提交作业。输入和输出 URL 必须是你有权访问的桶中的 https
URL 或 s3
URL。
使用方法
$ mccloud_cli submit-job --help
Usage: mccloud_cli submit-job [OPTIONS]
Options:
--mcat TEXT McCloud Access Token, ie, MCAT-****. [required]
--email EMAIL ADDRESS Email address for job notifications. [required]
-i, --input-url TEXT S3 URL which will be presigned to allow READ (input) access. [required]
-o, --output-url TEXT A single S3 URL which McCloud has write access to. [required]
--shasta-version TEXT [required]
--shasta-config TEXT [required]
--shasta-cli-opts TEXT
--I-have-read-and-agree-to-McCloud-terms-of-use
Confirm that you have read, and agree to, the McCloud terms of use, available at
https://mccloud.czi.technology/terms-of-use
--tail-job-log After job is submitted, print out job log messages.
--profile TEXT Use a specific profile from your AWS credential file.
--help Show this message and exit.
例如
$ mccloud_cli submit-job --mcat 'MCAT-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' --email my@email.com --profile my-aws-profile -i s3://my-bucket/reads.fasta.gz -o s3://my-bucket/output-folder --shasta-version 0.7.0 --shasta-config Nanopore-Sep2020
I have read and agree to mccloud terms of use [y/N]: Y
Starting McCloud job, id = ec39baa4-ea68-4c1e-8040-40277b2a48a0
You can view logs at https://mccloud.czi.technology/jobs/ec39baa4-ea68-4c1e-8040-40277b2a48a0/monitor
项目详情
下载文件
下载适用于您平台文件的文件。如果您不确定要选择哪个,请了解更多关于 安装包 的信息。
源分布
mccloud_cli-0.0.8.tar.gz (10.3 kB 查看哈希值)
构建分布
mccloud_cli-0.0.8-py3-none-any.whl (10.7 kB 查看哈希值)
关闭
mccloud_cli-0.0.8.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | ec9960b2d85bcc29051ed0cda6ed1d79e5b7eab8e51ef478eb5d2f1c6a0807f3 |
|
MD5 | 4222bd8bebe161a7eafec7e72f906294 |
|
BLAKE2b-256 | 069bb4d6698ee9839f52af01ee4bd9e05d049e2baf097fdcef90a365807eebbe |
关闭
mccloud_cli-0.0.8-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 1abe6eda5256a7f568531cbfdc788ba689d6f86def90188f7149e476a65f45e8 |
|
MD5 | d9c3edcaba013b35d87bb407164f30b7 |
|
BLAKE2b-256 | 29c2c10d40e0baa30722a102abc5f6c2f75285e2ae166c4bada577ab8dc9cef2 |