Register a tool#

Following the GA4GH TRS API standard, SeqsLab provides a three-step process for TRS registration using the SeqsLab CLI commands tools tool, tools version, and tools file.


1. Create a tool entry#

The first step is to create a new tool entry by specifying the tool name, description, and TRS ID. You can customize the TRS ID, but it should be unique and it should comply with the regular expression r”^[0-9a-zA-Z-_]+$”.

Below is an example tools tool command:

seqslab tools tool \
    --name wgs_snp_indel_gatk4.2.0.0 \
    --description "gatk best practice snp/indel pipeline" \
    --id trs_wgs_snp_indel

2. Create a tool version#

The next step is to create a version for the given tool entry. The most critical information that tools version needs is the image list of all the Docker runtime images used by this tool. To find the Docker runtime images information, use the tools images command to generate a list of all existing Docker runtime images in the workspace.

seqslab tools images --scr-id -1 --repositories runtime/base 

The tools images command prints each Docker image in a one-line JSON string format as shown below:

SCR ID: -1
Repository list: ['runtime/base']
image list:
{"image_type": "docker", "image_name": "runtime/base:1.5_20.04", "registry_host": "", "size": 0, "checksum": "sha256:e34eeaa136d0bad25ae5a96fada07c4e65ce086687e0f3d3f6a567ef9aed01ea"}
{"image_type": "docker", "image_name": "runtime/base:1.5_22.04", "registry_host": "", "size": 0, "checksum": "sha256:ea15b143351ea3d8b6e2466c368cd961ef113dcd4236de80897ed6672a29d89e"}

By concatenating all the one-line JSON strings with ",", and wrapping the concatenated images information string with [], you can create a JSON string for the parameter –images, which you can then use when you run the tools version command.

seqslab tools version \
    --workspace seqslabwus2 \
    --tool-id trs_wgs_snp_indel \
    --id 1.0 \
    --descriptor-type WDL  \
    --images '[
        {"image_type": "docker", "image_name": "runtime/base:1.5_20.04", "registry_host": "", "size": 0, "checksum": "sha256:e34eeaa136d0bad25ae5a96fada07c4e65ce086687e0f3d3f6a567ef9aed01ea"},
        {"image_type": "docker", "image_name": "runtime/base:1.5_22.04", "registry_host": "", "size": 0, "checksum": "sha256:ea15b143351ea3d8b6e2466c368cd961ef113dcd4236de80897ed6672a29d89e"}

3. Upload and register the tool#

The final step is to upload and register the tool files to the corresponding tool version entry. You must specify the working directory (containing all the tool files) and which execs.json file should be used.

seqslab tools file \
    --descriptor-type WDL \
    --version-id 1.0 \
    --tool-id trs_wgs_snp_indel \
    --working-dir /home/ubuntu/src/ \
    --file-info execs/germline-gatk4-snpindel.json