1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-25 06:46:11 +01:00

(v0.7.0.9007) renamed notes fix

This commit is contained in:
dr. M.S. (Matthijs) Berends 2019-06-12 16:08:20 +02:00
parent 44ab53128e
commit 699e87ab4a
11 changed files with 31 additions and 24 deletions

View File

@ -1,6 +1,6 @@
Package: AMR
Version: 0.7.0.9006
Date: 2019-06-11
Version: 0.7.0.9007
Date: 2019-06-12
Title: Antimicrobial Resistance Analysis
Authors@R: c(
person(

View File

@ -1,4 +1,4 @@
# AMR 0.7.0.9006
# AMR 0.7.0.9007
#### New
* Support for all scientifically published pathotypes of *E. coli* to date. Supported are: AIEC (Adherent-Invasive *E. coli*), ATEC (Atypical Entero-pathogenic *E. coli*), DAEC (Diffusely Adhering *E. coli*), EAEC (Entero-Aggresive *E. coli*), EHEC (Entero-Haemorrhagic *E. coli*), EIEC (Entero-Invasive *E. coli*), EPEC (Entero-Pathogenic *E. coli*), ETEC (Entero-Toxigenic *E. coli*), NMEC (Neonatal Meningitiscausing *E. coli*), STEC (Shiga-toxin producing *E. coli*) and UPEC (Uropathogenic *E. coli*). All these lead to the microbial ID of *E. coli*:
@ -22,6 +22,7 @@
* Fixed a EUCAST rule for Staphylococci, where amikacin resistance would not be inferred from tobramycin
* Removed `latest_annual_release` from the `catalogue_of_life_version()` function
* Removed antibiotic code `PVM1` from the `antibiotics` data set as this was a duplicate of `PME`
* Fixed bug where not all old taxonomic named would not be printed when using a vector as input for `as.mo()`
#### Other
* Fixed a note thrown by CRAN tests

View File

@ -89,6 +89,7 @@ globalVariables(c(".",
"package_v",
"Pasted",
"patient_id",
"pattern",
"phylum",
"plural",
"prevalence",

10
R/mo.R
View File

@ -748,7 +748,7 @@ exec_as.mo <- function(x,
set_mo_history(x_backup[i], get_mo_code(x[i], property), 0, force = force_mo_history)
}
options(mo_renamed = c(getOption("mo_renamed"),
magenta(paste0("Note: ",
magenta(paste0("NOTE: ",
italic("Salmonella"), " ", trimws(gsub("Salmonella", "", x_backup_without_spp[i])),
" was considered ",
italic("Salmonella species"),
@ -760,7 +760,7 @@ exec_as.mo <- function(x,
set_mo_history(x_backup[i], get_mo_code(x[i], property), 0, force = force_mo_history)
}
options(mo_renamed = c(getOption("mo_renamed"),
magenta(paste0("Note: ",
magenta(paste0("NOTE: ",
italic("Salmonella"), " ", trimws(gsub("Salmonella", "", x_backup_without_spp[i])),
" was considered a subspecies of ",
italic("Salmonella enterica"),
@ -1233,7 +1233,7 @@ exec_as.mo <- function(x,
post_Becker <- c("argensis", "caeli", "cornubiensis", "edaphicus")
if (any(x %in% MOs_staph[species %in% post_Becker, ..property][[1]])) {
warning("Becker ", italic("et al."), " (2014) does not contain species named after their publication: ",
warning("Becker ", italic("et al."), " (2014, 2019) does not contain species named after their publication: ",
italic(paste("S.",
sort(mo_species(unique(x[x %in% MOs_staph[species %in% post_Becker, ..property][[1]]]))),
collapse = ", ")),
@ -1306,7 +1306,7 @@ exec_as.mo <- function(x,
}
notes <- sort(notes)
for (i in 1:length(notes)) {
base::message(blue(paste("Note:", notes[i])))
base::message(blue(paste("NOTE:", notes[i])))
}
}
@ -1336,7 +1336,7 @@ was_renamed <- function(name_old, name_new, ref_old = "", ref_new = "", mo = "")
}
msg <- paste0(italic(name_old), ref_old, " was renamed ", italic(name_new), ref_new, mo)
msg <- gsub("et al.", italic("et al."), msg)
options(mo_renamed = sort(msg))
options(mo_renamed = c(getOption("mo_renamed"), sort(msg)))
}
#' @exportMethod print.mo

17
R/zzz.R
View File

@ -53,12 +53,14 @@
.onAttach <- function(...) {
if (interactive()) {
if (interactive() & !isFALSE(getOption("AMR_survey"))) {
options(AMR_survey = FALSE)
console_width <- options()$width - 1
url <- "https://www.surveymonkey.com/r/AMR_for_R"
txt <- paste("Thanks for using the AMR package!",
"As researchers, we are interested in how and why you use this package and if there are things you're missing from it.",
"Please fill in our 2-minute survey at:", url)
txt <- paste0("Thanks for using the AMR package! ",
"As researchers, we are interested in how and why you use this package and if there are things you're missing from it. ",
"Please fill in our 2-minute survey at: ", url, ". ",
"This message can be turned off with: options(AMR_survey = FALSE)")
# make it honour new lines bases on console width:
txt <- unlist(strsplit(txt, " "))
@ -278,9 +280,10 @@ make_trans_tbl <- function() {
B_GRDNR = "B_GRLLA", B_SGMNS = "B_SNGMNS", B_TCLLS = "B_THBCL",
F_CCCCS = "F_CRYPT",
# renamings of old genus + species
F_CANDD_GLB = "F_CANDD_GLA", F_CANDD_KRU = "F_ISSTC_ORI",
F_CANDD_GUI = "F_MYRZY_GUI",
F_CANDD_LUS = "F_CLVSP_LUS", B_STRPT_TUS = "B_STRPT",
# putting full names here will throw notes with new taxonomic names
F_CANDD_GLB = "F_CANDD_GLA", F_CANDD_KRU = "Candida krusei",
F_CANDD_GUI = "Candida guilliermondii", F_HNSNL_ANO = "Hansenula anomala",
F_CANDD_LUS = "Candida lusitaniae", B_STRPT_TUS = "B_STRPT",
B_PRVTL_OLA = "B_PRVTL_OULO", B_FSBCT_RUM = "B_FSBCT",
B_CRYNB_EYI = "B_CRYNB_FRE", B_OLGLL_LIS = "B_OLGLL_URE")
}

View File

@ -78,7 +78,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="Latest development version">0.7.0.9006</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.0.9007</span>
</span>
</div>

View File

@ -78,7 +78,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="Latest development version">0.7.0.9006</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.0.9007</span>
</span>
</div>

View File

@ -78,7 +78,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="Latest development version">0.7.0.9006</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.0.9007</span>
</span>
</div>

View File

@ -42,7 +42,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="Latest development version">0.7.0.9006</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.0.9007</span>
</span>
</div>

View File

@ -78,7 +78,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="Latest development version">0.7.0.9006</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.0.9007</span>
</span>
</div>
@ -232,9 +232,9 @@
</div>
<div id="amr-0709006" class="section level1">
<div id="amr-0709007" class="section level1">
<h1 class="page-header">
<a href="#amr-0709006" class="anchor"></a>AMR 0.7.0.9006<small> Unreleased </small>
<a href="#amr-0709007" class="anchor"></a>AMR 0.7.0.9007<small> Unreleased </small>
</h1>
<div id="new" class="section level4">
<h4 class="hasAnchor">
@ -268,6 +268,8 @@
<li>Removed <code>latest_annual_release</code> from the <code><a href="../reference/catalogue_of_life_version.html">catalogue_of_life_version()</a></code> function</li>
<li>Removed antibiotic code <code>PVM1</code> from the <code>antibiotics</code> data set as this was a duplicate of <code>PME</code>
</li>
<li>Fixed bug where not all old taxonomic named would not be printed when using a vector as input for <code><a href="../reference/as.mo.html">as.mo()</a></code>
</li>
</ul>
</div>
<div id="other" class="section level4">
@ -1106,7 +1108,7 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
<div id="tocnav">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#amr-0709006">0.7.0.9006</a></li>
<li><a href="#amr-0709007">0.7.0.9007</a></li>
<li><a href="#amr-070">0.7.0</a></li>
<li><a href="#amr-061">0.6.1</a></li>
<li><a href="#amr-060">0.6.0</a></li>

View File

@ -78,7 +78,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="Latest development version">0.7.0.9006</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.0.9007</span>
</span>
</div>