
Import phenotype predictions from AMRrules output
Source:R/import_pheno.R
import_amrrules_predictions.RdThis imports antimicrobial phenotype predictions (S/I/R and WT/NWT) generated from genotype data using AMRrules.
Usage
import_amrrules_predictions(
input,
sample_col = "sample",
species_col = "organism",
ab_col = "drug",
sir_col = "clinical category",
ecoff_col = "phenotype",
method = "genotyping",
platform = "AMRFinderPlus + AMRrules"
)Arguments
- input
A string representing a dataframe, or a path to an input file, containing the AMRrules output "genome_summary" file, which should be a long-form TSV file with one row per sample and drug.
- sample_col
(optional, default
"sample") String indicating the name of the input data column that provides the sample name.- species_col
(optional, default
"organism") String indicating the name of the input data column that provides a species name. If provided, this column will be converted to micro-organism classmoviaAMR::as.mo(). If therename_colsparameter is set toTRUE, this column will also be renamed asspp_pheno. If interpretation is switched on, this column will be used to identify the appropriate breakpoints for interpretation of each row in the data table.- ab_col
(optional, default
"drug") String indicating the name of the input data column that provides a drug name.- sir_col
(optional, default
"clinical category") String indicating the name of the input data column that indicates the S/I/R prediction.- ecoff_col
(optional, default
"phenotype") String indicating the name of the input data column that indicates the WT/NWT prediction.- method
(optional, default
"genotyping") String indicating the value to record in a newmethodfield added to the output table.- platform
(optional, default
"AMRFinderPlus + AMRrules") String indicating the value to record in a newplatformfield added to the output table.