AMR/index.md

174 lines
14 KiB
Markdown
Raw Normal View History

2019-01-26 23:22:56 +01:00
# `AMR` (for R) <img src="./logo.png" align="right" height="120px" />
2018-12-29 22:24:19 +01:00
*(<help title="Too Long, Didn't Read">TLDR</help> - to find out how to conduct AMR analysis, please [continue reading here to get started](./articles/AMR.html).*
----
2019-02-14 15:18:17 +01:00
`AMR` is a free and open-source [R package](https://www.r-project.org) to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial properties by using evidence-based methods. It supports any data format, including WHONET/EARS-Net data.
2018-12-29 22:24:19 +01:00
2019-02-20 10:38:24 +01:00
After installing this package, R knows almost all ~60,000 microorganisms and ~500 antibiotics by name and code, and knows all about valid RSI and MIC values.
2019-02-04 12:24:07 +01:00
2019-02-14 15:18:17 +01:00
**Used to SPSS?** Read our [tutorial on how to import data from SPSS, SAS or Stata](./articles/SPSS.html) and learn in which ways R outclasses any of these statistical packages.
We created this package for both academic research and routine analysis at the Faculty of Medical Sciences of the University of Groningen, the Netherlands, and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG).
This R package is actively maintained and is free software; you can freely use and distribute it for both personal and commercial (but **not** patent) purposes under the terms of the GNU General Public License version 2.0 (GPL-2), as published by the Free Software Foundation. Read the full license [here](./LICENSE-text.html).
2019-01-26 23:22:56 +01:00
This package can be used for:
2019-02-20 13:57:23 +01:00
* Reference for microorganisms, since it contains almost all 60,000 microbial (sub)species from the [Catalogue of Life](http://www.catalogueoflife.org)
2019-01-26 23:22:56 +01:00
* Calculating antimicrobial resistance
2019-02-11 10:27:10 +01:00
* Calculating empirical susceptibility of both mono therapy and combination therapy
2019-02-04 12:24:07 +01:00
* Predicting future antimicrobial resistance using regression models
2019-01-26 23:22:56 +01:00
* Getting properties for any microorganism (like Gram stain, species, genus or family)
* Getting properties for any antibiotic (like name, ATC code, defined daily dose or trade name)
* Plotting antimicrobial resistance
* Determining first isolates to be used for AMR analysis
2019-02-21 18:55:52 +01:00
* Applying EUCAST expert rules (not the translation from MIC to RSI values)
2019-01-29 20:20:09 +01:00
* Determining multi-drug resistant organisms (MDRO)
2019-01-26 23:22:56 +01:00
* Descriptive statistics: frequency tables, kurtosis and skewness
2018-12-29 22:24:19 +01:00
This package is ready-to-use for a professional environment by specialists in the following fields:
2019-01-26 23:22:56 +01:00
Medical Microbiology
2018-12-30 08:40:40 +01:00
2018-12-29 22:24:19 +01:00
* Epidemiologists (both clinical microbiological and research)
* Research Microbiologists
* Biomedical Researchers
* Research Pharmacologists
2019-01-21 15:53:01 +01:00
* Data Scientists / Data Analysts
2018-12-29 22:24:19 +01:00
2019-01-26 23:22:56 +01:00
Veterinary Microbiology
2018-12-30 08:40:40 +01:00
2018-12-29 22:24:19 +01:00
* Research Veterinarians
* Veterinary Epidemiologists
2019-01-26 23:22:56 +01:00
Microbial Ecology
2018-12-30 08:40:40 +01:00
2018-12-29 22:24:19 +01:00
* Soil Microbiologists
* Extremophile Researchers
* Astrobiologists
2019-01-26 23:22:56 +01:00
Developers
2018-12-30 08:40:40 +01:00
2018-12-29 22:24:19 +01:00
* Package developers for R
* Software developers
2019-01-12 11:06:58 +01:00
* Web application / Shiny developers
2018-12-29 22:24:19 +01:00
2019-01-29 00:06:50 +01:00
## Get this package
2018-12-29 22:24:19 +01:00
2019-01-30 19:52:58 +01:00
#### Latest released version
This package is available [on the official R network (CRAN)](https://cran.r-project.org/package=AMR), which has a peer-reviewed submission process. Install this package in R with:
2019-01-05 21:40:04 +01:00
2018-12-29 22:24:19 +01:00
```r
install.packages("AMR")
```
2019-01-21 15:53:01 +01:00
It will be downloaded and installed automatically. For RStudio, click on the menu *Tools* > *Install Packages...* and then type in "AMR" and press <kbd>Install</kbd>.
2018-12-29 22:24:19 +01:00
2019-02-22 22:12:10 +01:00
**Note:** Not all functions on this website may be available in this latest release. To use all functions and data sets mentioned on this website, install the latest development version.
2019-02-20 13:57:23 +01:00
2019-01-30 19:52:58 +01:00
#### Latest development version
2018-12-29 22:24:19 +01:00
2019-02-20 10:38:24 +01:00
The latest and unpublished development version can be installed with (**precaution: may be unstable**):
2019-01-29 00:06:50 +01:00
```r
install.packages("devtools")
devtools::install_gitlab("msberends/AMR")
```
2018-12-29 22:24:19 +01:00
2019-01-29 00:06:50 +01:00
## Get started
2019-01-29 00:06:50 +01:00
To find out how to conduct AMR analysis, please [continue reading here to get started](./articles/AMR.html) or click the links in the 'How to' menu.
2019-01-12 19:31:30 +01:00
2019-01-29 00:06:50 +01:00
## Short introduction
2019-02-20 10:38:24 +01:00
#### Microbial (taxonomic) reference data
2019-02-20 10:38:24 +01:00
<img src="man/figures/logo_col.png">
2019-01-11 20:37:23 +01:00
2019-02-20 10:38:24 +01:00
This package contains the complete taxonomic tree of almost all microorganisms from the authoritative and comprehensive Catalogue of Life ([www.catalogueoflife.org](http://www.catalogueoflife.org)).
2019-01-29 00:06:50 +01:00
2019-02-20 10:38:24 +01:00
Included are:
2019-02-20 13:57:23 +01:00
* All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses
2019-02-22 22:12:10 +01:00
* All ~3,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales.
2019-02-20 13:57:23 +01:00
2019-02-22 22:12:10 +01:00
The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of *Aspergillus*, *Candida*, *Cryptococcus*, *Histoplasma*, *Pneumocystis*, *Saccharomyces* and *Trichophyton*).
2019-02-20 13:57:23 +01:00
* All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed
2019-02-20 10:38:24 +01:00
* The responsible author(s) and year of scientific publication
This data is updated annually - check the included version with `catalogue_of_life_version()`.
2019-02-20 13:57:23 +01:00
**About the Catalogue of Life**
2019-02-20 10:38:24 +01:00
2019-02-20 13:57:23 +01:00
The [Catalogue of Life](http://www.catalogueoflife.org) is the most comprehensive and authoritative global index of species currently available. It holds essential information on the names, relationships and distributions of over 1.6 million species. The Catalogue of Life is used to support the major biodiversity and conservation information services such as the Global Biodiversity Information Facility (GBIF), Encyclopedia of Life (EoL) and the International Union for Conservation of Nature Red List. It is recognised by the Convention on Biological Diversity as a significant component of the Global Taxonomy Initiative and a contribution to Target 1 of the Global Strategy for Plant Conservation.
2019-02-20 10:38:24 +01:00
Read more about the data from the Catalogue of Life [in our manual](./reference/catalogue_of_life.html).
2019-01-25 13:18:41 +01:00
#### Antimicrobial reference data
<div><img src="reference/figures/logo_who.png" height="75px" class="logo_img"><p class="logo_txt">WHO Collaborating Centre for Drug Statistics Methodology</p></div>
2019-01-27 13:55:23 +01:00
This package contains **all ~500 antimicrobial drugs** and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, https://www.whocc.no) and the [Pharmaceuticals Community Register of the European Commission](http://ec.europa.eu/health/documents/community-register/html/atc.htm).
2019-01-25 13:18:41 +01:00
Read more about the data from WHOCC [in our manual](./reference/WHOCC.html).
2019-02-20 10:38:24 +01:00
#### WHONET / EARS-Net
2019-01-29 00:06:50 +01:00
2019-02-20 10:38:24 +01:00
<img src="./whonet.png">
2019-02-20 00:04:48 +01:00
2019-02-20 10:38:24 +01:00
We support WHONET and EARS-Net data. Exported files from WHONET can be imported into R and can be analysed easily using this package. For education purposes, we created an [example data set `WHONET`](./reference/WHONET.html) with the exact same structure as a WHONET export file. Furthermore, this package also contains a [data set `antibiotics`](./reference/antibiotics.html) with all EARS-Net antibiotic abbreviations, and knows almost all WHONET abbreviations for microorganisms. When using WHONET data as input for analysis, all input parameters will be set automatically.
2019-02-20 00:04:48 +01:00
2019-02-20 10:38:24 +01:00
Read our tutorial about [how to work with WHONET data here](./articles/WHONET.html).
2019-01-29 00:06:50 +01:00
2019-01-12 19:31:30 +01:00
#### Overview of functions
The `AMR` package basically does four important things:
2019-02-04 12:24:07 +01:00
1. It **cleanses existing data** by providing new *classes* for microoganisms, antibiotics and antimicrobial results (both S/I/R and MIC). By installing this package, you teach R everything about microbiology that is needed for analysis. These functions all use artificial intelligence to guess results that you would expect:
2019-02-22 01:42:35 +01:00
* Use `as.mo()` to get an ID of a microorganism. The IDs are human readable for the trained eye - the ID of *Klebsiella pneumoniae* is "B_KLBSL_PNE" (B stands for Bacteria) and the ID of *S. aureus* is "B_STPHY_AUR". The function takes almost any text as input that looks like the name or code of a microorganism like "E. coli", "esco" or "esccol" and tries to find expected results using artificial intelligence on the included Catalogue of Life data set, consisting of almost 60,000 microorganisms. It only takes milliseconds to find results, please see our [benchmarks](./articles/benchmarks.html). Moreover, it can group *Staphylococci* into coagulase negative and positive (CoNS and CoPS, see [source](./reference/as.mo.html#source)) and can categorise *Streptococci* into Lancefield groups (like beta-haemolytic *Streptococcus* Group B, [source](./reference/as.mo.html#source)).
* Use `as.rsi()` to transform values to valid antimicrobial results. It produces just S, I or R based on your input and warns about invalid values. Even values like "<=0.002; S" (combined MIC/RSI) will result in "S".
* Use `as.mic()` to cleanse your MIC values. It produces a so-called factor (called *ordinal* in SPSS) with valid MIC values as levels. A value like "<=0.002; S" (combined MIC/RSI) will result in "<=0.002".
* Use `as.atc()` to get the ATC code of an antibiotic as defined by the WHO. This package contains a database with most LIS codes, official names, DDDs and even trade names of antibiotics. For example, the values "Furabid", "Furadantin", "nitro" all return the ATC code of Nitrofurantoine.
2. It **enhances existing data** and **adds new data** from data sets included in this package.
2019-02-21 18:55:52 +01:00
* Use `eucast_rules()` to apply [EUCAST expert rules to isolates](http://www.eucast.org/expert_rules_and_intrinsic_resistance/) (not the translation from MIC to RSI values).
* Use `first_isolate()` to identify the first isolates of every patient [using guidelines from the CLSI](https://clsi.org/standards/products/microbiology/documents/m39/) (Clinical and Laboratory Standards Institute).
* You can also identify first *weighted* isolates of every patient, an adjusted version of the CLSI guideline. This takes into account key antibiotics of every strain and compares them.
* Use `mdro()` (abbreviation of Multi Drug Resistant Organisms) to check your isolates for exceptional resistance with country-specific guidelines or EUCAST rules. Currently, national guidelines for Germany and the Netherlands are supported.
2019-02-22 01:42:35 +01:00
* The [data set `microorganisms`](./reference/microorganisms.html) contains the complete taxonomic tree of almost 60,000 microorganisms. Furthermore, the colloquial name and Gram stain are available, which enables resistance analysis of e.g. different antibiotics per Gram stain. The package also contains functions to look up values in this data set like `mo_genus()`, `mo_family()`, `mo_gramstain()` or even `mo_phylum()`. As they use `as.mo()` internally, they also use artificial intelligence. For example, `mo_genus("MRSA")` and `mo_genus("S. aureus")` will both return `"Staphylococcus"`. They also come with support for German, Dutch, Spanish, Italian, French and Portuguese. These functions can be used to add new variables to your data.
2019-01-29 20:20:09 +01:00
* The [data set `antibiotics`](./reference/antibiotics.html) contains almost 500 antimicrobial drugs with their ATC code, EARS-Net code, common LIS codes, official name, trivial name and DDD of both oral and parenteral administration. It also contains hundreds of trade names. Use functions like `atc_name()` and `atc_tradenames()` to look up values. The `atc_*` functions use `as.atc()` internally so they support AI to guess your expected result. For example, `atc_name("Fluclox")`, `atc_name("Floxapen")` and `atc_name("J01CF05")` will all return `"Flucloxacillin"`. These functions can again be used to add new variables to your data.
3. It **analyses the data** with convenient functions that use well-known methods.
2019-01-05 21:40:04 +01:00
* Calculate the resistance (and even co-resistance) of microbial isolates with the `portion_R()`, `portion_IR()`, `portion_I()`, `portion_SI()` and `portion_S()` functions. Similarly, the *number* of isolates can be determined with the `count_R()`, `count_IR()`, `count_I()`, `count_SI()` and `count_S()` functions. All these functions can be used with the `dplyr` package (e.g. in conjunction with `summarise()`)
* Plot AMR results with `geom_rsi()`, a function made for the `ggplot2` package
* Predict antimicrobial resistance for the nextcoming years using logistic regression models with the `resistance_predict()` function
* Conduct descriptive statistics to enhance base R: calculate `kurtosis()`, `skewness()` and create frequency tables with `freq()`
4. It **teaches the user** how to use all the above actions.
2019-01-29 20:20:09 +01:00
* Aside from this website with many tutorials, the package itself contains extensive help pages with many examples for all functions.
2019-02-08 16:06:54 +01:00
* The package also contains example data sets:
* The [`septic_patients` data set](.reference/septic_patients.html). This data set contains:
* 2,000 blood culture isolates from anonymised septic patients between 2001 and 2017 in the Northern Netherlands
* Results of 40 antibiotics (each antibiotic in its own column) with a total ~40,000 antimicrobial results
* Real and genuine data
* The [`WHONET` data set](.reference/WHONET.html). This data set only contains fake data, but with the exact same structure as files exported by WHONET. Read more about WHONET [on its tutorial page](./articles/WHONET.html).
2019-01-12 19:31:30 +01:00
#### Partners
The development of this package is part of, related to, or made possible by:
2018-12-29 22:24:19 +01:00
2019-02-08 16:06:54 +01:00
<a href="https://www.rug.nl"><img src="./logo_rug.png" class="partner_logo"></a>
<a href="https://www.umcg.nl"><img src="./logo_umcg.png" class="partner_logo"></a>
<a href="https://www.certe.nl"><img src="./logo_certe.png" class="partner_logo"></a>
<a href="http://www.eurhealth-1health.eu"><img src="./logo_eh1h.png" class="partner_logo"></a>
<a href="http://www.eurhealth-1health.eu"><img src="./logo_interreg.png" class="partner_logo"></a>