1
0
mirror of https://github.com/msberends/AMR.git synced 2026-02-09 09:52:58 +01:00

(v3.0.1.9019) Wildtype/Non-wildtype support, and start with interpretive_rules()

Fixes #246
Fixes #254
Fixes #255
Fixes #256
This commit is contained in:
2026-02-08 23:15:40 +01:00
parent 2df2911cf4
commit ba4c159154
31 changed files with 394 additions and 165 deletions

View File

@@ -122,7 +122,7 @@
count_resistant <- function(..., only_all_tested = FALSE) {
tryCatch(
sir_calc(...,
ab_result = "R",
ab_result = c("R", "NWT", "NS"),
only_all_tested = only_all_tested,
only_count = TRUE
),
@@ -135,7 +135,7 @@ count_resistant <- function(..., only_all_tested = FALSE) {
count_susceptible <- function(..., only_all_tested = FALSE) {
tryCatch(
sir_calc(...,
ab_result = c("S", "SDD", "I"),
ab_result = c("S", "SDD", "I", "WT"),
only_all_tested = only_all_tested,
only_count = TRUE
),
@@ -161,7 +161,7 @@ count_S <- function(..., only_all_tested = FALSE) {
count_SI <- function(..., only_all_tested = FALSE) {
tryCatch(
sir_calc(...,
ab_result = c("S", "SDD", "I"),
ab_result = c("S", "SDD", "I", "WT"),
only_all_tested = only_all_tested,
only_count = TRUE
),
@@ -187,7 +187,7 @@ count_I <- function(..., only_all_tested = FALSE) {
count_IR <- function(..., only_all_tested = FALSE) {
tryCatch(
sir_calc(...,
ab_result = c("I", "SDD", "R"),
ab_result = c("I", "SDD", "R", "NWT"),
only_all_tested = only_all_tested,
only_count = TRUE
),
@@ -200,7 +200,7 @@ count_IR <- function(..., only_all_tested = FALSE) {
count_R <- function(..., only_all_tested = FALSE) {
tryCatch(
sir_calc(...,
ab_result = "R",
ab_result = c("R", "NWT", "NS"),
only_all_tested = only_all_tested,
only_count = TRUE
),
@@ -213,7 +213,7 @@ count_R <- function(..., only_all_tested = FALSE) {
count_all <- function(..., only_all_tested = FALSE) {
tryCatch(
sir_calc(...,
ab_result = c("S", "SDD", "I", "R", "NI"),
ab_result = VALID_SIR_LEVELS,
only_all_tested = only_all_tested,
only_count = TRUE
),