R/data_curation.R
dot-getGenomeIDs.RdExecutes BV-BRC CLI queries in Docker and writes the results to a DuckDB at:
<base_dir>/data/<bug_dir>/user_bacs, and .generateDBname().
BV-BRC column names are preserved.
.getGenomeIDs(
base_dir = ".",
query_type = c("genome_name", "species", "taxon_id"),
query_value = NULL,
user_bacs,
overwrite = FALSE,
image = "danylmb/bvbrc:5.3",
verbose = TRUE
)Character. Project root directory.
Character. One of "genome_name", "species", or "taxon_id".
Character or NULL. If NULL, it will be inferred from user_bacs
based on query_type (first element for species/genome_name, first numeric for taxon_id).
Character vector. Used to construct database location/name and, if needed,
to infer query_value when not supplied.
Logical. If FALSE and the DuckDB file already exists, abort. Default: FALSE.
Character. Docker image containing BV-BRC CLI. Default: "danylmb/bvbrc:5.3".
Logical. If TRUE, prints messages. Default: TRUE.
A list with:
count_result: Integer (count query result)
duckdbConnection: DBI connection to the DuckDB file
table_name: "bac_data"