mo_matching_score {AMR}R Documentation

Calculate the Matching Score for Microorganisms

Description

This algorithm is used by as.mo() and all the mo_* functions to determine the most probable match of taxonomic records based on user input.

Usage

mo_matching_score(x, n)

Arguments

x

Any user input value(s)

n

A full taxonomic name, that exists in microorganisms$fullname

Matching Score for Microorganisms

With ambiguous user input in as.mo() and all the mo_* functions, the returned results are chosen based on their matching score using mo_matching_score(). This matching score m, is calculated as:

mo matching score

where:

The grouping into human pathogenic prevalence p is based on recent work from Bartlett et al. (2022, doi:10.1099/mic.0.001269) who extensively studied medical-scientific literature to categorise all bacterial species into these groups:

Furthermore,

When calculating the matching score, all characters in x and n are ignored that are other than A-Z, a-z, 0-9, spaces and parentheses.

All matches are sorted descending on their matching score and for all user input values, the top match will be returned. This will lead to the effect that e.g., "E. coli" will return the microbial ID of Escherichia coli (m = 0.688, a highly prevalent microorganism found in humans) and not Entamoeba coli (m = 0.381, a less prevalent microorganism in humans), although the latter would alphabetically come first.

Reference Data Publicly Available

All data sets in this AMR package (about microorganisms, antibiotics, SIR interpretation, EUCAST rules, etc.) are publicly and freely available for download in the following formats: R, MS Excel, Apache Feather, Apache Parquet, SPSS, SAS, and Stata. We also provide tab-separated plain text files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please visit our website for the download links. The actual files are of course available on our GitHub repository.

Note

This algorithm was originally described in: Berends MS et al. (2022). AMR: An R Package for Working with Antimicrobial Resistance Data. Journal of Statistical Software, 104(3), 1-31; doi:10.18637/jss.v104.i03.

Later, the work of Bartlett A et al. about bacterial pathogens infecting humans (2022, doi:10.1099/mic.0.001269) was incorporated.

Author(s)

Dr. Matthijs Berends, 2018

Examples

mo_reset_session()

as.mo("E. coli")
mo_uncertainties()

mo_matching_score(
  x = "E. coli",
  n = c("Escherichia coli", "Entamoeba coli")
)

[Package AMR version 2.1.1 Index]