Convert AMRgen long-format AST data to an EBI antibiogram submission file (see EBI COMPARE-AMR).
Usage
export_ebi_antibiogram(
data,
file,
overwrite = FALSE,
pheno_col = "pheno_provided",
sep = "\t"
)Arguments
- data
A data frame in AMRgen long format (e.g. output of
import_ast()orformat_ast()). Expected columns:id,drug_agent,spp_pheno, and at least one phenotype column (seepheno_col). Optional columns:mic,disk,method,guideline,platform.- file
File path for the output file.
- overwrite
Logical; overwrite an existing file? Default
FALSE.- pheno_col
Character string naming the column that contains SIR interpretations (class
sir). Default"pheno_provided".- sep
Field separator for the output file. Default
"\t"(tab-delimited). Use","for CSV.
Details
Antibiotic names are in Title Case with "/" separating
combination agents (EBI convention, e.g.
"Amoxicillin/clavulanic acid").
Species names are derived from the spp_pheno column via
AMR::mo_name().
