mirror of
https://github.com/msberends/AMR.git
synced 2024-12-26 07:26:13 +01:00
(v1.1.0.9010) lose dependencies
This commit is contained in:
parent
bf0402a653
commit
d659c9baef
@ -101,8 +101,6 @@ R-release:
|
|||||||
# build package
|
# build package
|
||||||
- R CMD build . --no-build-vignettes --no-manual
|
- R CMD build . --no-build-vignettes --no-manual
|
||||||
- PKG_FILE_NAME=$(ls -1t *.tar.gz | head -n 1)
|
- PKG_FILE_NAME=$(ls -1t *.tar.gz | head -n 1)
|
||||||
- Rscript -e 'devtools::install_local("${PKG_FILE_NAME}")'
|
|
||||||
- Rscript -e 'AMR::eucast_rules(AMR::example_isolates_unclean, info = TRUE)'
|
|
||||||
- Rscript -e 'Sys.setenv(NOT_CRAN = "true")'
|
- Rscript -e 'Sys.setenv(NOT_CRAN = "true")'
|
||||||
- R CMD check "${PKG_FILE_NAME}" --no-build-vignettes --no-manual --as-cran
|
- R CMD check "${PKG_FILE_NAME}" --no-build-vignettes --no-manual --as-cran
|
||||||
artifacts:
|
artifacts:
|
||||||
@ -130,8 +128,6 @@ R-devel:
|
|||||||
# build package
|
# build package
|
||||||
- Rdevel CMD build . --no-build-vignettes --no-manual
|
- Rdevel CMD build . --no-build-vignettes --no-manual
|
||||||
- PKG_FILE_NAME=$(ls -1t *.tar.gz | head -n 1)
|
- PKG_FILE_NAME=$(ls -1t *.tar.gz | head -n 1)
|
||||||
- Rscript -e 'devtools::install_local("${PKG_FILE_NAME}")'
|
|
||||||
- Rscript -e 'AMR::eucast_rules(AMR::example_isolates_unclean, info = TRUE)'
|
|
||||||
- Rscript -e 'Sys.setenv(NOT_CRAN = "true")'
|
- Rscript -e 'Sys.setenv(NOT_CRAN = "true")'
|
||||||
- Rdevel CMD check "${PKG_FILE_NAME}" --no-build-vignettes --no-manual --as-cran
|
- Rdevel CMD check "${PKG_FILE_NAME}" --no-build-vignettes --no-manual --as-cran
|
||||||
artifacts:
|
artifacts:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 1.1.0.9009
|
Version: 1.1.0.9010
|
||||||
Date: 2020-05-18
|
Date: 2020-05-18
|
||||||
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 1.1.0.9009
|
# AMR 1.1.0.9010
|
||||||
## <small>Last updated: 18-May-2020</small>
|
## <small>Last updated: 18-May-2020</small>
|
||||||
|
|
||||||
### Breaking
|
### Breaking
|
||||||
|
@ -520,7 +520,7 @@ eucast_rules <- function(x,
|
|||||||
x[, col_mo] <- as.mo(x[, col_mo, drop = TRUE])
|
x[, col_mo] <- as.mo(x[, col_mo, drop = TRUE])
|
||||||
x <- x %>%
|
x <- x %>%
|
||||||
left_join_microorganisms(by = col_mo, suffix = c("_oldcols", ""))
|
left_join_microorganisms(by = col_mo, suffix = c("_oldcols", ""))
|
||||||
x$gramstain <- mo_gramstain(x[, col_mo, drop = TRUE])
|
x$gramstain <- mo_gramstain(x[, col_mo, drop = TRUE], language = NULL)
|
||||||
x$genus_species <- paste(x$genus, x$species)
|
x$genus_species <- paste(x$genus, x$species)
|
||||||
|
|
||||||
if (ab_missing(AMP) & !ab_missing(AMX)) {
|
if (ab_missing(AMP) & !ab_missing(AMX)) {
|
||||||
@ -658,7 +658,7 @@ eucast_rules <- function(x,
|
|||||||
rule_group_current %like% "expert",
|
rule_group_current %like% "expert",
|
||||||
paste0("\nEUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes (",
|
paste0("\nEUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes (",
|
||||||
font_red(paste0("v", EUCAST_VERSION_EXPERT_RULES)), ")\n"),
|
font_red(paste0("v", EUCAST_VERSION_EXPERT_RULES)), ")\n"),
|
||||||
"\nOther rules by this AMR package\n"))))
|
"\nOther rules by this AMR package (turn on/off with 'rules' parameter)\n"))))
|
||||||
}
|
}
|
||||||
# Print rule -------------------------------------------------------------
|
# Print rule -------------------------------------------------------------
|
||||||
if (rule_current != rule_previous) {
|
if (rule_current != rule_previous) {
|
||||||
@ -678,32 +678,27 @@ eucast_rules <- function(x,
|
|||||||
like_is_one_of <- eucast_rules_df[i, 2]
|
like_is_one_of <- eucast_rules_df[i, 2]
|
||||||
|
|
||||||
# be sure to comprise all coagulase-negative/-positive Staphylococci when they are mentioned
|
# be sure to comprise all coagulase-negative/-positive Staphylococci when they are mentioned
|
||||||
if (eucast_rules_df[i, 3] %like% "coagulase-") {
|
if (eucast_rules_df[i, 3] %like% "coagulase") {
|
||||||
suppressWarnings(
|
all_staph <- microorganisms[which(microorganisms$genus == "Staphylococcus"), ]
|
||||||
all_staph <- microorganisms %>%
|
all_staph$CNS_CPS <- suppressWarnings(mo_name(all_staph$mo, Becker = "all", language = NULL))
|
||||||
filter(genus == "Staphylococcus") %>%
|
if (eucast_rules_df[i, 3] %like% "coagulase") {
|
||||||
mutate(CNS_CPS = mo_name(mo, Becker = "all"))
|
eucast_rules_df[i, 3] <- paste0("^(", paste0(all_staph[which(all_staph$CNS_CPS %like% "negative"),
|
||||||
)
|
"fullname",
|
||||||
if (eucast_rules_df[i, 3] %like% "coagulase-") {
|
drop = TRUE],
|
||||||
eucast_rules_df[i, 3] <- paste0("^(",
|
collapse = "|"),
|
||||||
paste0(all_staph %>%
|
|
||||||
filter(CNS_CPS %like% "coagulase-negative") %>%
|
|
||||||
pull(fullname),
|
|
||||||
collapse = "|"),
|
|
||||||
")$")
|
")$")
|
||||||
} else {
|
} else {
|
||||||
eucast_rules_df[i, 3] <- paste0("^(",
|
eucast_rules_df[i, 3] <- paste0("^(", paste0(all_staph[which(all_staph$CNS_CPS %like% "positive"),
|
||||||
paste0(all_staph %>%
|
"fullname",
|
||||||
filter(CNS_CPS %like% "coagulase-positive") %>%
|
drop = TRUE],
|
||||||
pull(fullname),
|
collapse = "|"),
|
||||||
collapse = "|"),
|
|
||||||
")$")
|
")$")
|
||||||
}
|
}
|
||||||
like_is_one_of <- "like"
|
like_is_one_of <- "like"
|
||||||
}
|
}
|
||||||
|
|
||||||
if (like_is_one_of == "is") {
|
if (like_is_one_of == "is") {
|
||||||
# so 'Enterococcus' will turn into '^Enterococcus$'
|
# so e.g. 'Enterococcus' will turn into '^Enterococcus$'
|
||||||
mo_value <- paste0("^", eucast_rules_df[i, 3], "$")
|
mo_value <- paste0("^", eucast_rules_df[i, 3], "$")
|
||||||
} else if (like_is_one_of == "one_of") {
|
} else if (like_is_one_of == "one_of") {
|
||||||
# so 'Clostridium, Actinomyces, ...' will turn into '^(Clostridium|Actinomyces|...)$'
|
# so 'Clostridium, Actinomyces, ...' will turn into '^(Clostridium|Actinomyces|...)$'
|
||||||
|
@ -79,8 +79,8 @@ guess_ab_col <- function(x = NULL, search_string = NULL, verbose = FALSE) {
|
|||||||
if (search_string.ab %in% colnames(x)) {
|
if (search_string.ab %in% colnames(x)) {
|
||||||
ab_result <- colnames(x)[colnames(x) == search_string.ab][1L]
|
ab_result <- colnames(x)[colnames(x) == search_string.ab][1L]
|
||||||
|
|
||||||
} else if (any(tolower(colnames(x)) %in% tolower(unlist(ab_property(search_string.ab, "abbreviations"))))) {
|
} else if (any(tolower(colnames(x)) %in% tolower(unlist(ab_property(search_string.ab, "abbreviations", language = NULL))))) {
|
||||||
ab_result <- colnames(x)[tolower(colnames(x)) %in% tolower(unlist(ab_property(search_string.ab, "abbreviations")))][1L]
|
ab_result <- colnames(x)[tolower(colnames(x)) %in% tolower(unlist(ab_property(search_string.ab, "abbreviations", language = NULL)))][1L]
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
# sort colnames on length - longest first
|
# sort colnames on length - longest first
|
||||||
@ -96,13 +96,13 @@ guess_ab_col <- function(x = NULL, search_string = NULL, verbose = FALSE) {
|
|||||||
if (length(ab_result) == 0) {
|
if (length(ab_result) == 0) {
|
||||||
if (verbose == TRUE) {
|
if (verbose == TRUE) {
|
||||||
message(paste0("No column found as input for `", search_string,
|
message(paste0("No column found as input for `", search_string,
|
||||||
"` (", ab_name(search_string, language = "en", tolower = TRUE), ")."))
|
"` (", ab_name(search_string, language = NULL, tolower = TRUE), ")."))
|
||||||
}
|
}
|
||||||
return(NULL)
|
return(NULL)
|
||||||
} else {
|
} else {
|
||||||
if (verbose == TRUE) {
|
if (verbose == TRUE) {
|
||||||
message(font_blue(paste0("NOTE: Using column `", font_bold(ab_result), "` as input for `", search_string,
|
message(font_blue(paste0("NOTE: Using column `", font_bold(ab_result), "` as input for `", search_string,
|
||||||
"` (", ab_name(search_string, language = "en", tolower = TRUE), ").")))
|
"` (", ab_name(search_string, language = NULL, tolower = TRUE), ").")))
|
||||||
}
|
}
|
||||||
return(ab_result)
|
return(ab_result)
|
||||||
}
|
}
|
||||||
@ -173,11 +173,11 @@ get_column_abx <- function(x,
|
|||||||
for (i in seq_len(length(x))) {
|
for (i in seq_len(length(x))) {
|
||||||
if (verbose == TRUE & !names(x[i]) %in% names(duplicates)) {
|
if (verbose == TRUE & !names(x[i]) %in% names(duplicates)) {
|
||||||
message(font_blue(paste0("NOTE: Using column `", font_bold(x[i]), "` as input for `", names(x)[i],
|
message(font_blue(paste0("NOTE: Using column `", font_bold(x[i]), "` as input for `", names(x)[i],
|
||||||
"` (", ab_name(names(x)[i], tolower = TRUE), ").")))
|
"` (", ab_name(names(x)[i], tolower = TRUE, language = NULL), ").")))
|
||||||
}
|
}
|
||||||
if (names(x[i]) %in% names(duplicates)) {
|
if (names(x[i]) %in% names(duplicates)) {
|
||||||
warning(font_red(paste0("Using column `", font_bold(x[i]), "` as input for `", names(x)[i],
|
warning(font_red(paste0("Using column `", font_bold(x[i]), "` as input for `", names(x)[i],
|
||||||
"` (", ab_name(names(x)[i], tolower = TRUE),
|
"` (", ab_name(names(x)[i], tolower = TRUE, language = NULL),
|
||||||
"), although it was matched for multiple antibiotics or columns.")),
|
"), although it was matched for multiple antibiotics or columns.")),
|
||||||
call. = FALSE,
|
call. = FALSE,
|
||||||
immediate. = verbose)
|
immediate. = verbose)
|
||||||
@ -210,7 +210,7 @@ get_column_abx <- function(x,
|
|||||||
}
|
}
|
||||||
|
|
||||||
generate_warning_abs_missing <- function(missing, any = FALSE) {
|
generate_warning_abs_missing <- function(missing, any = FALSE) {
|
||||||
missing <- paste0(missing, " (", ab_name(missing, tolower = TRUE), ")")
|
missing <- paste0(missing, " (", ab_name(missing, tolower = TRUE, language = NULL), ")")
|
||||||
if (any == TRUE) {
|
if (any == TRUE) {
|
||||||
any_txt <- c(" any of", "is")
|
any_txt <- c(" any of", "is")
|
||||||
} else {
|
} else {
|
||||||
|
@ -52,10 +52,10 @@ matrix:
|
|||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
# - travis_tool.sh clean_library # turn off for caching, turn on for release of new R versions
|
# - travis_tool.sh clean_library # turn off for caching, turn on for release of new R versions
|
||||||
- travis_tool.sh install_deps
|
- travis-tool.sh install_deps
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
- travis_tool.sh run_tests
|
- travis-tool.sh run_tests
|
||||||
|
|
||||||
on_failure:
|
on_failure:
|
||||||
- 7z a failure.zip *.Rcheck\*
|
- 7z a failure.zip *.Rcheck\*
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="https://msberends.gitlab.io/AMR/index.html">AMR (for R)</a>
|
<a class="navbar-link" href="https://msberends.gitlab.io/AMR/index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.1.0.9009</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.1.0.9010</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -81,7 +81,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">1.1.0.9009</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.1.0.9010</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -81,7 +81,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">1.1.0.9009</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.1.0.9010</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -81,7 +81,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">1.1.0.9009</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.1.0.9010</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -43,7 +43,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">1.1.0.9009</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.1.0.9010</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -81,7 +81,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">1.1.0.9009</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.1.0.9010</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -229,9 +229,9 @@
|
|||||||
<small>Source: <a href='https://gitlab.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
|
<small>Source: <a href='https://gitlab.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="amr-1-1-0-9009" class="section level1">
|
<div id="amr-1-1-0-9010" class="section level1">
|
||||||
<h1 class="page-header" data-toc-text="1.1.0.9009">
|
<h1 class="page-header" data-toc-text="1.1.0.9010">
|
||||||
<a href="#amr-1-1-0-9009" class="anchor"></a>AMR 1.1.0.9009<small> Unreleased </small>
|
<a href="#amr-1-1-0-9010" class="anchor"></a>AMR 1.1.0.9010<small> Unreleased </small>
|
||||||
</h1>
|
</h1>
|
||||||
<div id="last-updated-18-may-2020" class="section level2">
|
<div id="last-updated-18-may-2020" class="section level2">
|
||||||
<h2 class="hasAnchor">
|
<h2 class="hasAnchor">
|
||||||
|
@ -10,7 +10,7 @@ articles:
|
|||||||
WHONET: WHONET.html
|
WHONET: WHONET.html
|
||||||
benchmarks: benchmarks.html
|
benchmarks: benchmarks.html
|
||||||
resistance_predict: resistance_predict.html
|
resistance_predict: resistance_predict.html
|
||||||
last_built: 2020-05-18T08:29Z
|
last_built: 2020-05-18T09:07Z
|
||||||
urls:
|
urls:
|
||||||
reference: https://msberends.gitlab.io/AMR/reference
|
reference: https://msberends.gitlab.io/AMR/reference
|
||||||
article: https://msberends.gitlab.io/AMR/articles
|
article: https://msberends.gitlab.io/AMR/articles
|
||||||
|
@ -81,7 +81,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">1.1.0.9009</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.1.0.9010</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user