diff --git a/DESCRIPTION b/DESCRIPTION index d25d3fb6..9ae2f8ce 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR -Version: 0.7.1.9103 -Date: 2019-10-11 +Version: 0.7.1.9104 +Date: 2019-10-12 Title: Antimicrobial Resistance Analysis Authors@R: c( person(role = c("aut", "cre"), diff --git a/NEWS.md b/NEWS.md index c21587b0..1506ee0f 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,5 @@ -# AMR 0.7.1.9103 -Last updated: 11-Oct-2019 +# AMR 0.7.1.9104 +Last updated: 12-Oct-2019 ### Breaking * Determination of first isolates now **excludes** all 'unknown' microorganisms at default, i.e. microbial code `"UNKNOWN"`. They can be included with the new parameter `include_unknown`: diff --git a/docs/404.html b/docs/404.html index f5f2c53d..06b98a56 100644 --- a/docs/404.html +++ b/docs/404.html @@ -84,7 +84,7 @@
diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 4e983b33..460d4d35 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -84,7 +84,7 @@ diff --git a/docs/articles/AMR.html b/docs/articles/AMR.html index cb697ca1..4cc6940c 100644 --- a/docs/articles/AMR.html +++ b/docs/articles/AMR.html @@ -41,7 +41,7 @@ @@ -187,7 +187,7 @@AMR.Rmd
Note: values on this page will change with every website update since they are based on randomly created values and the page was written in R Markdown. However, the methodology remains unchanged. This page was generated on 07 October 2019.
+Note: values on this page will change with every website update since they are based on randomly created values and the page was written in R Markdown. However, the methodology remains unchanged. This page was generated on 12 October 2019.
So, we can draw at least two conclusions immediately. From a data scientists perspective, the data looks clean: only values M
and F
. From a researchers perspective: there are slightly more men. Nothing we didn’t already know.
The data is already quite clean, but we still need to transform some variables. The bacteria
column now consists of text, and we want to add more variables based on microbial IDs later on. So, we will transform this column to valid IDs. The mutate()
function of the dplyr
package makes this really easy:
data <- data %>%
@@ -438,14 +438,14 @@
# Pasteurella multocida (no changes)
# Staphylococcus (no changes)
# Streptococcus groups A, B, C, G (no changes)
-# Streptococcus pneumoniae (1,466 values changed)
+# Streptococcus pneumoniae (1,411 values changed)
# Viridans group streptococci (no changes)
#
# EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes (v3.1, 2016)
-# Table 01: Intrinsic resistance in Enterobacteriaceae (1,304 values changed)
+# Table 01: Intrinsic resistance in Enterobacteriaceae (1,351 values changed)
# Table 02: Intrinsic resistance in non-fermentative Gram-negative bacteria (no changes)
# Table 03: Intrinsic resistance in other Gram-negative bacteria (no changes)
-# Table 04: Intrinsic resistance in Gram-positive bacteria (2,787 values changed)
+# Table 04: Intrinsic resistance in Gram-positive bacteria (2,698 values changed)
# Table 08: Interpretive rules for B-lactam agents and Gram-positive cocci (no changes)
# Table 09: Interpretive rules for B-lactam agents and Gram-negative rods (no changes)
# Table 11: Interpretive rules for macrolides, lincosamides, and streptogramins (no changes)
@@ -453,24 +453,24 @@
# Table 13: Interpretive rules for quinolones (no changes)
#
# Other rules
-# Non-EUCAST: amoxicillin/clav acid = S where ampicillin = S (2,243 values changed)
-# Non-EUCAST: ampicillin = R where amoxicillin/clav acid = R (114 values changed)
+# Non-EUCAST: amoxicillin/clav acid = S where ampicillin = S (2,150 values changed)
+# Non-EUCAST: ampicillin = R where amoxicillin/clav acid = R (105 values changed)
# Non-EUCAST: piperacillin = R where piperacillin/tazobactam = R (no changes)
# Non-EUCAST: piperacillin/tazobactam = S where piperacillin = S (no changes)
# Non-EUCAST: trimethoprim = R where trimethoprim/sulfa = R (no changes)
# Non-EUCAST: trimethoprim/sulfa = S where trimethoprim = S (no changes)
#
# --------------------------------------------------------------------------
-# EUCAST rules affected 6,571 out of 20,000 rows, making a total of 7,914 edits
+# EUCAST rules affected 6,413 out of 20,000 rows, making a total of 7,715 edits
# => added 0 test results
#
-# => changed 7,914 test results
-# - 104 test results changed from S to I
-# - 4,762 test results changed from S to R
-# - 1,059 test results changed from I to S
-# - 331 test results changed from I to R
-# - 1,638 test results changed from R to S
-# - 20 test results changed from R to I
+# => changed 7,715 test results
+# - 108 test results changed from S to I
+# - 4,673 test results changed from S to R
+# - 1,037 test results changed from I to S
+# - 329 test results changed from I to R
+# - 1,546 test results changed from R to S
+# - 22 test results changed from R to I
# --------------------------------------------------------------------------
#
# Use eucast_rules(..., verbose = TRUE) (on your original data) to get a data.frame with all specified edits instead.
So only 28.5% is suitable for resistance analysis! We can now filter on it with the filter()
function, also from the dplyr
package:
So only 28.4% is suitable for resistance analysis! We can now filter on it with the filter()
function, also from the dplyr
package:
For future use, the above two syntaxes can be shortened with the filter_first_isolate()
function:
We made a slight twist to the CLSI algorithm, to take into account the antimicrobial susceptibility profile. Have a look at all isolates of patient E8, sorted on date:
+We made a slight twist to the CLSI algorithm, to take into account the antimicrobial susceptibility profile. Have a look at all isolates of patient A2, sorted on date:
isolate | @@ -525,19 +525,19 @@|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | -2010-01-14 | -E8 | +2010-02-02 | +A2 | B_ESCHR_COLI | -S | -S | R | S | +S | +S | TRUE | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | -2010-03-24 | -E8 | +2010-02-28 | +A2 | B_ESCHR_COLI | S | S | @@ -547,8 +547,8 @@||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3 | -2010-05-23 | -E8 | +2010-03-02 | +A2 | B_ESCHR_COLI | S | S | @@ -558,10 +558,10 @@||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4 | -2010-08-30 | -E8 | +2010-03-08 | +A2 | B_ESCHR_COLI | -S | +R | S | S | S | @@ -569,8 +569,8 @@|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5 | -2010-09-04 | -E8 | +2010-05-16 | +A2 | B_ESCHR_COLI | R | R | @@ -580,10 +580,10 @@||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6 | -2010-09-14 | -E8 | +2010-09-25 | +A2 | B_ESCHR_COLI | -R | +S | S | S | S | @@ -591,10 +591,10 @@|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
7 | -2010-10-02 | -E8 | +2011-01-03 | +A2 | B_ESCHR_COLI | -S | +R | S | R | S | @@ -602,32 +602,32 @@|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
8 | -2011-01-01 | -E8 | +2011-01-21 | +A2 | B_ESCHR_COLI | -S | -S | +R | +R | S | S | FALSE | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
9 | -2011-02-10 | -E8 | +2011-05-24 | +A2 | B_ESCHR_COLI | S | S | -S | +R | S | TRUE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10 | -2011-03-11 | -E8 | +2011-06-13 | +A2 | B_ESCHR_COLI | -S | +R | S | S | S | @@ -645,8 +645,8 @@ # NOTE: Using column `date` as input for `col_date`. # NOTE: Using column `patient_id` as input for `col_patient_id`. # NOTE: Using column `keyab` as input for `col_keyantibiotics`. Use col_keyantibiotics = FALSE to prevent this. -# [Criterion] Inclusion based on key antibiotics, ignoring I. -# => Found 15,087 first weighted isolates (75.4% of total) +# [Criterion] Inclusion based on key antibiotics, ignoring I +# => Found 15,216 first weighted isolates (76.1% of total)
isolate | @@ -663,20 +663,20 @@|||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | -2010-01-14 | -E8 | +2010-02-02 | +A2 | B_ESCHR_COLI | -S | -S | R | S | +S | +S | TRUE | TRUE |
2 | -2010-03-24 | -E8 | +2010-02-28 | +A2 | B_ESCHR_COLI | S | S | @@ -687,8 +687,8 @@||||||
3 | -2010-05-23 | -E8 | +2010-03-02 | +A2 | B_ESCHR_COLI | S | S | @@ -699,20 +699,20 @@||||||
4 | -2010-08-30 | -E8 | +2010-03-08 | +A2 | B_ESCHR_COLI | -S | +R | S | S | S | FALSE | -FALSE | +TRUE |
5 | -2010-09-04 | -E8 | +2010-05-16 | +A2 | B_ESCHR_COLI | R | R | @@ -723,10 +723,10 @@||||||
6 | -2010-09-14 | -E8 | +2010-09-25 | +A2 | B_ESCHR_COLI | -R | +S | S | S | S | @@ -735,10 +735,10 @@|||
7 | -2010-10-02 | -E8 | +2011-01-03 | +A2 | B_ESCHR_COLI | -S | +R | S | R | S | @@ -747,11 +747,11 @@|||
8 | -2011-01-01 | -E8 | +2011-01-21 | +A2 | B_ESCHR_COLI | -S | -S | +R | +R | S | S | FALSE | @@ -759,35 +759,35 @@|
9 | -2011-02-10 | -E8 | +2011-05-24 | +A2 | B_ESCHR_COLI | S | S | -S | +R | S | TRUE | TRUE | |
10 | -2011-03-11 | -E8 | +2011-06-13 | +A2 | B_ESCHR_COLI | -S | +R | S | S | S | FALSE | -FALSE | +TRUE |
Instead of 2, now 7 isolates are flagged. In total, 75.4% of all isolates are marked ‘first weighted’ - 47.0% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.
+Instead of 2, now 9 isolates are flagged. In total, 76.1% of all isolates are marked ‘first weighted’ - 47.7% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.
As with filter_first_isolate()
, there’s a shortcut for this new algorithm too:
So we end up with 15,087 isolates for analysis.
+So we end up with 15,216 isolates for analysis.
We can remove unneeded columns:
@@ -813,15 +813,15 @@Frequency table
Class: character
-Length: 15,087 (of which NA: 0 = 0%)
+Length: 15,216 (of which NA: 0 = 0%)
Unique: 4
Shortest: 16
Longest: 24
The functions portion_S()
, portion_SI()
, portion_I()
, portion_IR()
and portion_R()
can be used to determine the portion of a specific antimicrobial outcome. As per the EUCAST guideline of 2019, we calculate resistance as the portion of R (portion_R()
) and susceptibility as the portion of S and I (portion_SI()
). These functions can be used on their own:
Or can be used in conjuction with group_by()
and summarise()
, both from the dplyr
package:
data_1st %>%
group_by(hospital) %>%
@@ -993,19 +993,19 @@ Longest: 24
Hospital A
-0.4725537
+0.4673913
Hospital B
-0.4704871
+0.4702744
Hospital C
-0.4684529
+0.4699524
Hospital D
-0.4749061
+0.4635025
Last updated: 11-Oct-2019
+Last updated: 12-Oct-2019
as.mo(..., allow_uncertain = 3)
Contents