AMR/index.md

191 lines
17 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
2020-07-28 18:39:57 +02:00
> <span class="fa fa-clipboard-list" style="color: #128f76; font-size: 20pt; margin-right: 5px;"></span> **PLEASE TAKE PART IN OUR SURVEY!**
> Since you are one of our users, we would like to know how you use the package and what it brought you or your organisation. **If you have a minute, please [anonymously fill in this short questionnaire](./survey.html)**. Your valuable input will help to improve the package and its functionalities. You can answer the open questions in either English, Spanish, French, Dutch, or German. Thank you very much in advance!
> <br>
2020-08-10 12:46:03 +02:00
> <a class="btn btn-info btn-amr" href="./survey.html">Take me to the 5-min survey!</a>
2019-08-09 23:22:10 +02:00
### What is `AMR` (for R)?
2018-12-29 22:24:19 +01:00
2020-05-25 01:01:14 +02:00
*(To find out how to conduct AMR analysis, please [continue reading here to get started](./articles/AMR.html).)*
2019-11-30 12:01:50 +01:00
2020-05-18 13:59:34 +02:00
`AMR` is a free, open-source and independent [R package](https://www.r-project.org) to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. **Our aim is to provide a standard** for clean and reproducible antimicrobial resistance data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting.
2019-11-30 12:01:50 +01:00
2020-07-08 14:48:06 +02:00
After installing this package, R knows [**~70,000 distinct microbial species**](./reference/microorganisms.html) and all [**~550 antibiotic, antimycotic and antiviral drugs**](./reference/antibiotics.html) by name and code (including ATC, EARS-NET, LOINC and SNOMED CT), and knows all about valid R/SI and MIC values. It supports any data format, including WHONET/EARS-Net data.
2019-02-14 15:18:17 +01:00
2020-07-28 18:39:57 +02:00
This package is [fully independent of any other R package](https://en.wikipedia.org/wiki/Dependency_hell) and works on Windows, macOS and Linux with all versions of R since R-3.0.0 (April 2013). **It was designed to work in any setting, including those with very limited resources**. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the [University of Groningen](https://www.rug.nl), in collaboration with non-profit organisations [Certe Medical Diagnostics and Advice](https://www.certe.nl) and [University Medical Center Groningen](https://www.umcg.nl). This R package is [actively maintained](./news) and is free software (see [Copyright](#copyright)).
2019-08-09 23:22:10 +02:00
2020-07-28 18:39:57 +02:00
<div class="main-content">
2019-11-23 12:39:57 +01:00
<p>
<a href="./countries_large.png" target="_blank"><img src="./countries.png" class="countries_map"></a>
2020-11-25 20:26:02 +01:00
<strong>Used in 135 countries</strong><br>
Since its first public release in early 2018, this package has been downloaded from 135 countries. Click the map to enlarge and to also see the names of the countries.</p><br><br>
2019-11-23 12:39:57 +01:00
</div>
2019-08-09 23:22:10 +02:00
<div class="home-buttons">
<a href="articles/datasets.html">
<div style="background-color: #128f7635;">
<div class="fa fa-database"></div>
2020-08-17 21:49:58 +02:00
<span>Download our data sets</span>
</div>
</a>
<a href="articles/AMR.html">
<div style="background-color: #138F3865;">
<div class="fa fa-chalkboard-teacher"></div>
<span>Start learning AMR analysis</span>
</div>
</a>
<a href="reference/as.rsi.html">
<div style="background-color: #128f7650;">
<div class="fa fa-language"></div>
<span>Interpret MIC/disk values to R/SI</span>
</div>
</a>
<a href="articles/MDR.html">
<div style="background-color: #138F3835;">
<div class="fa fa-skull-crossbones"></div>
<span>Determine multi-drug resistance (MDR)</span>
</div>
</a>
</div>
2019-08-09 23:22:10 +02:00
#### Partners
The development of this package is part of, related to, or made possible by:
2019-08-13 16:15:08 +02:00
<div align="center">
2019-09-01 13:16:57 +02:00
<a href="https://www.rug.nl" title="University of Groningen"><img src="./logo_rug.png" class="partner_logo"></a>
<a href="https://www.umcg.nl" title="University Medical Center Groningen"><img src="./logo_umcg.png" class="partner_logo"></a>
<a href="https://www.certe.nl" title="Certe Medical Diagnostics and Advice"><img src="./logo_certe.png" class="partner_logo"></a>
<a href="http://www.eurhealth-1health.eu" title="EurHealth-1-Health"><img src="./logo_eh1h.png" class="partner_logo"></a>
<a href="https://www.deutschland-nederland.eu" title="INTERREG"><img src="./logo_interreg.png" class="partner_logo"></a>
2019-08-13 16:15:08 +02:00
</div>
2019-08-09 23:22:10 +02:00
### What can you do with this package?
2019-01-26 23:22:56 +01:00
This package can be used for:
2020-05-27 16:37:49 +02:00
* Reference for the taxonomy of microorganisms, since the package contains all microbial (sub)species from the [Catalogue of Life](http://www.catalogueoflife.org) and [List of Prokaryotic names with Standing in Nomenclature](https://lpsn.dsmz.de) ([manual](./reference/mo_property.html))
2019-05-23 16:58:59 +02:00
* Interpreting raw MIC and disk diffusion values, based on the latest CLSI or EUCAST guidelines ([manual](./reference/as.rsi.html))
* Retrieving antimicrobial drug names, doses and forms of administration from clinical health care records ([manual](./reference/ab_from_text.html))
* Determining first isolates to be used for AMR analysis ([manual](./reference/first_isolate.html))
2019-05-23 16:58:59 +02:00
* Calculating antimicrobial resistance ([tutorial](./articles/AMR.html))
* Determining multi-drug resistance (MDR) / multi-drug resistant organisms (MDRO) ([tutorial](./articles/MDR.html))
* Calculating (empirical) susceptibility of both mono therapy and combination therapies ([tutorial](./articles/AMR.html))
2019-05-23 16:58:59 +02:00
* Predicting future antimicrobial resistance using regression models ([tutorial](./articles/resistance_predict.html))
* Getting properties for any microorganism (like Gram stain, species, genus or family) ([manual](./reference/mo_property.html))
* Getting properties for any antibiotic (like name, code of EARS-Net/ATC/LOINC/PubChem, defined daily dose or trade name) ([manual](./reference/ab_property.html))
2019-05-23 16:58:59 +02:00
* Plotting antimicrobial resistance ([tutorial](./articles/AMR.html))
2019-05-23 18:53:18 +02:00
* Applying EUCAST expert rules ([manual](./reference/eucast_rules.html))
* Getting SNOMED codes of a microorganism, or getting properties of a microorganism based on a SNOMED code ([manual](./reference/mo_property.html))
* Getting LOINC codes of an antibiotic, or getting properties of an antibiotic based on a LOINC code ([manual](./reference/ab_property.html))
2020-07-08 17:48:57 +02:00
* Machine reading the EUCAST and CLSI guidelines from 2011-2020 to translate MIC values and disk diffusion diameters to R/SI ([link](https://github.com/msberends/AMR/blob/master/data-raw/rsi_translation.txt))
2020-03-14 14:05:43 +01:00
* Principal component analysis for AMR ([tutorial](./articles/PCA.html))
2018-12-29 22:24:19 +01:00
2019-08-09 23:22:10 +02:00
### Get this package
2018-12-29 22:24:19 +01:00
2019-01-30 19:52:58 +01:00
#### Latest released version
<img src="https://www.r-pkg.org/badges/version-ago/AMR" />
<img src="https://cranlogs.r-pkg.org/badges/grand-total/AMR" />
2019-01-30 19:52:58 +01:00
2019-12-16 11:08:25 +01:00
This package is available [here 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 from CRAN by using the command:
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
2020-07-08 17:48:57 +02:00
The latest and unpublished development version can be installed from GitHub using:
2019-01-29 00:06:50 +01:00
```r
2020-07-08 17:48:57 +02:00
install.packages("remotes")
remotes::install_github("msberends/AMR")
2019-01-29 00:06:50 +01:00
```
2018-12-29 22:24:19 +01:00
2019-08-09 23:22:10 +02: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-08-09 23:22:10 +02:00
### Short introduction
2019-02-20 10:38:24 +01:00
#### Microbial (taxonomic) reference data
2020-05-27 16:37:49 +02:00
This package contains the complete taxonomic tree of almost all ~70,000 microorganisms from the authoritative and comprehensive Catalogue of Life (CoL, [www.catalogueoflife.org](http://www.catalogueoflife.org)), supplemented by data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, [lpsn.dsmz.de](https://lpsn.dsmz.de)). This supplementation is needed until the [CoL+ project](https://github.com/Sp2000/colplus) is finished, which we await. With `catalogue_of_life_version()` can be checked which version of the CoL is included in this package.
2019-01-29 00:06:50 +01:00
2019-08-13 16:15:08 +02:00
Read more about which 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
This package contains **all ~550 antibiotic, antimycotic and antiviral drugs** and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD, oral and IV) 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
**NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package. See https://www.whocc.no/copyright_disclaimer/.**
2019-07-09 11:22:46 +02:00
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-11-30 12:01:50 +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-03-06 14:39:02 +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 intelligent rules to guess results that you would expect:
2019-09-18 15:46:09 +02:00
* Use `as.mo()` to get a microbial ID. The IDs are human readable for the trained eye - the ID of *Klebsiella pneumoniae* is "B_KLBSL_PNMN" (B stands for Bacteria) and the ID of *S. aureus* is "B_STPHY_AURS". 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 intelligent rules combined with the included Catalogue of Life data set. 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.ab()` to get an antibiotic ID. Like microbial IDs, these IDs are also human readable based on those used by EARS-Net. For example, the ID of amoxicillin is `AMX` and the ID of gentamicin is `GEN`. The `as.ab()` function also uses intelligent rules to find results like accepting misspelling, trade names and abbrevations used in many laboratory systems. For instance, the values "Furabid", "Furadantin", "nitro" all return the ID of Nitrofurantoine. To accomplish this, the package contains a database with most LIS codes, official names, trade names, ATC codes, defined daily doses (DDD) and drug categories of antibiotics.
2019-05-13 10:10:16 +02:00
* Use `as.rsi()` to get antibiotic interpretations based on raw MIC values (in mg/L) or disk diffusion values (in mm), or transform existing 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".
2. It **enhances existing data** and **adds new data** from data sets included in this package.
2020-10-08 11:16:03 +02:00
* Use `eucast_rules()` to apply [EUCAST expert rules to isolates](https://www.eucast.org/expert_rules_and_intrinsic_resistance/) (not the translation from MIC to R/SI values, use `as.rsi()` for that).
* 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()` to determine which micro-organisms are multi-drug resistant organisms (MDRO). It supports a variety of international guidelines, such as the MDR-paper by Magiorakos *et al.* (2012, [PMID 21793988](https://www.ncbi.nlm.nih.gov/pubmed/?term=21793988)), the exceptional phenotype definitions of EUCAST and the WHO guideline on multi-drug resistant TB. It also supports the national guidelines of the Netherlands and Germany.
2020-01-27 19:14:23 +01:00
* The [data set microorganisms](./reference/microorganisms.html) contains the complete taxonomic tree of ~70,000 microorganisms. Furthermore, some colloquial names and all Gram stains 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()`. Use `mo_snomed()` to look up any SNOMED CT code associated with a microorganism. As all these function use `as.mo()` internally, they also use the same intelligent rules for determination. 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.
* The [data set antibiotics](./reference/antibiotics.html) contains ~450 antimicrobial drugs with their EARS-Net code, ATC code, PubChem compound ID, LOINC code, official name, common LIS codes and DDDs of both oral and parenteral administration. It also contains all (thousands of) trade names found in PubChem. Use functions like `ab_name()`, `ab_group()`, `ab_atc()`, `ab_loinc()` and `ab_tradenames()` to look up values. The `ab_*` functions use `as.ab()` internally so they support the same intelligent rules to guess the most probable result. For example, `ab_name("Fluclox")`, `ab_name("Floxapen")` and `ab_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.
* Calculate the microbial susceptibility or resistance (and even co-resistance) with the `susceptibility()` and `resistance()` functions, or be even more specific with the `proportion_R()`, `proportion_IR()`, `proportion_I()`, `proportion_SI()` and `proportion_S()` functions. Similarly, the *number* of isolates can be determined with the `count_resistant()`, `count_susceptible()` and `count_all()` 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
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 [`example_isolates` data set](./reference/example_isolates.html). This data set contains 2,000 microbial isolates with their full antibiograms. It reflects reality and can be used to practice AMR analysis.
2019-03-06 14:39:02 +01:00
* 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-08-30 14:50:56 +02:00
### Copyright
This R package is free, open-source software and licensed under the [GNU General Public License v2.0 (GPL-2)](./LICENSE-text.html). In a nutshell, this means that this package:
- May be used for commercial purposes
- May be used for private purposes
- May **not** be used for patent purposes
- May be modified, although:
- Modifications **must** be released under the same license when distributing the package
- Changes made to the code **must** be documented
- May be distributed, although:
- Source code **must** be made available when the package is distributed
- A copy of the license and copyright notice **must** be included with the package.
- Comes with a LIMITATION of liability
- Comes with NO warranty