
Import and process antimicrobial phenotype data exported from Vitek instruments
Source:R/import_pheno.R
import_vitek_pheno.RdThis function imports antimicrobial susceptibility testing (AST) data from Vitek instrument output files (wide CSV format) and converts it to the standardised long-format used by AMRgen.
Usage
import_vitek_pheno(
input,
sample_col = "Lab ID",
source = NULL,
species = NULL,
ab = NULL,
instrument_guideline = NULL,
use_expertized = TRUE,
interpret_eucast = FALSE,
interpret_clsi = FALSE,
interpret_ecoff = FALSE,
include_dates = TRUE
)Arguments
- input
A dataframe or path to a CSV file containing Vitek AST output data
- sample_col
String indicating the name of the column containing sample identifiers. Default:
"Lab ID"- source
Optional string value to record in the
sourcecolumn for all data points (e.g., dataset name or study identifier)- species
Optional string indicating a single species to use for phenotype interpretation (otherwise this is inferred per-sample from the input)
- ab
Optional string indicating a single antibiotic to use for phenotype interpretation (otherwise this is inferred per-sample from the input)
- instrument_guideline
Optional string indicating the guideline used by the instrument for SIR interpretation (e.g., "EUCAST 2025", "CLSI 2025"), used to record the
guidelinein the output file. Default:NULL- use_expertized
Use expertized SIR (
TRUE, default) or instrument SIR (FALSE)- interpret_eucast
A logical value (default is
FALSE). IfTRUE, the function will re-interpret the susceptibility phenotype (SIR) for each observation based on the MIC values, against EUCAST human breakpoints. These will be reported in a new columnpheno_eucast, of classsir.- interpret_clsi
A logical value (default is
FALSE). IfTRUE, the function will re-interpret the susceptibility phenotype (SIR) for each observation based on the MIC values, against CLSI human breakpoints. These will be reported in a new columnpheno_clsi, of classsir.- interpret_ecoff
A logical value (default is
FALSE). IfTRUE, the function will re-interpret the wildtype vs nonwildtype status for each observation based on the MIC values, against epidemiological cut-off (ECOFF) values. These will be reported in a new columnecoff, of classsirand coded asNWT(nonwildtype) orWT(wildtype).- include_dates
Logical indicating whether to include
collection_dateandtesting_datein output. Default:TRUE