This function generates and retrieves AMR data for a batch of genome IDs. It uses BV-BRC tools within a Docker container to fetch and process the data based on the input parameters.
.extractAMRtable(
base_dir,
batch_genome_IDs,
abx_filter,
drug_fields,
image = "danylmb/bvbrc:5.3",
verbose = TRUE
)A character vector containing genome IDs to query.
A string specifying the antibiotic filter criteria. This can be in the form
"--required antibiotic" or "--in antibiotic,drug1,drug2".
A string specifying the drug fields (attributes) to include in the output.
This corresponds to the attributes retrieved by the p3-get-genome-drugs tool.
Character. Docker image. Default "danylmb/bvbrc:5.3".
Logical. If TRUE, prints concise messages.
A string representing the file path to a directory where temporary files and data will be stored.
A character vector with the output data from p3-get-genome-drugs, typically in tabular format.
The function performs the following steps:
Ensures the required Docker image (danylmb/bvbrc:5.3) is pulled.
Creates a genome ID table using p3-echo and writes it to a temporary file.
Processes the generated file with the p3-get-genome-drugs tool to query the AMR data.
The BV-BRC Docker image (danylmb/bvbrc:5.3) must be installed and available on the system.