mirror of
https://github.com/msberends/AMR.git
synced 2024-12-25 18:46:11 +01:00
website update
This commit is contained in:
parent
4bf6a06935
commit
7e0e171512
3
R/ab.R
3
R/ab.R
@ -31,9 +31,6 @@
|
||||
#' @details All entries in the \code{\link{antibiotics}} data set have three different identifiers: a human readable EARS-Net code (column \code{ab}, used by ECDC and WHONET), an ATC code (column \code{atc}, used by WHO), and a CID code (column \code{cid}, Compound ID, used by PubChem). The data set contains more than 5,000 official brand names from many different countries, as found in PubChem.
|
||||
#'
|
||||
#' Use the \code{\link{ab_property}} functions to get properties based on the returned antibiotic ID, see Examples.
|
||||
#'
|
||||
#' In the ATC classification system, the active substances are classified in a hierarchy with five different levels. The system has fourteen main anatomical/pharmacological groups or 1st levels. Each ATC main group is divided into 2nd levels which could be either pharmacological or therapeutic groups. The 3rd and 4th levels are chemical, pharmacological or therapeutic subgroups and the 5th level is the chemical substance. The 2nd, 3rd and 4th levels are often used to identify pharmacological subgroups when that is considered more appropriate than therapeutic or chemical subgroups.
|
||||
#' Source: \url{https://www.whocc.no/atc/structure_and_principles/}
|
||||
#' @section Source:
|
||||
#' World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology: \url{https://www.whocc.no/atc_ddd_index/}
|
||||
#'
|
||||
|
18
R/freq.R
18
R/freq.R
@ -639,13 +639,13 @@ format_header <- function(x, markdown = FALSE, decimal.mark = ".", big.mark = ",
|
||||
|
||||
# class and mode
|
||||
if (is.null(header$columns)) {
|
||||
if (markdown == TRUE) {
|
||||
header$class <- paste0("`", header$class, "`")
|
||||
}
|
||||
# if (markdown == TRUE) {
|
||||
# header$class <- paste0("`", header$class, "`")
|
||||
# }
|
||||
if (!header$mode %in% header$class) {
|
||||
if (markdown == TRUE) {
|
||||
header$mode <- paste0("`", header$mode, "`")
|
||||
}
|
||||
# if (markdown == TRUE) {
|
||||
# header$mode <- paste0("`", header$mode, "`")
|
||||
# }
|
||||
header$class <- header$class %>% rev() %>% paste(collapse = " > ") %>% paste0(silver(paste0(" (", header$mode, ")")))
|
||||
} else {
|
||||
header$class <- header$class %>% rev() %>% paste(collapse = " > ")
|
||||
@ -654,9 +654,9 @@ format_header <- function(x, markdown = FALSE, decimal.mark = ".", big.mark = ",
|
||||
}
|
||||
# levels
|
||||
if (!is.null(header$levels)) {
|
||||
if (markdown == TRUE) {
|
||||
header$levels <- paste0("`", header$levels, "`")
|
||||
}
|
||||
# if (markdown == TRUE) {
|
||||
# header$levels <- paste0("`", header$levels, "`")
|
||||
# }
|
||||
if (header$ordered == TRUE) {
|
||||
levels_text <- paste0(header$levels, collapse = " < ")
|
||||
} else {
|
||||
|
2
R/mdro.R
2
R/mdro.R
@ -88,7 +88,7 @@ mdro <- function(x,
|
||||
if (is.null(col_mo) & guideline$code == "tb") {
|
||||
message(blue("NOTE: No column found as input for `col_mo`,",
|
||||
bold("assuming all records contain",
|
||||
italic("Mycobacterium tuberculosis."))))
|
||||
italic("Mycobacterium tuberculosis.\n"))))
|
||||
x$mo <- AMR::as.mo("Mycobacterium tuberculosis")
|
||||
col_mo <- "mo"
|
||||
}
|
||||
|
4
R/misc.R
4
R/misc.R
@ -219,7 +219,7 @@ get_column_abx <- function(x,
|
||||
if (!all(soft_dependencies %in% names(x))) {
|
||||
# missing a soft dependency may lower the reliability
|
||||
missing <- soft_dependencies[!soft_dependencies %in% names(x)]
|
||||
missing <- paste0("`", missing, "` (", ab_name(missing, tolower = TRUE), ")")
|
||||
missing <- paste0(missing, " (", ab_name(missing, tolower = TRUE), ")")
|
||||
warning('Reliability might be improved if these antimicrobial results would be available too: ', paste(missing, collapse = ", "),
|
||||
immediate. = TRUE,
|
||||
call. = FALSE)
|
||||
@ -229,7 +229,7 @@ get_column_abx <- function(x,
|
||||
}
|
||||
|
||||
generate_warning_abs_missing <- function(missing, any = FALSE) {
|
||||
missing <- paste0("`", missing, "` (", ab_name(missing, tolower = TRUE), ")")
|
||||
missing <- paste0(missing, " (", ab_name(missing, tolower = TRUE), ")")
|
||||
if (any == TRUE) {
|
||||
any_txt <- c(" any of", "is")
|
||||
} else {
|
||||
|
@ -242,18 +242,18 @@
|
||||
<p>The data set looks like this now:</p>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/head">head</a></span>(my_TB_data)</a>
|
||||
<a class="sourceLine" id="cb3-2" title="2"><span class="co"># rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin</span></a>
|
||||
<a class="sourceLine" id="cb3-3" title="3"><span class="co"># 1 R R S I S S</span></a>
|
||||
<a class="sourceLine" id="cb3-4" title="4"><span class="co"># 2 S R I R S R</span></a>
|
||||
<a class="sourceLine" id="cb3-5" title="5"><span class="co"># 3 S S S S R R</span></a>
|
||||
<a class="sourceLine" id="cb3-6" title="6"><span class="co"># 4 R S R S S S</span></a>
|
||||
<a class="sourceLine" id="cb3-7" title="7"><span class="co"># 5 I R R S R R</span></a>
|
||||
<a class="sourceLine" id="cb3-8" title="8"><span class="co"># 6 S S S S S S</span></a>
|
||||
<a class="sourceLine" id="cb3-3" title="3"><span class="co"># 1 S S R S R S</span></a>
|
||||
<a class="sourceLine" id="cb3-4" title="4"><span class="co"># 2 R R S S R S</span></a>
|
||||
<a class="sourceLine" id="cb3-5" title="5"><span class="co"># 3 R S R R S S</span></a>
|
||||
<a class="sourceLine" id="cb3-6" title="6"><span class="co"># 4 S I R S R R</span></a>
|
||||
<a class="sourceLine" id="cb3-7" title="7"><span class="co"># 5 R S R R S S</span></a>
|
||||
<a class="sourceLine" id="cb3-8" title="8"><span class="co"># 6 I I S S R S</span></a>
|
||||
<a class="sourceLine" id="cb3-9" title="9"><span class="co"># kanamycin</span></a>
|
||||
<a class="sourceLine" id="cb3-10" title="10"><span class="co"># 1 S</span></a>
|
||||
<a class="sourceLine" id="cb3-11" title="11"><span class="co"># 2 R</span></a>
|
||||
<a class="sourceLine" id="cb3-12" title="12"><span class="co"># 3 S</span></a>
|
||||
<a class="sourceLine" id="cb3-13" title="13"><span class="co"># 4 R</span></a>
|
||||
<a class="sourceLine" id="cb3-14" title="14"><span class="co"># 5 R</span></a>
|
||||
<a class="sourceLine" id="cb3-14" title="14"><span class="co"># 5 S</span></a>
|
||||
<a class="sourceLine" id="cb3-15" title="15"><span class="co"># 6 R</span></a></code></pre></div>
|
||||
<p>We can now add the interpretation of MDR-TB to our data set:</p>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="1">my_TB_data<span class="op">$</span>mdr <-<span class="st"> </span><span class="kw"><a href="../reference/mdro.html">mdr_tb</a></span>(my_TB_data)</a>
|
||||
@ -263,15 +263,14 @@
|
||||
<a class="sourceLine" id="cb4-5" title="5"><span class="co"># Version: WHO/HTM/TB/2014.11</span></a>
|
||||
<a class="sourceLine" id="cb4-6" title="6"><span class="co"># Author: WHO (World Health Organization)</span></a>
|
||||
<a class="sourceLine" id="cb4-7" title="7"><span class="co"># Source: https://www.who.int/tb/publications/pmdt_companionhandbook/en/</span></a>
|
||||
<a class="sourceLine" id="cb4-8" title="8"><span class="co"># Warning: Reliability might be improved if these antimicrobial results</span></a>
|
||||
<a class="sourceLine" id="cb4-9" title="9"><span class="co"># would be available too: `CAP` (capreomycin), `RIB` (rifabutin), `RFP`</span></a>
|
||||
<a class="sourceLine" id="cb4-10" title="10"><span class="co"># (rifapentine)</span></a></code></pre></div>
|
||||
<a class="sourceLine" id="cb4-8" title="8"><span class="co"># Warning: Reliability might be improved if these antimicrobial results would</span></a>
|
||||
<a class="sourceLine" id="cb4-9" title="9"><span class="co"># be available too: CAP (capreomycin), RIB (rifabutin), RFP (rifapentine)</span></a></code></pre></div>
|
||||
<p>And review the result with a frequency table:</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" title="1"><span class="kw"><a href="../reference/freq.html">freq</a></span>(my_TB_data<span class="op">$</span>mdr)</a></code></pre></div>
|
||||
<p><strong>Frequency table of <code>mdr</code> from <code>my_TB_data</code> (5,000 x 8)</strong></p>
|
||||
<p>Class: <code>factor</code> > <code>ordered</code> (<code>numeric</code>)<br>
|
||||
<p>Class: factor > ordered (numeric)<br>
|
||||
Length: 5,000 (of which NA: 0 = 0.00%)<br>
|
||||
Levels: 5: <code>Negative</code> < <code>Mono-resistance</code> < <code>Poly-resistance</code> < <code>Multidrug res...</code><br>
|
||||
Levels: 5: Negative < Mono-resistance < Poly-resistance < Multidrug resistance…<br>
|
||||
Unique: 5</p>
|
||||
<table class="table">
|
||||
<thead><tr class="header">
|
||||
@ -286,40 +285,40 @@ Unique: 5</p>
|
||||
<tr class="odd">
|
||||
<td align="left">1</td>
|
||||
<td align="left">Mono-resistance</td>
|
||||
<td align="right">3,288</td>
|
||||
<td align="right">65.8%</td>
|
||||
<td align="right">3,288</td>
|
||||
<td align="right">65.8%</td>
|
||||
<td align="right">3,240</td>
|
||||
<td align="right">64.8%</td>
|
||||
<td align="right">3,240</td>
|
||||
<td align="right">64.8%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">2</td>
|
||||
<td align="left">Negative</td>
|
||||
<td align="right">686</td>
|
||||
<td align="right">13.7%</td>
|
||||
<td align="right">3,974</td>
|
||||
<td align="right">79.5%</td>
|
||||
<td align="right">641</td>
|
||||
<td align="right">12.8%</td>
|
||||
<td align="right">3,881</td>
|
||||
<td align="right">77.6%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">3</td>
|
||||
<td align="left">Multidrug resistance</td>
|
||||
<td align="right">560</td>
|
||||
<td align="right">11.2%</td>
|
||||
<td align="right">4,534</td>
|
||||
<td align="right">90.7%</td>
|
||||
<td align="right">638</td>
|
||||
<td align="right">12.8%</td>
|
||||
<td align="right">4,519</td>
|
||||
<td align="right">90.4%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">4</td>
|
||||
<td align="left">Poly-resistance</td>
|
||||
<td align="right">269</td>
|
||||
<td align="right">5.4%</td>
|
||||
<td align="right">4,803</td>
|
||||
<td align="right">96.1%</td>
|
||||
<td align="right">279</td>
|
||||
<td align="right">5.6%</td>
|
||||
<td align="right">4,798</td>
|
||||
<td align="right">96.0%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">5</td>
|
||||
<td align="left">Extensive drug resistance</td>
|
||||
<td align="right">197</td>
|
||||
<td align="right">3.9%</td>
|
||||
<td align="right">202</td>
|
||||
<td align="right">4.0%</td>
|
||||
<td align="right">5,000</td>
|
||||
<td align="right">100.0%</td>
|
||||
</tr>
|
||||
|
@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.1.9003</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.1.9037</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -116,6 +116,13 @@
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/MDR.html">
|
||||
<span class="fa fa-skull-crossbones"></span>
|
||||
|
||||
Determine multi-drug resistance (MDR)
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/WHONET.html">
|
||||
<span class="fa fa-globe-americas"></span>
|
||||
@ -262,8 +269,6 @@
|
||||
|
||||
<p>All entries in the <code><a href='antibiotics.html'>antibiotics</a></code> data set have three different identifiers: a human readable EARS-Net code (column <code>ab</code>, used by ECDC and WHONET), an ATC code (column <code>atc</code>, used by WHO), and a CID code (column <code>cid</code>, Compound ID, used by PubChem). The data set contains more than 5,000 official brand names from many different countries, as found in PubChem.</p>
|
||||
<p>Use the <code><a href='ab_property.html'>ab_property</a></code> functions to get properties based on the returned antibiotic ID, see Examples.</p>
|
||||
<p>In the ATC classification system, the active substances are classified in a hierarchy with five different levels. The system has fourteen main anatomical/pharmacological groups or 1st levels. Each ATC main group is divided into 2nd levels which could be either pharmacological or therapeutic groups. The 3rd and 4th levels are chemical, pharmacological or therapeutic subgroups and the 5th level is the chemical substance. The 2nd, 3rd and 4th levels are often used to identify pharmacological subgroups when that is considered more appropriate than therapeutic or chemical subgroups.
|
||||
Source: <a href='https://www.whocc.no/atc/structure_and_principles/'>https://www.whocc.no/atc/structure_and_principles/</a></p>
|
||||
|
||||
<h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
|
||||
|
||||
|
@ -22,9 +22,6 @@ Use this function to determine the antibiotic code of one or more antibiotics. T
|
||||
All entries in the \code{\link{antibiotics}} data set have three different identifiers: a human readable EARS-Net code (column \code{ab}, used by ECDC and WHONET), an ATC code (column \code{atc}, used by WHO), and a CID code (column \code{cid}, Compound ID, used by PubChem). The data set contains more than 5,000 official brand names from many different countries, as found in PubChem.
|
||||
|
||||
Use the \code{\link{ab_property}} functions to get properties based on the returned antibiotic ID, see Examples.
|
||||
|
||||
In the ATC classification system, the active substances are classified in a hierarchy with five different levels. The system has fourteen main anatomical/pharmacological groups or 1st levels. Each ATC main group is divided into 2nd levels which could be either pharmacological or therapeutic groups. The 3rd and 4th levels are chemical, pharmacological or therapeutic subgroups and the 5th level is the chemical substance. The 2nd, 3rd and 4th levels are often used to identify pharmacological subgroups when that is considered more appropriate than therapeutic or chemical subgroups.
|
||||
Source: \url{https://www.whocc.no/atc/structure_and_principles/}
|
||||
}
|
||||
\section{Source}{
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user