Registering 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.

TRS-registration

1. Creating 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. Creating 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 --workspace seqslabwus2 

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

workspace seqslabwus2 image list:
----------------------------------------------
{"image_type": "docker", "image_name": "germline-gatk4-snpindel-1.0_ubuntu-18.04:2022-03-01-01-03", "registry_host": "seqslabwus2.azurecr.io", "size": 5796892486, "checksum": "sha256:163733e821a702395b3235ddfa37f7a6414e1947302fdfbe0fc6664b4465bc7d"}
{"image_type": "docker", "image_name": "germline-gatk4-snpindel-1.0_ubuntu-18.04:2021-12-29-09-08", "registry_host": "seqslabwus2.azurecr.io", "size": 5796361686, "checksum": "sha256:24978d823b433b168abe0610c4e1eda616f1d9538f54f4c5cca44cf1665c3c03"}
...

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": "nckucbdh/seqslab_runtime-1.4_ubuntu-18.04_cbdh:2022-02-14-05-18", "registry_host": "seqslabapi32b21acr.azurecr.io", "size": 5649052573, "checksum": "sha256:2b20cf446c146eddbf3dfc00bc416ea879a9b5b10280b918b3574b2b249f9ef1"}]'

3. Uploading and registering 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/exec-pgs-1.0.0.json