diff --git a/DESCRIPTION b/DESCRIPTION
index 6b6448cc..bdaa486a 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,5 +1,5 @@
Package: AMR
-Version: 1.4.0.9035
+Version: 1.4.0.9036
Date: 2020-12-11
Title: Antimicrobial Resistance Analysis
Authors@R: c(
diff --git a/NEWS.md b/NEWS.md
index 0e18f387..ac7b9e21 100755
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,4 +1,4 @@
-# AMR 1.4.0.9035
+# AMR 1.4.0.9036
## Last updated: 11 December 2020
### New
diff --git a/R/eucast_rules.R b/R/eucast_rules.R
index 64950a65..deafd468 100755
--- a/R/eucast_rules.R
+++ b/R/eucast_rules.R
@@ -619,9 +619,11 @@ eucast_rules <- function(x,
# Other rules: enzyme inhibitors ------------------------------------------
if (any(c("all", "other") %in% rules)) {
if (info == TRUE) {
- cat(font_bold(paste0("\nRules by this AMR package (",
- font_red(paste0("v", utils::packageDescription("AMR")$Version, ", ",
- format(as.Date(utils::packageDescription("AMR")$Date), format = "%Y"))), "), see ?eucast_rules\n")))
+ cat("\n")
+ cat(word_wrap(
+ font_bold(paste0("Rules by this AMR package (",
+ font_red(paste0("v", utils::packageDescription("AMR")$Version, ", ",
+ format(as.Date(utils::packageDescription("AMR")$Date), format = "%Y"))), "), see ?eucast_rules\n"))))
}
ab_enzyme <- subset(antibiotics, name %like% "/")[, c("ab", "name")]
@@ -635,7 +637,7 @@ eucast_rules <- function(x,
# Set base to R where base + enzyme inhibitor is R
rule_current <- paste0("Set ", ab_name_base, " (", cols_ab[ab_enzyme[i, ]$base_ab], ") = R where ",
ab_name_enzyme, " (", cols_ab[ab_enzyme[i, ]$ab], ") = R")
- cat(rule_current)
+ cat(word_wrap(rule_current))
run_changes <- edit_rsi(x = x,
col_mo = col_mo,
to = "R",
@@ -664,7 +666,7 @@ eucast_rules <- function(x,
rule_current <- paste0("Set ", ab_name_enzyme, " (", cols_ab[ab_enzyme[i, ]$ab], ") = S where ",
ab_name_base, " (", cols_ab[ab_enzyme[i, ]$base_ab], ") = S")
if (info == TRUE) {
- cat(rule_current)
+ cat(word_wrap(rule_current))
}
run_changes <- edit_rsi(x = x,
col_mo = col_mo,
@@ -763,9 +765,10 @@ eucast_rules <- function(x,
if (info == TRUE) {
# Print EUCAST intro ------------------------------------------------------
if (!rule_group_current %like% "other" & eucast_notification_shown == FALSE) {
- cat(paste0("\n", font_grey(strrep("-", 0.95 * options()$width)),
- "\nRules by the ", font_bold("European Committee on Antimicrobial Susceptibility Testing (EUCAST)"),
- "\n", font_blue("https://eucast.org/"), "\n"))
+ cat(
+ paste0("\n", font_grey(strrep("-", 0.95 * options()$width)), "\n",
+ word_wrap("Rules by the ", font_bold("European Committee on Antimicrobial Susceptibility Testing (EUCAST)")), "\n",
+ font_blue("https://eucast.org/"), "\n"))
eucast_notification_shown <- TRUE
}
@@ -775,12 +778,16 @@ eucast_rules <- function(x,
cat(font_bold(
ifelse(
rule_group_current %like% "breakpoint",
- paste0("\n", breakpoints_info$title, " (",
- font_red(paste0(breakpoints_info$version_txt, ", ", breakpoints_info$year)), ")\n"),
+ paste0("\n",
+ word_wrap(
+ breakpoints_info$title, " (",
+ font_red(paste0(breakpoints_info$version_txt, ", ", breakpoints_info$year)), ")\n")),
ifelse(
rule_group_current %like% "expert",
- paste0("\n", expertrules_info$title, " (",
- font_red(paste0(expertrules_info$version_txt, ", ", expertrules_info$year)), ")\n"),
+ paste0("\n",
+ word_wrap(
+ expertrules_info$title, " (",
+ font_red(paste0(expertrules_info$version_txt, ", ", expertrules_info$year)), ")\n")),
""))))
}
# Print rule -------------------------------------------------------------
diff --git a/R/mo.R b/R/mo.R
index 08be2ee5..8af7a92f 100755
--- a/R/mo.R
+++ b/R/mo.R
@@ -748,7 +748,7 @@ exec_as.mo <- function(x,
x_backup_without_spp[i])), uncertainty = -1)
next
}
- if (x_backup_without_spp[i] %like_case% "haemoly.*strept") {
+ if (x_backup_without_spp[i] %like_case% "haemoly.*strep") {
# Haemolytic streptococci in different languages
x[i] <- lookup(mo == "B_STRPT_HAEM", uncertainty = -1)
next
@@ -1011,8 +1011,8 @@ exec_as.mo <- function(x,
if (!all(is.na(found)) & nchar(g.x_backup_without_spp) >= 6) {
if (property == "ref") {
# when property is "ref" (which is the case in mo_ref, mo_authors and mo_year), return the old value, so:
- # mo_ref("Chlamydia psittaci) = "Page, 1968" (with warning)
- # mo_ref("Chlamydophila psittaci) = "Everett et al., 1999"
+ # mo_ref("Chlamydia psittaci") = "Page, 1968" (with warning)
+ # mo_ref("Chlamydophila psittaci") = "Everett et al., 1999"
x <- found["ref"]
} else {
x <- lookup(fullname == found["fullname_new"], haystack = MO_lookup)
@@ -1437,17 +1437,19 @@ exec_as.mo <- function(x,
# - Becker et al. 2014, PMID 25278577
# - Becker et al. 2019, PMID 30872103
# - Becker et al. 2020, PMID 32056452
- post_Becker <- character(0) # 2020-10-20 currently all are mentioned in above papers
- if (any(x %in% MO_lookup[which(MO_lookup$species %in% post_Becker), property])) {
-
- warning_("Becker ", font_italic("et al."), " (2014, 2019) does not contain these species named after their publication: ",
- font_italic(paste("S.",
- sort(mo_species(unique(x[x %in% MO_lookup[which(MO_lookup$species %in% post_Becker), property]]))),
- collapse = ", ")),
- ".",
- call = FALSE,
- immediate = TRUE)
- }
+ post_Becker <- character(0) # 2020-10-20 currently all are mentioned in above papers (otherwise uncomment below)
+
+ # nolint start
+ # if (any(x %in% MO_lookup[which(MO_lookup$species %in% post_Becker), property])) {
+ # warning_("Becker ", font_italic("et al."), " (2014, 2019) does not contain these species named after their publication: ",
+ # font_italic(paste("S.",
+ # sort(mo_species(unique(x[x %in% MO_lookup[which(MO_lookup$species %in% post_Becker), property]]))),
+ # collapse = ", ")),
+ # ".",
+ # call = FALSE,
+ # immediate = TRUE)
+ # }
+ # nolint end
# 'MO_CONS' and 'MO_COPS' are vectors created in R/zzz.R
CoNS <- MO_lookup[which(MO_lookup$mo %in% MO_CONS), property, drop = TRUE]
@@ -1976,10 +1978,3 @@ repair_reference_df <- function(reference_df) {
reference_df[, "mo"] <- as.mo(reference_df[, "mo", drop = TRUE])
reference_df
}
-
-left_join_MO_lookup <- function(x, ...) {
- pm_left_join(x = x, y = MO_lookup, ...)
-}
-left_join_MO.old_lookup <- function(x, ...) {
- pm_left_join(x = x, y = MO.old_lookup, ...)
-}
diff --git a/README.md b/README.md
index 1b5dd23d..a38e91b7 100755
--- a/README.md
+++ b/README.md
@@ -4,6 +4,7 @@
+
diff --git a/docs/404.html b/docs/404.html
index dfe7ed2b..de2032b5 100644
--- a/docs/404.html
+++ b/docs/404.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.4.0.9035
+ 1.4.0.9036
diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html
index 7314b7ae..3d9a21c1 100644
--- a/docs/LICENSE-text.html
+++ b/docs/LICENSE-text.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.4.0.9035
+ 1.4.0.9036
diff --git a/docs/articles/index.html b/docs/articles/index.html
index ce013bbd..de0b6616 100644
--- a/docs/articles/index.html
+++ b/docs/articles/index.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.4.0.9035
+ 1.4.0.9036
diff --git a/docs/authors.html b/docs/authors.html
index ad8a6341..8ac84045 100644
--- a/docs/authors.html
+++ b/docs/authors.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.4.0.9035
+ 1.4.0.9036
diff --git a/docs/index.html b/docs/index.html
index 89de01e8..457aa513 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -43,7 +43,7 @@
AMR (for R)
- 1.4.0.9035
+ 1.4.0.9036
diff --git a/docs/news/index.html b/docs/news/index.html
index dc989bb8..b1991b09 100644
--- a/docs/news/index.html
+++ b/docs/news/index.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.4.0.9035
+ 1.4.0.9036
@@ -236,9 +236,9 @@
Source: NEWS.md
-
-