You need to enable JavaScript to run this app.
导航

工作流命令

最近更新时间2024.01.24 11:57:22

首次发布时间2024.01.24 11:57:22

命令结构

Usage: bioctl workflow [OPTIONS] COMMAND [ARGS]...

Commands:
  create <workflow_name>     创建workflow工作流并命名为workflow_name
      -w, --workspace        (*)指定工作流所在Workspace
      -d, --description       输入Workflow描述
      --language              (*)输入Workflow的语言(目前仅支持WDL,WDL需大写)
      -s, --source            (*)选择导入方式 (git/dockstore/file)
      --url                   git地址/TRS url(source为dockstore,对应TRS url,source为Git,对应Git地址)
      --tag                   git tag/TRS version(source为dockstore,对应TRS version,source为Git,对应Git tag)
      --token                 git token
      -p, --main-workflow-path  (*) 主工作流路径
      -i, --input-file        本地zip文件,当source为file类型时必选
   
  import    以文件形式导入workspace的工作流
    Options:                
        -f, --file          (*)通过Json文件方式作为工作流输入
        -w, --workspace     (*)导入指定workspace下的工作流

  delete <worflow_name>   删除指定工作流
    Options:
        -w, --workspace     (*)删除指定workspace下的工作流
        
  list       无option则获取Workspace中的所有工作流
    Options:
        -w, --workspace    (*)列出指定workspace下的工作流
        -p, --page         分页页数,默认为1  
        -s, --size         分页大小,默认为10
        --order-by         以时间或名称进行升序排序所有Workspace(--order-by name/createdAt)
        --search-word      workflow name/description中模糊匹配
        --ids              指定workflow id展示特定workflow完整信息,包括名称、创建时间、挂载目录
        
  update  <worflow_name>   更新指定工作流
      Options
         -w, --workspace      (*)指定工作流所在workspace
         -n, --name           更新指定工作流名称
         -d, --description    更新指定工作流描述    
         --url                   git地址/TRS url(source为dockstore,对应TRS url,source为Git,对应Git地址)
         --tag                   git tag/TRS version(source为dockstore,对应TRS version,source为Git,对应Git tag)
         --token                 git token
         -p, --main-workflow-path  (*) 主工作流路径
         -i, --input-file        本地zip文件,当source为file类型时必选

命令示例

创建工作流

通过Git创建工作流

## 通过Git方式创建工作流
bioctl workflow create cram2bam -w cli_test -d "this is a test workflow created by bioctl workflow create" --language WDL -s git --url "https://gitee.com/joy_lee/seq-format-conversion01.git" --tag "v0.48" -p "CramToBam.wdl"

通过文件形式创建工作流

##以文件形式创建工作流
bioctl workflow create test -w cli_test --language WDL --source file --main-workflow-path Downloads/seq-format-conversion01-master/CramToBam.wdl -i Downloads/seq-format-conversion01-master.zip

通过TRS形式创建工作流

##以TRS url创建工作流
bioctl workflow create test -w cli_test --language WDL -s dockstore --url https://dockstore.org/api/ga4gh/trs/v2/tools/%23workflow%2Fgithub.com%2Ftheiagen%2Fterra_utilities%2FConcatenate_Column_Content --tag main

导入工作流

bioctl workflow import -w workspace_name -f /home/usr/workflow_git.json

示例json如下

{
    "Name": "createbyimport",     ##工作流名称
    "description": "description",  ##工作流描述
    "Language": "WDL",             ##工作流类型,当前仅支持WDL
    "url": "https://gitee.com/joy_lee/seq-format-conversion01.git",  ##当使用git导入时需要设置git地址
    "Tag": "v0.48",  ##git tag
    "Token": "", ##git token,非必须
    "MainWorkflowPath": "CramToBam.wdl", ## 主路径地址
    "source": "git" 
}

查询工作流

查询指定workspace下的所有工作流

## 查询指定workspace下的所有Workflow信息
$ bioctl workflow list -w <workspace_name>
WorkflowID                WorkflowName                        CreateTime
fcmnj5dleig4968oear5g        test                              2024-01-23 11:29:58 +0800 CST
fcmnivj5eig4b5q2dfqog        Concatenate_Column_Content        2024-01-23 11:17:32 +0800 CST
fcmn3lv5eig4968oeapug        createbyimport                    2024-01-22 17:53:00 +0800 CST
fcmn3ktteig4968oeapu0        cram2bam                          2024-01-22 17:50:48 +0800 CST

查询指定工作流

## 通过workflow id查询指定workflow的详细信息
bioctl workflow list -w cli_test --ids fcmnj5dleig4968oear5g
Using config file: /Users/bytedance/.bioctl/bioctl.yaml
{
        "Items": [
                {
                        "ID": "fcmnj5dleig4968oear5g",
                        "Name": "test",
                        "CreateTime": 1705980598,
                        "UpdateTime": 1705980598,
                        "Language": "WDL",
                        "Source": "https://dockstore.org/workflows/github.com/theiagen/terra_utilities/Concatenate_Column_Content",
                        "Tag": "main",
                        "MainWorkflowPath": "workflows/wf_cat_column.wdl",
                        "Status": {
                                "Phase": "Succeeded"
                        },
                        "Inputs": [
                                {
                                        "Name": "concatenate_column_content.cat_files.concatenated_file_name",
                                        "Type": "String",
                                        "Optional": false
                                },
                                {
                                        "Name": "concatenate_column_content.cat_files.docker_image",
                                        "Type": "String",
                                        "Optional": true,
                                        "Default": "quay.io/theiagen/utility:1.1"
                                },
                                {
                                        "Name": "concatenate_column_content.files_to_cat",
                                        "Type": "Array[File]",
                                        "Optional": false
                                },
                                {
                                        "Name": "concatenate_column_content.version_capture.timezone",
                                        "Type": "String?",
                                        "Optional": true
                                }
                        ],
                        "Outputs": [
                                {
                                        "Name": "concatenate_column_content.concatenate_column_content_analysis_date",
                                        "Type": "String",
                                        "Optional": true
                                },
                                {
                                        "Name": "concatenate_column_content.concatenate_column_content_version",
                                        "Type": "String",
                                        "Optional": true
                                },
                                {
                                        "Name": "concatenate_column_content.concatenated_files",
                                        "Type": "File",
                                        "Optional": true
                                }
                        ],
                        "OwnerName": "chenyifan.90",
                        "Graph": "digraph concatenate_column_content {\n  #rankdir=LR;\n  compound=true;\n\n  # Links\n  \n\n  # Nodes\n  CALL_cat_files [label=\"call cat_files\"]\n  CALL_version_capture [label=\"call version_capture\"]\n}",
                        "SourceType": "dockstore"
                }
        ],
        "PageNumber": 1,
        "PageSize": 12,
        "TotalCount": 1
}

删除工作流

## 删除workspace名称cli_test下的名称为test的工作流
$  bioctl workflow delete test -w cli_test