1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-25 18:46:11 +01:00
This commit is contained in:
dr. M.S. (Matthijs) Berends 2019-01-05 21:40:04 +01:00
parent 73340f2ff8
commit 2c798547bf
10 changed files with 31 additions and 43 deletions

View File

@ -2,18 +2,21 @@
# TITLE #
# Antimicrobial Resistance (AMR) Analysis #
# #
# AUTHORS #
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
# SOURCE #
# https://gitlab.com/msberends/AMR #
# #
# LICENCE #
# This package is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License version 2.0, #
# as published by the Free Software Foundation. #
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
# #
# This R package is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License version 2.0 for more details. #
# This R package is free software; you can freely use and distribute #
# it for both personal and commercial purposes under the terms of the #
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
# the Free Software Foundation. #
# #
# This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. #
# Visit our website for more info: https://msberends.gitab.io/AMR. #
# ==================================================================== #
install_if_needed <- function(pkg, repos, quiet) {
@ -43,14 +46,4 @@ gl_update_pkg_all <- function(repos = "https://cran.rstudio.com",
print(instld[, c("Package", "Version")])
return(invisible(TRUE))
# which ones are needed now?
# pkg_needed <-
# if (length(pkg_needed) > 0) {
# # install them
# for (i %in% 1:length(pkg_needed)) {
# install_if_needed(pkg = pkg_needed[i], repos = repos, quiet = quiet)
# }
# }
}

View File

@ -19,23 +19,18 @@
# Visit our website for more info: https://msberends.gitab.io/AMR. #
# ==================================================================== #
# from https://stackoverflow.com/questions/51866926
# and https://github.com/jangorecki/r.gitlab.ci
# and https://docs.gitlab.com/ce/ci/yaml/README.html
# how the Docker+R images work: https://hub.docker.com/r/rocker/r-ver/
stages:
- build
- test
- deploy
# stretch only contains R 3.3
# debian stretch only contains R 3.3...
image: debian:buster-slim
before_script:
- apt-get update -qq
# install dependencies for packages
- apt-get -y install -qq locales libxml2-dev libssl-dev libcurl4-openssl-dev zlib1g-dev pandoc r-base
- apt-get install -qq locales libxml2-dev libssl-dev libcurl4-openssl-dev zlib1g-dev pandoc r-base
# set R system language
- echo "LC_ALL=en_US.UTF-8" >> /etc/environment
- echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
@ -47,8 +42,11 @@ before_script:
- echo 'R_LIBS_USER="installed_deps"' >> .Renviron
- echo 'R_LIBS_SITE="installed_deps"' >> .Renviron
- echo 'LANGUAGE="en_US.utf8"' >> .Renviron
- echo 'LANG="en_US.utf8"' >> .Renviron
- echo 'LANGUAGE="en_US.utf8"' > ~/.Renviron
#- Rscript -e '.libPaths()'
# install missing and outdated packages
- Rscript -e 'Sys.setlocale("LC_ALL", "en_US.UTF-8"); sessionInfo()'
- Rscript -e 'sessionInfo()'
- Rscript -e 'source(".gitlab-ci.R"); gl_update_pkg_all(repos = "https://cran.rstudio.com", quiet = TRUE, install_pkgdown = TRUE)'

View File

@ -338,7 +338,6 @@
* Function `guess_atc` to **determine the ATC** of an antibiotic based on name, trade name, or known abbreviations
* Function `freq` to create **frequency tables**, with additional info in a header
* Function `MDRO` to **determine Multi Drug Resistant Organisms (MDRO)** with support for country-specific guidelines.
* Suggest your own via [https://github.com/msberends/AMR/issues/new](https://github.com/msberends/AMR/issues/new?title=New%20guideline%20for%20MDRO&body=%3C--%20Please%20add%20your%20country%20code,%20guideline%20name,%20version%20and%20source%20below%20and%20remove%20this%20line--%3E)
* [Exceptional resistances defined by EUCAST](http://www.eucast.org/expert_rules_and_intrinsic_resistance) are also supported instead of countries alone
* Functions `BRMO` and `MRGN` are wrappers for Dutch and German guidelines, respectively
* New algorithm to determine weighted isolates, can now be `"points"` or `"keyantibiotics"`, see `?first_isolate`

View File

@ -23,7 +23,7 @@
#'
#' Welcome to the \code{AMR} package. This page gives some additional contact information about the authors.
#' @details
#' This package was intended to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and ti work with antibiotic properties by using evidence-based methods.
#' This package was intended to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial properties by using evidence-based methods.
#'
#' This package was created for academic research by PhD students of the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG).
#' @section Read more on our website!:

View File

@ -2,11 +2,9 @@
*NOTE: the original source code is on GitLab (https://gitlab.com/msberends/AMR), so you can report a bug at https://gitlab.com/msberends/AMR/issues. There is a mirror repository on GitHub (https://github.com/msberends/AMR). As the mirror process is automated by GitLab, both repositories always contain the latest changes.*
----
## Development source
This is the **development source** of `AMR`, 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 antibiotic properties by using evidence-based methods.
This is the **development source** of `AMR`, 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.
**Not a developer? Then our website https://msberends.gitlab.io/AMR is probably a better place to read about this package.** It contains documentation about all of the included functions and also a comprehensive tutorial about how to conduct AMR analysis.

View File

@ -175,8 +175,8 @@
</h1></div>
<p><em>(<help title="Too Long, Didn't Read">TLDR</help> - to find out how to conduct AMR analysis, please <a href="./articles/AMR.html">continue reading here to get started</a>.</em></p>
<hr>
<p><code>AMR</code> is a free and open-source <a href="https://www.r-project.org">R package</a> to simplify the analysis and prediction of <strong>Antimicrobial Resistance (AMR)</strong> and to work with antibiotic properties by using evidence-based methods.</p>
<p>We created this package for academic research at the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology &amp; Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). We released this under the GNU General Public Licence v2.0 (GPL-2) which makes it free for everybody to use and distribute, for personal and commercial use, but it may <strong>not</strong> be used for patent purposes. Read further about our GPL-2 licence <a href="./LICENSE-text.html">here</a>.</p>
<p><code>AMR</code> is a free and open-source <a href="https://www.r-project.org">R package</a> to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial properties by using evidence-based methods.</p>
<p>We created this package for academic research at the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology &amp; Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). This R package is free software; you can freely use and distribute it for both personal and commercial (but <strong>not</strong> patent) purposes under the terms of the GNU General Public License version 2.0 (GPL-2), as published by the Free Software Foundation. Read further about our GPL-2 licence <a href="./LICENSE-text.html">here</a>.</p>
<p>This package is ready-to-use for a professional environment by specialists in the following fields:</p>
<p>Medical Microbiology:</p>
<ul>
@ -214,7 +214,7 @@
<div id="get-this-package" class="section level3">
<h3 class="hasAnchor">
<a href="#get-this-package" class="anchor"></a>Get this package</h3>
<p>This package is available on the official R network. Install this package in R with:</p>
<p>This package is available on the official R network (CRAN). Install this package in R with:</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/install.packages">install.packages</a></span>(<span class="st">"AMR"</span>)</code></pre></div>
<p>It will be downloaded and installed automatically.</p>
</div>
@ -257,7 +257,7 @@
<li>It <strong>analyses the data</strong> with convenient functions that use well-known methods.</li>
</ol>
<ul>
<li>Calculate the resistance (and even co-resistance) of microbial isolates with the <code><a href="reference/portion.html">portion_R()</a></code>, <code><a href="reference/portion.html">portion_IR()</a></code>, <code><a href="reference/portion.html">portion_I()</a></code>, <code><a href="reference/portion.html">portion_SI()</a></code> and <code><a href="reference/portion.html">portion_S()</a></code> functions. Similarly, the <em>number</em> of isolates can be determined with the <code><a href="reference/count.html">count_R()</a></code>, <code><a href="reference/count.html">count_IR()</a></code>, <code><a href="reference/count.html">count_I()</a></code>, <code><a href="reference/count.html">count_SI()</a></code> and <code><a href="reference/count.html">count_S()</a></code> functions. All these functions can be used <a href="https://dplyr.tidyverse.org/#usage">with the <code>dplyr</code> package</a> (e.g. in conjunction with <a href="https://dplyr.tidyverse.org/reference/summarise.html"><code>summarise</code></a>)</li>
<li>Calculate the resistance (and even co-resistance) of microbial isolates with the <code><a href="reference/portion.html">portion_R()</a></code>, <code><a href="reference/portion.html">portion_IR()</a></code>, <code><a href="reference/portion.html">portion_I()</a></code>, <code><a href="reference/portion.html">portion_SI()</a></code> and <code><a href="reference/portion.html">portion_S()</a></code> functions. Similarly, the <em>number</em> of isolates can be determined with the <code><a href="reference/count.html">count_R()</a></code>, <code><a href="reference/count.html">count_IR()</a></code>, <code><a href="reference/count.html">count_I()</a></code>, <code><a href="reference/count.html">count_SI()</a></code> and <code><a href="reference/count.html">count_S()</a></code> functions. All these functions can be used with the <code>dplyr</code> package (e.g. in conjunction with <code>summarise()</code>)</li>
<li>Plot AMR results with <code><a href="reference/ggplot_rsi.html">geom_rsi()</a></code>, a function made for the <code>ggplot2</code> package</li>
<li>Predict antimicrobial resistance for the nextcoming years using logistic regression models with the <code><a href="reference/resistance_predict.html">resistance_predict()</a></code> function</li>
<li>Conduct descriptive statistics to enhance base R: calculate <code><a href="reference/kurtosis.html">kurtosis()</a></code>, <code><a href="reference/skewness.html">skewness()</a></code> and create frequency tables with <code><a href="reference/freq.html">freq()</a></code>

View File

@ -597,8 +597,6 @@
<li>Function <code>guess_atc</code> to <strong>determine the ATC</strong> of an antibiotic based on name, trade name, or known abbreviations</li>
<li>Function <code>freq</code> to create <strong>frequency tables</strong>, with additional info in a header</li>
<li>Function <code>MDRO</code> to <strong>determine Multi Drug Resistant Organisms (MDRO)</strong> with support for country-specific guidelines.</li>
<li>Suggest your own via <a href="https://github.com/msberends/AMR/issues/new?title=New%20guideline%20for%20MDRO&amp;body=%3C--%20Please%20add%20your%20country%20code,%20guideline%20name,%20version%20and%20source%20below%20and%20remove%20this%20line--%3E">https://github.com/msberends/AMR/issues/new</a>
</li>
<li>
<a href="http://www.eucast.org/expert_rules_and_intrinsic_resistance">Exceptional resistances defined by EUCAST</a> are also supported instead of countries alone</li>
<li>Functions <code>BRMO</code> and <code>MRGN</code> are wrappers for Dutch and German guidelines, respectively</li>

View File

@ -223,7 +223,7 @@
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>This package was intended to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and ti work with antibiotic properties by using evidence-based methods.</p>
<p>This package was intended to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial properties by using evidence-based methods.</p>
<p>This package was created for academic research by PhD students of the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology &amp; Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG).</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>

View File

@ -4,9 +4,10 @@
----
`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 antibiotic properties by using evidence-based methods.
`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.
We created this package for academic research at the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). We released this under the GNU General Public Licence v2.0 (GPL-2) which makes it free for everybody to use and distribute, for personal and commercial use, but it may **not** be used for patent purposes. Read further about our GPL-2 licence [here](./LICENSE-text.html).
We created this package for academic research at the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG).
This R package 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 further about our GPL-2 licence [here](./LICENSE-text.html).
This package is ready-to-use for a professional environment by specialists in the following fields:
@ -45,7 +46,8 @@ Developers:
### Get this package
This package is available on the official R network. Install this package in R with:
This package is available on the official R network (CRAN). Install this package in R with:
```r
install.packages("AMR")
```
@ -84,7 +86,7 @@ The `AMR` package basically does four important things:
3. It **analyses the data** with convenient functions that use well-known methods.
* 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](https://dplyr.tidyverse.org/#usage) (e.g. in conjunction with [`summarise`](https://dplyr.tidyverse.org/reference/summarise.html))
* 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()`

View File

@ -7,7 +7,7 @@
Welcome to the \code{AMR} package. This page gives some additional contact information about the authors.
}
\details{
This package was intended to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and ti work with antibiotic properties by using evidence-based methods.
This package was intended to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial properties by using evidence-based methods.
This package was created for academic research by PhD students of the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG).
}