R/data_curation.R
retrieveMetadata.RdQueries BV-BRC for AMR or microtrait metadata for genomes corresponding to user inputs.
Results are written to a per-selection DuckDB at:
<base_dir>/data/<bug_dir>/
amr_phenotype
genome_data
metadata (inner join on genome ID field names as returned by BV-BRC)
retrieveMetadata(
user_bacs,
filter_type = "AMR",
base_dir = ".",
abx = "All",
overwrite = FALSE,
image = "danylmb/bvbrc:5.3",
verbose = TRUE
)Character vector. Mixed taxon IDs and/or species strings (used for naming).
Character. "AMR" or "microTraits". Default "AMR".
Character. Project root. Default "results/" in legacy scripts; now default ".".
Character or vector. Antibiotic filter. "All" for all antibiotics, else names.
Logical. If FALSE and DuckDB exists already, abort. Default FALSE.
Character. Docker image. Default "danylmb/bvbrc:5.3".
Logical. If TRUE, prints concise messages.
A list with:
duckdbConnection: live DBI connection to the created DuckDB
table_name: "metadata"