mirror of
https://github.com/msberends/AMR.git
synced 2024-12-26 17:26:12 +01:00
(v0.7.1.9084) CI fix
This commit is contained in:
parent
8ce252fbc5
commit
76dc948067
@ -1,5 +1,5 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 0.7.1.9083
|
Version: 0.7.1.9084
|
||||||
Date: 2019-09-23
|
Date: 2019-09-23
|
||||||
Title: Antimicrobial Resistance Analysis
|
Title: Antimicrobial Resistance Analysis
|
||||||
Authors@R: c(
|
Authors@R: c(
|
||||||
|
2
NEWS.md
2
NEWS.md
@ -1,4 +1,4 @@
|
|||||||
# AMR 0.7.1.9083
|
# AMR 0.7.1.9084
|
||||||
<small>Last updated: 23-Sep-2019</small>
|
<small>Last updated: 23-Sep-2019</small>
|
||||||
|
|
||||||
### Breaking
|
### Breaking
|
||||||
|
@ -53,6 +53,7 @@ globalVariables(c(".",
|
|||||||
"mdr",
|
"mdr",
|
||||||
"median",
|
"median",
|
||||||
"microorganisms",
|
"microorganisms",
|
||||||
|
"microorganisms.codes",
|
||||||
"missing_names",
|
"missing_names",
|
||||||
"mo",
|
"mo",
|
||||||
"mono_count",
|
"mono_count",
|
||||||
|
9
R/mo.R
9
R/mo.R
@ -652,9 +652,9 @@ exec_as.mo <- function(x,
|
|||||||
if (!is.null(reference_df)) {
|
if (!is.null(reference_df)) {
|
||||||
# self-defined reference
|
# self-defined reference
|
||||||
if (x_backup[i] %in% reference_df[, 1]) {
|
if (x_backup[i] %in% reference_df[, 1]) {
|
||||||
ref_mo <- reference_df[reference_df[, 1] == x_backup[i], "mo"]
|
ref_mo <- reference_df[reference_df[, 1] == x_backup[i], "mo"][[1L]]
|
||||||
if (ref_mo %in% data_to_check[, mo]) {
|
if (ref_mo %in% microorganismsDT[, mo]) {
|
||||||
x[i] <- data_to_check[mo == ref_mo, ..property][[1]][1L]
|
x[i] <- microorganismsDT[mo == ref_mo, ..property][[1]][1L]
|
||||||
next
|
next
|
||||||
} else {
|
} else {
|
||||||
warning("Value '", x_backup[i], "' was found in reference_df, but '", ref_mo, "' is not a valid MO code.", call. = FALSE)
|
warning("Value '", x_backup[i], "' was found in reference_df, but '", ref_mo, "' is not a valid MO code.", call. = FALSE)
|
||||||
@ -769,8 +769,7 @@ exec_as.mo <- function(x,
|
|||||||
}
|
}
|
||||||
next
|
next
|
||||||
}
|
}
|
||||||
if (toupper(x_backup_without_spp[i]) == 'CRS'
|
if (toupper(x_backup_without_spp[i]) == 'CRSM') {
|
||||||
| toupper(x_backup_without_spp[i]) == 'CRSM') {
|
|
||||||
# co-trim resistant S. maltophilia
|
# co-trim resistant S. maltophilia
|
||||||
x[i] <- microorganismsDT[mo == 'B_STNTR_MLTP', ..property][[1]][1L]
|
x[i] <- microorganismsDT[mo == 'B_STNTR_MLTP', ..property][[1]][1L]
|
||||||
if (initial_search == TRUE) {
|
if (initial_search == TRUE) {
|
||||||
|
@ -78,7 +78,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9083</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9084</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9083</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9084</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9083</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9084</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9083</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9084</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9083</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9084</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -225,9 +225,9 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="amr-0-7-1-9083" class="section level1">
|
<div id="amr-0-7-1-9084" class="section level1">
|
||||||
<h1 class="page-header">
|
<h1 class="page-header">
|
||||||
<a href="#amr-0-7-1-9083" class="anchor"></a>AMR 0.7.1.9083<small> Unreleased </small>
|
<a href="#amr-0-7-1-9084" class="anchor"></a>AMR 0.7.1.9084<small> Unreleased </small>
|
||||||
</h1>
|
</h1>
|
||||||
<p><small>Last updated: 23-Sep-2019</small></p>
|
<p><small>Last updated: 23-Sep-2019</small></p>
|
||||||
<div id="breaking" class="section level3">
|
<div id="breaking" class="section level3">
|
||||||
@ -1280,7 +1280,7 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
|||||||
<div id="tocnav">
|
<div id="tocnav">
|
||||||
<h2>Contents</h2>
|
<h2>Contents</h2>
|
||||||
<ul class="nav nav-pills nav-stacked">
|
<ul class="nav nav-pills nav-stacked">
|
||||||
<li><a href="#amr-0-7-1-9083">0.7.1.9083</a></li>
|
<li><a href="#amr-0-7-1-9084">0.7.1.9084</a></li>
|
||||||
<li><a href="#amr-0-7-1">0.7.1</a></li>
|
<li><a href="#amr-0-7-1">0.7.1</a></li>
|
||||||
<li><a href="#amr-0-7-0">0.7.0</a></li>
|
<li><a href="#amr-0-7-0">0.7.0</a></li>
|
||||||
<li><a href="#amr-0-6-1">0.6.1</a></li>
|
<li><a href="#amr-0-6-1">0.6.1</a></li>
|
||||||
|
@ -78,7 +78,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9083</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9084</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ test_that("as.mo works", {
|
|||||||
# too few characters
|
# too few characters
|
||||||
expect_warning(as.mo("ab"))
|
expect_warning(as.mo("ab"))
|
||||||
|
|
||||||
expect_equal(suppressWarnings(as.character(as.mo(c("Qq species", "", "CRS", "K. pneu rhino", "esco")))),
|
expect_equal(suppressWarnings(as.character(as.mo(c("Qq species", "", "CRSM", "K. pneu rhino", "esco")))),
|
||||||
c("UNKNOWN", NA_character_, "B_STNTR_MLTP", "B_KLBSL_PNMN_RHNS", "B_ESCHR_COLI"))
|
c("UNKNOWN", NA_character_, "B_STNTR_MLTP", "B_KLBSL_PNMN_RHNS", "B_ESCHR_COLI"))
|
||||||
|
|
||||||
# check for Becker classification
|
# check for Becker classification
|
||||||
@ -221,14 +221,9 @@ test_that("as.mo works", {
|
|||||||
expect_error(as.mo("E. coli", reference_df = data.frame(mycol = "TestingOwnID")))
|
expect_error(as.mo("E. coli", reference_df = data.frame(mycol = "TestingOwnID")))
|
||||||
|
|
||||||
# combination of existing mo and other code
|
# combination of existing mo and other code
|
||||||
expect_identical(suppressWarnings(as.character(as.mo(c("B_ESCHR_COL", "ESCCOL")))),
|
expect_identical(as.character(as.mo(c("B_ESCHR_COL", "ESCCOL"))),
|
||||||
c("B_ESCHR_COLI", "B_ESCHR_COLI"))
|
c("B_ESCHR_COLI", "B_ESCHR_COLI"))
|
||||||
|
|
||||||
# expect_equal(mo_fullname(c("E. spp.",
|
|
||||||
# "E. spp",
|
|
||||||
# "E. species")),
|
|
||||||
# rep("Escherichia species", 3))
|
|
||||||
|
|
||||||
# from different sources
|
# from different sources
|
||||||
expect_equal(as.character(as.mo(
|
expect_equal(as.character(as.mo(
|
||||||
c("PRTMIR", "bclcer", "B_ESCHR_COLI"))),
|
c("PRTMIR", "bclcer", "B_ESCHR_COLI"))),
|
||||||
|
@ -90,6 +90,8 @@ test_that("mo_property works", {
|
|||||||
expect_identical(suppressWarnings(mo_ref("Chlamydia psittaci")), "Page, 1968")
|
expect_identical(suppressWarnings(mo_ref("Chlamydia psittaci")), "Page, 1968")
|
||||||
expect_identical(mo_ref("Chlamydophila psittaci"), "Everett et al., 1999")
|
expect_identical(mo_ref("Chlamydophila psittaci"), "Everett et al., 1999")
|
||||||
|
|
||||||
|
# old codes must throw a warning in mo_* family
|
||||||
|
expect_warning(mo_name(c("B_ESCHR_COL", "B_STPHY_AUR")))
|
||||||
|
|
||||||
# outcome of mo_fullname must always return the fullname from the data set
|
# outcome of mo_fullname must always return the fullname from the data set
|
||||||
library(dplyr)
|
library(dplyr)
|
||||||
|
Loading…
Reference in New Issue
Block a user