Usage¶
The DRS client is executed on the command-line via the following structure:
drs get [OPTIONS] URL OBJECT_ID
where [OPTIONS]
represents a set of optional command-line parameters,
and URL
and OBJECT_ID
represent two position-specific arguments.
Arguments and Options¶
Required command-line arguments:
Parameter | Description |
---|---|
URL | Base URL to DRS service (up to but excluding the DRS BasePath ‘/ga4gh/drs/v1’) |
OBJECT_ID | DRS object identifier |
Optional command-line options:
Parameter | Short Name | Description |
---|---|---|
-t | –authtoken | Value of OAuth 2.0 Authorization: Bearer token |
-d | –download | Flag. If set, download object bytes |
-x | –expand | Flag. If set, program will recursively traverse inner bundles within the root bundle |
-l | –logfile | File to which logs should be written |
-M | –max-threads | Number of concurrent download threads |
-o | –output-dir | Directory to write downloaded files |
-m | –output-metdata | File to write object metadata (printed to stdout by default) |
-S | –silent | Flag. If set, don’t output any messages to console or log file |
-s | –suppress-ssl-verify | Flag. If set, suppress ssl certification verificiation (NOT RECOMMENDED) |
-v | –validate-checksum | Flag. If set, perform checksum validation on downloaded objects |
-V | –verbosity | DEBUG|INFO|WARNING|ERROR Control verbosity of logging |
Example Usage¶
- Basic Usage, get DRS object and print metadata to screen
drs get https://exampledrs.com/ a02568e6-11f8-4493-9880-f51823df09b8
- Write metadata to an output file
drs get -m metadata.json https://exampledrs.com/ a02568e6-11f8-4493-9880-f51823df09b8
- Download object bytes, writing output files to the “output” directory
drs get -d -o output https://exampledrs.com/ a02568e6-11f8-4493-9880-f51823df09b8
- Use an auth token to access DRS object data/metadata
drs get -d -o output -t P8vNFYh6jC https://exampledrs.com/ a02568e6-11f8-4493-9880-f51823df09b8
- Write debug, info, warning, and error logs to a log file
drs get -l logfile.txt -V DEBUG https://exampledrs.com/ a02568e6-11f8-4493-9880-f51823df09b8