1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 02:03:04 +02:00
This commit is contained in:
2022-10-03 14:34:45 +02:00
parent 75e05a201a
commit 9cbc1d4f16
23 changed files with 245 additions and 211 deletions

View File

@ -107,8 +107,8 @@ read_EUCAST <- function(sheet, file, guideline_name) {
get_mo <- function(x) {
for (i in seq_len(length(x))) {
y <- trimws(unlist(strsplit(x[i], "(,|and)")))
y <- trimws(gsub("[(].*[)]", "", y))
y <- trimws2(unlist(strsplit(x[i], "(,|and)")))
y <- trimws2(gsub("[(].*[)]", "", y))
y <- suppressWarnings(suppressMessages(as.mo(y, allow_uncertain = FALSE)))
if (!is.null(mo_uncertainties())) uncertainties <<- add_uncertainties(uncertainties, mo_uncertainties())
y <- y[!is.na(y) & y != "UNKNOWN"]

View File

@ -678,7 +678,7 @@ taxonomy <- taxonomy %>%
# Add prevalence ----------------------------------------------------------
# update prevalence based on taxonomy (our own JSS paper: Berends et al., 2022)
# update prevalence based on taxonomy (our own JSS paper: Berends MS et al. (2022), DOI 10.18637/jss.v104.i03)
taxonomy <- taxonomy %>%
mutate(prevalence = case_when(
class == "Gammaproteobacteria" |