divbase-cli files¶
Download/upload/list files to/from the project's store on DivBase.
Usage:
$ divbase-cli files [OPTIONS] COMMAND [ARGS]...
Options:
--install-completion: Install completion for the current shell.--show-completion: Show completion for the current shell, to copy it or customize the installation.--help: Show this message and exit.
Commands:
ls: list all currently available files in the...info: Get detailed information about a specific...download: Download files from the project's store on...download-all: Download all files in the project's store...stream: Stream a file's content to standard output.upload: Upload files to your project's store on...rm: Soft delete files from the project's store...restore: Restore soft deleted files from the...
divbase-cli files ls¶
list all currently available files in the project's DivBase store.
You can optionally filter the listed files by providing a prefix. By default, DivBase query results files are hidden from the listing. Use the --include-results-files option to include them. To see information about the versions of each file, use the 'divbase-cli files info [FILE_NAME]' command instead
Usage:
$ divbase-cli files ls [OPTIONS]
Options:
-t, --tsv: If set, will print the output in .TSV format for easier programmatic parsing.-pre, --prefix TEXT: Optional prefix to filter the listed files by name (only list files starting with this prefix).-r, --include-results-files: If set, will also show DivBase query results files which are hidden by default.-s, --show-deleted-files: Show the files in the project that are currently soft deleted. These files can be recovered within a certain time frame after deletion-p, --project TEXT: Name of the DivBase project, if not provided uses the default in your DivBase config file--help: Show this message and exit.
divbase-cli files info¶
Get detailed information about a specific file in the project's DivBase store.
This includes all versions of the file and whether the file is currently marked as soft deleted.
Usage:
$ divbase-cli files info [OPTIONS] FILE_NAME
Arguments:
FILE_NAME: Name of the file to get information about. [required]
Options:
-t, --tsv: If set, will print the output in .TSV format for easier programmatic parsing.-p, --project TEXT: Name of the DivBase project, if not provided uses the default in your DivBase config file--help: Show this message and exit.
divbase-cli files download¶
Download files from the project's store on DivBase.
This can be done by either: 1. providing a list of files paths directly in the command line 2. providing a text file with a list of files to download (new file on each line).
To download the latest version of a file, just provide its name. "file1" "file2" etc. To download a specific/older version of a file, use the format: "file_name:version_id" You can get a file's version id using the 'divbase-cli file info [FILE_NAME]' command. You can mix and match latest and specific versions in the same command. E.g. to download the latest version of file1 and version "3xcdsdsdiw829x" of file2: 'divbase-cli files download file1 file2:3xcdsdsdiw829x'
Usage:
$ divbase-cli files download [OPTIONS] [FILES]...
Arguments:
[FILES]...: Space separated list of files/objects to download from the project's store on DivBase.
Options:
--file-list PATH: Text file with list of files to upload.-d, --download-dir TEXT: Directory to download the files to. If not provided, defaults to what you specified in your user config. If also not specified in your user config, downloads to the current directory. You can also specify "." to download to the current directory.-n, --dry-run: If set, will not actually download the files, just print what would be downloaded.-nc, --disable-verify-checksums: Turn off checksum verification which is on by default. Checksum verification means all downloaded files are verified against their MD5 checksums.It is recommended to leave checksum verification enabled unless you have a specific reason to disable it.-pv, --project-version TEXT: User defined version of the project's at which to download the files. If not provided, downloads the latest version of all selected files.-p, --project TEXT: Name of the DivBase project, if not provided uses the default in your DivBase config file--help: Show this message and exit.
divbase-cli files download-all¶
Download all files in the project's store on DivBase. Before the download proceeds you'll be prompted if you want to continue. DivBase Query results files will not be included in the download.
You can resume ('--resume' / '-r') a 'download-all' command, just make sure you're downloading into the same directory.
Usage:
$ divbase-cli files download-all [OPTIONS]
Options:
-d, --download-dir TEXT: Directory to download the files to. If not provided, defaults to what you specified in your user config. If also not specified in your user config, downloads to the current directory. You can also specify "." to download to the current directory.-r, --resume: If set, will attempt to resume an interrupted download. Will check which files have already been fully downloaded (by checking if a file with the same name and checksum already exists in the download directory) and skip downloading those files again.-n, --dry-run: If set, will not actually download the files, just print what would be downloaded.-nc, --disable-verify-checksums: Turn off checksum verification which is on by default. Checksum verification means all downloaded files are verified against their MD5 checksums.It is recommended to leave checksum verification enabled unless you have a specific reason to disable it.-pv, --project-version TEXT: User defined version of the project's at which to download the files. If not provided, downloads the latest version of all selected files.-p, --project TEXT: Name of the DivBase project, if not provided uses the default in your DivBase config file--help: Show this message and exit.
divbase-cli files stream¶
Stream a file's content to standard output.
This allows your to pipe the output to other tools like 'less', 'head', 'zcat' and 'bcftools'.
Examples: - View a file: divbase-cli files stream my_file.tsv | less - View a gzipped file: divbase-cli files stream my_file.vcf.gz | zcat | less - Run a bcftools command: divbase-cli files stream my_file.vcf.gz | bcftools view -h - # The "-" tells bcftools to read from standard input
Usage:
$ divbase-cli files stream [OPTIONS] FILE_NAME
Arguments:
FILE_NAME: Name of the file you want to stream. [required]
Options:
--version-id TEXT: Specify this if you want to look at an older/specific version of the file. If not provided, the latest version of the file is used. To get a file's version ids, use the 'divbase-cli file info [FILE_NAME]' command.-p, --project TEXT: Name of the DivBase project, if not provided uses the default in your DivBase config file--help: Show this message and exit.
divbase-cli files upload¶
Upload files to your project's store on DivBase:
To provide files to upload you can either: 1. provide a list of files paths directly in the command line 2. provide a directory to upload 3. provide a text file with or a file list.
Usage:
$ divbase-cli files upload [OPTIONS] [FILES]...
Arguments:
[FILES]...: Space separated list of files to upload.
Options:
--upload-dir PATH: Directory to upload all files from.--file-list PATH: Text file with list of files to upload.--disable-safe-mode: Turn off safe mode which is on by default. Safe mode adds 2 extra bits of security by first calculating the MD5 checksum of each file that you're about to upload:(1) Checks if any of the files you're about to upload already exist (by comparing name and checksum) and if so stops the upload process.(2) Sends the file's checksum when the file is uploaded so the server can verify the upload was successful (by calculating and comparing the checksums).It is recommended to leave safe mode enabled unless you have a specific reason to disable it.-p, --project TEXT: Name of the DivBase project, if not provided uses the default in your DivBase config file--help: Show this message and exit.
divbase-cli files rm¶
Soft delete files from the project's store on DivBase
To provide files to delete you can either: 1. provide a list of file names directly in the command line 2. provide a text file with a list of files to delete.
Note that deleting a non existent file will be treated as a successful deletion.
Usage:
$ divbase-cli files rm [OPTIONS] [FILES]...
Arguments:
[FILES]...: Space seperated list of files/objects in the project's store on DivBase to delete.
Options:
--file-list PATH: Text file with list of files to delete.--dry-run: If set, will not actually delete the files, just print what would be deleted.-p, --project TEXT: Name of the DivBase project, if not provided uses the default in your DivBase config file--help: Show this message and exit.
divbase-cli files restore¶
Restore soft deleted files from the project's store on DivBase
To provide files to restore you can either: 1. provide a list of files directly in the command line. 2. provide a text file with a list of files to restore (new file on each line).
NOTE: Attempts to restore a file that is not soft deleted will be considered successful and the file will remain live. This means you can repeatedly run this command on the same file and get the same response.
Usage:
$ divbase-cli files restore [OPTIONS] [FILES]...
Arguments:
[FILES]...: Space seperated list of files/objects in the project's store on DivBase to restore.
Options:
--file-list PATH: Text file with list of files to restore.-p, --project TEXT: Name of the DivBase project, if not provided uses the default in your DivBase config file--help: Show this message and exit.