Preferred path: use per-selection DB "metadata" table (from retrieveMetadata()) and apply lab-evidence & genome_quality filters.

.filterGenomes(
  user_bacs,
  base_dir = ".",
  verbose = TRUE,
  fallback_to_bvbrc_cache = TRUE
)

Value

A list with a DuckDB connection and table_name = "filtered"

Details

Fallback path: if "metadata" is missing and fallback_to_bvbrc_cache = TRUE, read BV-BRC cache at <base_dir>/data/bvbrc/bvbrcData.duckdb ("bvbrc_bac_data"), derive genome IDs from user_bacs (taxon IDs or species substring), and write a minimal "filtered" table (without AMR evidence filtering).