Data Hub subcommands

Table 4 Data Hub subcommands

Subcommand

Description

Argument

delete (clean)

Delete DRS objects either by name or by tag.

--tags str [str ...]
Specify the label of the DRS object that you want to delete (optional). --names str [str ...]
Generate a list of DRS object names (optional).

download

Download the content of a DRS object to a file or directory path.

--workspace STR
Specify the workspace based on the signed in account (required).
--dst STR
Show the destination directory or file path.
--id STR
A DRS object ID (required if there is no self URI).
--uri URI
A DRS self URI (required if there is no DRS ID).
--overwrite
Overwrite the existing files (optional, default = false).
--output {json,table,tsv}
Specify the output format of the stdout file (optional, default = json).
--chunk-size {4,8,16,32}
Specify the size of chunk in the chunked downloading process. If the specified size is greater than 4MB, the md5 hashes are not checked. Changing the default value is not recommended (optional, default = 4MB).
--concurrency
Specify the transmission concurrency in file uploading. The upload bandwidth can be modified using the formula concurrency * chunk_size * multiprocessing (default = 64).
--multiprocessing
Specify the number of files that you want to upload at any given time. Changing the default value is not recommended (optional, default = 1).

get (retrieve)

Get a DRS object.

--workspace STR

register

Register a DRS object.

--workspace STR
Specify the workspace based on the signed in account (required).
--id STR
A DRS object ID (required).

register-blob

Register a DRS object as a blob.

--workspace STR
Specify the workspace based on the signed in account (required).
--type STR
To register a file as a blob , use file-blob. To register a folder as a blob , use folder-blob (required).
--output {json,table,tsv}
Specify the output format of the stdout file (optional, default = json).
--stdin
Specify whether or not you want to enable stdin mode (optional). Selecting stdin prevents you from enabling any of the other options and the JSON object must therefore contain all the required keys [name, file_type, mime_type, description, aliases, tags, created_time, updated_time, size, urls, access_tiers, regions, Authorizations, checksum, checksum_type, metadata].
--id STR
Specify a custom DRS object ID (optional).
--metadata STR
Specify a JSON string describing the metadata of the object you want to register (optional).
--checksum-type {sha256}
Specify the type of checksum (must not be in stdin mode). At the moment, only sha256 is supported.
--checksum STR
Specify the checksum of the object that you want to register. The checksum type must be sha256. If the DRS type is blob, this argument is required (must not be in stdin mode).
--Authorizations str [str ...]
Provide the authorization credentials for the storage location where you want to store the object (optional, must not be in stdin mode).
--regions str [str ...]
Specify the region for the storage location where you want to store the object. If the DRS type is blob, this argument is required (must not be in stdin mode). For example, you can use local, westus, eastjp, or other regions.
--access-tiers {Hot,Cool,Archive}
Specify the access tier that you want to use for the object that you want to register. If the DRS type is bundle, do not use this argument (must not be in stdin mode).
--urls URL [URL ...]
Specify the absolute path of object that you want to register. If the DRS type is blob, this argument is required (must not be in stdin mode).
--size INT
Specify the size of the object that you want to register. If the DRS type is blob, this argument is required (must not be in stdin mode).
--updated-time STR
Provide the timestamp of when an object was updated. The time format must be in RFC3339. If the DRS type is blob, this argument is required (must not be in stdin mode). For example, 2021-09-13 02:54:03.636044+00:00.
--created-time STR
Provide the timestamp of when an object was first created in the storage location. The time format must be in RFC3339. If the DRS type is blob, this argument is required (must not be in stdin mode). For example, 2021-09-13 02:54:03.636044+00:00.
--tags str [str ...]
Specify the tags that you want to use for the object that you want to register (optional).

register-bundle

Register a DRS object as a bundle.

--name STR
Specify the name of the object that you want to register (must not be in stdin mode, otherwise required).
--workspace STR
Specify the workspace based on the signed in account (required).
--drs-id STR
Specify the DRS object ID that will be registered in the bundle (required).
--output {json,table,tsv}
Specify the output format of the stdout file (optional, default = json).
--id STR
Specify a custom DRS bundle ID (optional).
--metadata STR
Specify a JSON string describing the metadata of the bundle you want to register (optional). --tags str [str ...]
Specify the tags that you want to use for the bundle that you want to register (optional). --aliases str [str ...]
Specify the aliases of the bundle that you want to register (optional).
--description STR
Specify the description of the bundle that you want to register (optional).

search

Locate DRS objects either by name or by tag. Do not combine names and labels in a single query.

--tags str [str ...]
Locate a DRS object using a list of labels (optional).
--names str [str ...]
Locate a DRS object using a list of names (optional).

update (patch)

Update a DRS object

--workspace STR
Specify the workspace based on the signed in account (required).
--id STR
Specify the DRS object ID (required).
--stdin
Provide a DRS object payload using the stdin mode (optional). Selecting stdin prevents you from enabling any of the other options and the JSON object must therefore contain all the required keys [name, tags, metadata, checksum, checksum_type, updated_time].
--updated-time STR
Specify the timestamp when the DRS object was updated (optional). The time format must be in RFC3339. For example, 2021-09-13 02:54:03.636044+00:00.
--checksum-type {sha256}
Specify the DRS object checksum type (required when checksum is given).
--checksum STR
Specify the DRS object checksum (required when checksum_type is given).
--metadata METADATA
Specify the DRS object metadata (optional).
--tags str [str ...]
Specify the DRS object tags (optional).
--name STR
Specify the DRS object name (optional).

upload (copy)

Upload data from the local file system to a SeqsLab Data Hub cloud service.

--workspace STR
Specify the workspace based on the signed in account (required).
--src SRC
Specify the source directory, file path, or DRS URL (required).
--dst DST
Specify the destination directory, file path, or DRS URL (optional, default =’ /’).
--recursive (-r)
Copy an entire directory tree (optional, default = False).
--output {json,table,tsv}
Specify the stdout format (default = json).
--concurrency INT
Specify the transmission concurrency in file uploading. The upload bandwidth can be modified using the formula concurrency * chunk_size * multiprocessing (default = 64).
--multiprocessing INT
Specify the number of files that you want to upload at any given time. Changing the default value is not recommended (default = 1).
--chunk-size {8,16}
Specify the size of each file that you want to upload in megabytes (MB). Changing the default value is not recommended (default = 8MB).
--white-list STR
Specify a list of directories that you want to upload. A list can contain multiple folder paths (optional).

upload-runsheet (runsheet)

Upload samples based on the Run Sheet and FASTQ path information.

--workspace STR
Specify the workspace based on the signed in account (required).
--input-dir STR
Specify the FASTQ file path (required).
--run-sheet STR
Specify the Run Sheet file path (required).
--upload-dst STR
Specify the upload destination path (optional, default = input_dir).
--concurrency INT
Specify the transmission concurrency in file uploading. The upload bandwidth can be modified using the formula concurrency * chunk_size * multiprocessing (default = 64).
--multiprocessing INT
Specify the number of files that you want to upload at any given time. Changing the default value is not recommended (default = 1).