Convert_MICs: Convert_MICs - Processing raw AST data

Description Usage Arguments Value

View source: R/Convert_MICs.R

Description

Antimicrobial susceptibility testing (AST) data from surveillance programs is typically determined via serial microdilution and reported as interval censored minimum inhibitory concentrations (MIC). This function converts MIC values reported as a combination of a comparison sign characters (e.g., > or <=) and numerical characters (e.g., 0.5 or 8) to numerical values prior to analysis. For example, an entry of '= 2' indicates the bacteria was inhibited by 2 ug/mL of drug, but was not inhibited by 1 ug/mL. In most cases, the comparison character can be ignored, but entries with '>' indicate the value exceeds the highest tested drug concentration. To represent the increased resistance of these isolates, the reported concentration must be adjusted upwards by one concentration, even though that concentration was not tested. For example the entry '> 4' (growth was not inhibited at 4 ug/mL, the highest tested concentration) should be adjusted to 8 to represent these results indicated greater resistance than '= 4' (growth was inhibited at 4 ug/mL, but not at 2 ug/mL). This function removes the comparison signs and adjusts the values as neccessary, returning a more conveniently labeled data.frame containing numeric values and selected metadata. Two formats are currently supported: 1) The standard format where the sign is held in the same field as the concentration, and 2) the format used by the NARMS program where comparison sign is stored in a seperate field.

Usage

1
2
Convert_MICs(x, drugs, mic_text = NULL, sign_text = "SIGN",
  append_orig = F, sep = "_", mic_format = NULL)

Arguments

x

A matrix-like object containing MIC data.

drugs

A character vector of column names corresponding to the drug names/abbreviations to be converted.

mic_text

The character string used to identify columns containing MICs.

sign_text

The character string used to identify columns containing the comparison signs. Ignored where mic_format = 'Standard'.

append_orig

If true, formatted columns are appended to original data. If false, only

sep

The character used to seperate the drug names from the mic_text and sign_text in column names.

mic_format

A character string indicating the format of the data. Currently accepts

Value

a data.frame containing numeric MIC data, and metadata if selected.


Rnets documentation built on July 23, 2019, 9:04 a.m.