mirror of
https://github.com/msberends/AMR.git
synced 2026-11-16 07:10:50 +01:00
Add site to as.sir(), and use UTI breakpoints for unknown uti if no other breakpoint exists
`site` takes fixed codes, e.g. "meningitis" or "iv", and can be a column. With `site = NA`, any fitting breakpoint can apply, from most to least systemic. With a site set, breakpoints for contradicting sites are left out, while a breakpoint without a site still applies, and the result is NA if only contradicting sites exist, without falling back to PK/PD. `uti = TRUE` stays available and equals `site = "uti"`. Every choice is noted in sir_interpretation_history(), including the site that was used. For unknown `uti`, a blocking row without a UTI status no longer overrides a UTI breakpoint at the same taxonomic level. A `uti` vector mixing NA with TRUE or FALSE no longer gives an error. Veterinary sites are not part of the fixed codes yet, and are treated as breakpoints without a site.
This commit is contained in:
1 parent
5eed396dce
commit
4c4a7d4392
3 files changed
+237
-14
No files matched your search
+6
-1
@@ -55,6 +55,7 @@ is_sir_eligible(x, threshold = 0.05)
|
||||
verbose = FALSE,
|
||||
info = interactive(),
|
||||
conserve_capped_values = NULL,
|
||||
site = NULL,
|
||||
...
|
||||
)
|
||||
|
||||
@@ -76,6 +77,7 @@ is_sir_eligible(x, threshold = 0.05)
|
||||
language = get_AMR_locale(),
|
||||
verbose = FALSE,
|
||||
info = interactive(),
|
||||
site = NULL,
|
||||
...
|
||||
)
|
||||
|
||||
@@ -99,7 +101,8 @@ is_sir_eligible(x, threshold = 0.05)
|
||||
verbose = FALSE,
|
||||
info = interactive(),
|
||||
parallel = FALSE,
|
||||
conserve_capped_values = NULL
|
||||
conserve_capped_values = NULL,
|
||||
site = NULL
|
||||
)
|
||||
|
||||
sir_interpretation_history(clean = FALSE)
|
||||
@@ -179,6 +182,8 @@ The default \code{"standard"} setting ensures cautious handling of uncertain val
|
||||
|
||||
\item{conserve_capped_values}{Deprecated, use \code{capped_mic_handling} instead.}
|
||||
|
||||
\item{site}{The site or route that the isolate is interpreted for: a \link{character} vector or a column name, in the fixed codes \code{"meningitis"}, \code{"non-meningitis"}, \code{"endocarditis"}, \code{"non-endocarditis"}, \code{"pneumonia"}, \code{"non-pneumonia"}, \code{"systemic"}, \code{"extraintestinal"}, \code{"other"}, \code{"intestinal"}, \code{"skin"}, \code{"inhaled"}, \code{"oral"}, \code{"prophylaxis"}, \code{"uti"}, \code{"iv"} and \code{"topical"}, which can be combined with a comma, e.g. \code{"iv, meningitis"}. If \code{site} is \code{NA} (default), any breakpoint matching all other criteria can apply, taken from most to least systemic site in the order just given, with \code{"iv"} directly after \code{"endocarditis"}; a breakpoint without a site is taken after \code{"other"}. If \code{site} is set, a breakpoint for a contradicting site is left out, e.g. \code{"meningitis"} leaves out \code{Non-meningitis}, while a breakpoint without a site still applies. The result is \code{NA} if only contradicting sites are available, also when PK/PD breakpoints exist. All choices are noted in \code{\link[=sir_interpretation_history]{sir_interpretation_history()}}.}
|
||||
|
||||
\item{col_mo}{Column name of the names or codes of the microorganisms (see \code{\link[=as.mo]{as.mo()}}) - the default is the first column of class \code{\link{mo}}. Values will be coerced using \code{\link[=as.mo]{as.mo()}}.}
|
||||
|
||||
\item{parallel}{A \link{logical} to indicate if parallel computing must be used, defaults to \code{FALSE}. Requires the \code{\link[future.apply:future_lapply]{future.apply}} package. \strong{A non-sequential \code{\link[future:plan]{future::plan()}} must already be active before setting \code{parallel = TRUE}} — for example, \code{future::plan(future::multisession)}. An error is thrown if \code{parallel = TRUE} is used without a plan set by the user. Parallelism distributes columns (and optionally row batches) across workers; it is most beneficial when there are many antibiotic columns and a large number of rows.}
|
||||
|
||||
Reference in new issue
Block a user