You need to enable JavaScript to run this app.
导航
Workspace命令
最近更新时间:2024.06.13 21:31:35首次发布时间:2024.01.24 11:57:21

命令结构

Usage: bioctl workspace [OPTIONS] COMMAND [ARGS]...
Options:
-h, --help            show this help message and exit
  
Commands:
  create <Workspace_name>     创建Workspace
    Options:
       -d, --description     (*)输入Workspace描述
       -l, --label           workspace标签
       --s3-bucket           选择某个已有的bucket作为workspace bucket
           
  import      导入Workspace
    Options:
       -y, --yaml PATH     通过指定yaml文件路径创建Workspace
       
  export  <Workspace_name>   导出Workspace
    Options:
       -p, --output PATH     指定导出文件路径,后缀需要是zip

  delete  <Workspace_name>    删除相指定Workspace,默认不删除数据
    Options:

  list        列出所有当前Workspace
    Options:
      -p, --page               分页页数,默认为1  
      -s, --size               分页大小,默认为10
      --order-by               以时间或名称进行升序排序所有Workspace(--order-by CreatedAt/Name)
      --search-word            workspace name/description中模糊匹配,一次只能查一个
      --ids                    指定workspace id展示特定Workspace完整信息,包括名称、创建时间、挂载目录
      --label                 通过labels筛选
  
  update  <Workspace_name> 更新Workspace
      Options:
       -n,--name         输入将要修改的Workspace名称
       -d, --description  输入Workspace描述
       -l, --label        修改标签
       
  bind <workspace_name> <cluster_name>
      Options:
        -t, --type string   notebook/workflow类型.

  unbind <workspace_name> <cluster_name>
      Options:
        -t, --type string   notebook/workflow类型.

命令示例

导入Workspace

bioctl workspace import -y PATH_TO_workspacexxx.yaml

workspacexxx.yaml示例

yaml中datamodel、workflow、notebook中path需相对yaml文件路径
按下面示例中的path路径,文件夹组织路径如下

|--workspacexxx.yaml
|--cover.png
|--data
	|--sample.csv
	|--sample\_seet.csv
	|--workspace\_data.csv
|--workflow
	|--Cram-to-Bam
	  |--CramToBam.wdl
	|--GATK-HaplotypeCaller
	  |--Hello-GATK.wdl
|--notebook
	|--Cram-to-Bam
	  |--\_\_dashboard\_\_.ipynb
	  |--First-Notebooks.ipynb

yaml文件示例如下

name: Workspace
version: "1"
description: Demo演示
dataModels:
- name: sample
  type: entity
  path: data/sample.csv
- name: sample_set
  type: entitySet
  path: data/sample_set.csv
- name: workspace_data
  type: workspace
  path: data/workspace_data.csv
workflows:
- name: Cram-to-Bam
  language: WDL
  version: "1.0"
  mainWorkflowPath: CramToBam.wdl
  path: workflow/Cram-to-Bam
  metadata:
    scheme: https
    repo: gitee.com/joy_lee/seq-format-conversion01
    tag: v0.47
- name: GATK-HaplotypeCaller
  language: WDL
  version: "1.0"
  mainWorkflowPath: Hello-GATK.wdl
  path: workflow/GATK-HaplotypeCaller
  metadata:
    scheme: https
    repo: gitee.com/joy_lee/gatk-pipeline
    tag: v0.34
notebooks:
  image:
    name: paas-tob-qa-cn-shanghai.cr.volces.com/infcprelease/jupyterhub-datascience-notebook:miracle-1.4.1
    disPlayName: datascience
    packages: '{"R": {"DT": "0.20", "R6": "2.5.1", "fs": "1.5.0", "gh": "1.3.0", "ps":
      "1.6.0", "DBI": "1.1.1", "TTR": "0.24.2", "bit": "4.0.4", "cli": "3.1.0", "hms":
      "1.1.1", "ids": "1.0.1", "ini": "0.3.1", "lhs": "1.1.3", "rex": "1.2.0", "sys":
      "3.4", "xts": "0.12.1", "zip": "2.2.0", "zoo": "1.8-9", "MASS": "7.3-54", "Rcpp":
      "1.0.7", "base": "4.1.1", "blob": "1.2.2", "brew": "1.0-6", "brio": "1.1.2",
      "covr": "3.5.1", "curl": "4.3.2", "desc": "1.4.0", "gert": "1.4.3", "glue":
      "1.5.0", "grid": "4.1.1", "httr": "1.4.2"}}'
    basicEnv:
    - Python3.9.10
    - R 4.1.2
    - Julia 1.7.2
  artifacts:
  - name: __dashboard__
    path: notebook/__dashboard__.ipynb
  - name: First-Notebooks
    path: notebook/First-Notebooks.ipynb

创建Workspace

bioctl workspace create <workspace_name> -d descriptionxxxx  -t  nfs  -p /path

删除Workspace

bioctl workspace delete <workspace_name>

查询Workspace

$ [admin@bioos]bioctl workspace list --order-by CreateTime

WorkspaceName  WorkspaceID    CreateTime                        
xxxxx           XXXXXX         2022-09-09 01:15:26.394 +0000


$ [admin@bioos]bioctl workspace list --search-word xxxxx

WorkspaceName  WorkspaceID    CreateTime                        
xxxxx           XXXXXX         2022-09-09 01:15:26.394 +0000

导出Workspace

## 导出指定本地路径要详细到xxx.zip,后缀必须为zip
bioctl workspace export <workspace_name> -p /output/path/workspace_name.zip