CLI reference#
The sddb-cli console script wraps the same catalog queries as the Python API.
sddb-cli#
Query and download spatialdata-db datasets.
Usage:
$ sddb-cli [OPTIONS] COMMAND [ARGS]...
Options:
--help: Show this message and exit.
Commands:
query: List datasets matching the given facets.facets: List facet columns, or the distinct values...download: Download datasets (by uid, or every member...viewer-url: Print the browser viewer link for a...genes: List datasets expressing all GENES (one...cite: Write BibTeX for the studies of the...
sddb-cli query#
List datasets matching the given facets.
A facet value that is not in the catalog resolves through aliases (case, spaces and hyphens are ignored; --technology also takes the assay label, e.g. "10x Xenium"), or fails with a "did you mean" hint.
Usage:
$ sddb-cli query [OPTIONS]
Options:
--organism <str>--assay <str>--tissue <str>--disease <str>--technology <str>--tier <str>--source <str>: Data source: the study_id prefix (geo, hest, 10x, ...).--preservation-method <str>: Preservation method, for example FFPE or fresh frozen.--hne-image / --no-hne-image: Keep datasets with (or without) an H&E image.--redistributable / --no-redistributable: Keep datasets whose known license allows redistribution (or the rest, which includes unknown licenses).--validation <str>: 'pass' (default) or 'all'. [default: pass]--gene, --expressing <str>: Gene symbol or Ensembl id; repeat to require all (downloads the gene index once).--min-fraction <float>: With --gene: min fraction_obs_detected.--search <str>: Free-text search over facet values.--min-obs <int>: Keep datasets with n_obs >= this.--min-features <int>: Keep datasets with n_features >= this.--catalog <str>: Catalog URL (default: $SDDB_CATALOG_URL).--json: Emit JSON records.--help: Show this message and exit.
sddb-cli facets#
List facet columns, or the distinct values of FIELD.
Usage:
$ sddb-cli facets [OPTIONS] [field]
Arguments:
field: Facet column; omit to list columns.
Options:
--catalog <str>: Catalog URL (default: $SDDB_CATALOG_URL).--help: Show this message and exit.
sddb-cli download#
Download datasets (by uid, or every member of --collection) to DEST and print the manifest path.
Usage:
$ sddb-cli download [OPTIONS] [uids]...
Arguments:
uids...: Dataset uid(s).
Options:
--collection <str>: A collection slug instead of uids.--dest <path>: Destination directory. [default: .]--catalog <str>: Catalog URL (default: $SDDB_CATALOG_URL).--workers <int>: Parallel downloads. [default: 4]--help: Show this message and exit.
sddb-cli viewer-url#
Print the browser viewer link for a dataset; fails when the link loads another dataset's store.
Usage:
$ sddb-cli viewer-url [OPTIONS] {uid}
Arguments:
uid: [required]
Options:
--catalog <str>: Catalog URL (default: $SDDB_CATALOG_URL).--help: Show this message and exit.
sddb-cli genes#
List datasets expressing all GENES (one gene: ranked by fraction of observations detected).
The first call downloads the cross-dataset gene index (~900 MB, one-time; cached and read in batches).
Usage:
$ sddb-cli genes [OPTIONS] {genes}...
Arguments:
genes...: Gene symbol(s) or Ensembl id(s), case-insensitive. [required]
Options:
--limit <int>: Max datasets to list. [default: 20]--validation <str>: 'all' (default, includes bronze) or 'pass'. [default: all]--catalog <str>: Catalog URL (default: $SDDB_CATALOG_URL).--help: Show this message and exit.
sddb-cli cite#
Write BibTeX for the studies of the datasets matching the given facets/search.
Usage:
$ sddb-cli cite [OPTIONS]
Options:
-o, --output <path>: BibTeX file to write. [required]--organism <str>--assay <str>--tissue <str>--disease <str>--technology <str>--tier <str>--source <str>: Data source: the study_id prefix (geo, hest, 10x, ...).--hne-image / --no-hne-image: Keep datasets with (or without) an H&E image.--redistributable / --no-redistributable: Keep datasets whose known license allows redistribution (or the rest, which includes unknown licenses).--search <str>: Free-text search over facet values.--validation <str>: 'pass' (default) or 'all'. [default: pass]--bib-url <str>: citations.bib URL/path (default: next to the catalog).--catalog <str>: Catalog URL (default: $SDDB_CATALOG_URL).--help: Show this message and exit.