mirror of
https://github.com/msberends/AMR.git
synced 2025-07-09 06:02:01 +02:00
cfta streptococci, codecov.yml
This commit is contained in:
@ -24,6 +24,8 @@ Ordered factor with new class \code{rsi}
|
||||
This transforms a vector to a new class \code{rsi}, which is an ordered factor with levels \code{S < I < R}. Invalid antimicrobial interpretations will be translated as \code{NA} with a warning.
|
||||
}
|
||||
\details{
|
||||
\strong{NOTE:} This function does not translate MIC values to RSI values. If more than 50\% of the input resembles MIC values, it will warn about this.\cr You can use \code{\link{eucast_rules}} to (1) apply inferred susceptibility and resistance based on results of other antibiotics and (2) apply intrinsic resistance based on taxonomic properties of a microorganism.
|
||||
|
||||
The function \code{is.rsi.eligible} returns \code{TRUE} when a columns contains only valid antimicrobial interpretations (S and/or I and/or R), and \code{FALSE} otherwise.
|
||||
}
|
||||
\section{Read more on our website!}{
|
||||
|
@ -82,6 +82,8 @@ The input of \code{tbl_}, possibly with edited values of antibiotics. Or, if \co
|
||||
Apply susceptibility rules as defined by the European Committee on Antimicrobial Susceptibility Testing (EUCAST, \url{http://eucast.org}), see \emph{Source}. This includes (1) expert rules, (2) intrinsic resistance and (3) inferred resistance as defined in their breakpoint tables.
|
||||
}
|
||||
\details{
|
||||
\strong{NOTE:} This function does not translate MIC values to RSI values. It only applies (1) inferred susceptibility and resistance based on results of other antibiotics and (2) intrinsic resistance based on taxonomic properties of a microorganism.
|
||||
|
||||
The file used for applying all EUCAST rules can be retrieved with \code{\link{eucast_rules_file}()}. It returns an easily readable data set containing all rules. The original TSV file (tab separated file) that is being read by this function can be found when running this command: \cr
|
||||
\code{AMR::EUCAST_RULES_FILE_LOCATION} (without brackets).
|
||||
|
||||
|
@ -68,7 +68,7 @@ Determine first (weighted) isolates of all microorganisms of every patient per e
|
||||
\strong{WHY THIS IS SO IMPORTANT} \cr
|
||||
To conduct an analysis of antimicrobial resistance, you should only include the first isolate of every patient per episode \href{https://www.ncbi.nlm.nih.gov/pubmed/17304462}{[1]}. If you would not do this, you could easily get an overestimate or underestimate of the resistance of an antibiotic. Imagine that a patient was admitted with an MRSA and that it was found in 5 different blood cultures the following week. The resistance percentage of oxacillin of all \emph{S. aureus} isolates would be overestimated, because you included this MRSA more than once. It would be \href{https://en.wikipedia.org/wiki/Selection_bias}{selection bias}.
|
||||
|
||||
The function \code{filter_first_isolate} is essentially equal to:
|
||||
The functions \code{filter_first_isolate} and \code{filter_first_weighted_isolate} are helper functions to quickly filter on first isolates. The function \code{filter_first_isolate} is essentially equal to:
|
||||
\preformatted{
|
||||
tbl \%>\%
|
||||
mutate(only_firsts = first_isolate(tbl, ...)) \%>\%
|
||||
@ -90,10 +90,10 @@ The function \code{filter_first_weighted_isolate} is essentially equal to:
|
||||
There are two ways to determine whether isolates can be included as first \emph{weighted} isolates which will give generally the same results: \cr
|
||||
|
||||
\strong{1. Using} \code{type = "keyantibiotics"} \strong{and parameter} \code{ignore_I} \cr
|
||||
Any difference from S to R (or vice versa) will (re)select an isolate as a first weighted isolate. With \code{ignore_I = FALSE}, also differences from I to S|R (or vice versa) will lead to this. This is a reliable method and 30-35 times faster than method 2. \cr
|
||||
Any difference from S to R (or vice versa) will (re)select an isolate as a first weighted isolate. With \code{ignore_I = FALSE}, also differences from I to S|R (or vice versa) will lead to this. This is a reliable method and 30-35 times faster than method 2. Read more about this in the \code{\link{key_antibiotics}} function. \cr
|
||||
|
||||
\strong{2. Using} \code{type = "points"} \strong{and parameter} \code{points_threshold} \cr
|
||||
A difference from I to S|R (or vice versa) means 0.5 points, a difference from S to R (or vice versa) means 1 point. When the sum of points exceeds \code{points_threshold}, an isolate will be (re)selected as a first weighted isolate.
|
||||
A difference from I to S|R (or vice versa) means 0.5 points, a difference from S to R (or vice versa) means 1 point. When the sum of points exceeds \code{points_threshold}, which default to \code{2}, an isolate will be (re)selected as a first weighted isolate.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
@ -135,8 +135,8 @@ B <- septic_patients \%>\%
|
||||
|
||||
# Have a look at A and B.
|
||||
# B is more reliable because every isolate is only counted once.
|
||||
# Gentamicin resitance in hospital D appears to be 5.4\% higher than
|
||||
# when you (erroneously) would have used all isolates!
|
||||
# Gentamicin resitance in hospital D appears to be 3.1\% higher than
|
||||
# when you (erroneously) would have used all isolates for analysis.
|
||||
|
||||
|
||||
## OTHER EXAMPLES:
|
||||
|
@ -68,10 +68,10 @@ The function \code{key_antibiotics} returns a character vector with 12 antibioti
|
||||
There are two ways to determine whether isolates can be included as first \emph{weighted} isolates which will give generally the same results: \cr
|
||||
|
||||
\strong{1. Using} \code{type = "keyantibiotics"} \strong{and parameter} \code{ignore_I} \cr
|
||||
Any difference from S to R (or vice versa) will (re)select an isolate as a first weighted isolate. With \code{ignore_I = FALSE}, also differences from I to S|R (or vice versa) will lead to this. This is a reliable method and 30-35 times faster than method 2. \cr
|
||||
Any difference from S to R (or vice versa) will (re)select an isolate as a first weighted isolate. With \code{ignore_I = FALSE}, also differences from I to S|R (or vice versa) will lead to this. This is a reliable method and 30-35 times faster than method 2. Read more about this in the \code{\link{key_antibiotics}} function. \cr
|
||||
|
||||
\strong{2. Using} \code{type = "points"} \strong{and parameter} \code{points_threshold} \cr
|
||||
A difference from I to S|R (or vice versa) means 0.5 points, a difference from S to R (or vice versa) means 1 point. When the sum of points exceeds \code{points_threshold}, an isolate will be (re)selected as a first weighted isolate.
|
||||
A difference from I to S|R (or vice versa) means 0.5 points, a difference from S to R (or vice versa) means 1 point. When the sum of points exceeds \code{points_threshold}, which default to \code{2}, an isolate will be (re)selected as a first weighted isolate.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
|
@ -37,7 +37,7 @@ mdro(tbl, country = NULL, col_mo = NULL, info = TRUE,
|
||||
teic = guess_ab_col(), tetr = guess_ab_col(),
|
||||
tica = guess_ab_col(), tige = guess_ab_col(),
|
||||
tobr = guess_ab_col(), trim = guess_ab_col(),
|
||||
trsu = guess_ab_col(), vanc = guess_ab_col())
|
||||
trsu = guess_ab_col(), vanc = guess_ab_col(), verbose = FALSE)
|
||||
|
||||
brmo(..., country = "nl")
|
||||
|
||||
@ -174,6 +174,8 @@ eucast_exceptional_phenotypes(tbl, country = "EUCAST", ...)
|
||||
|
||||
\item{vanc}{column name of an antibiotic, see Antibiotics}
|
||||
|
||||
\item{verbose}{print additional info: missing antibiotic columns per parameter}
|
||||
|
||||
\item{...}{parameters that are passed on to methods}
|
||||
}
|
||||
\value{
|
||||
@ -183,7 +185,7 @@ Ordered factor with levels \code{Negative < Positive, unconfirmed < Positive}.
|
||||
Determine which isolates are multidrug-resistant organisms (MDRO) according to country-specific guidelines.
|
||||
}
|
||||
\details{
|
||||
When \code{country} will be left blank, guidelines will be taken from EUCAST Expert Rules Version 3.1 "Intrinsic Resistance and Exceptional Phenotypes Tables" (\url{http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/Expert_rules_intrinsic_exceptional_V3.1.pdf}).
|
||||
When \code{country} will be left blank, guidelines will be taken from EUCAST Expert Rules Version 3.1 "Intrinsic Resistance and Exceptional Phenotypes Tables" (\href{http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/Expert_rules_intrinsic_exceptional_V3.1.pdf}{link}).
|
||||
}
|
||||
\section{Antibiotics}{
|
||||
|
||||
|
Reference in New Issue
Block a user