diff --git a/DESCRIPTION b/DESCRIPTION index 65ee3f40..e42345af 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR -Version: 0.7.1.9066 -Date: 2019-08-27 +Version: 0.7.1.9067 +Date: 2019-08-28 Title: Antimicrobial Resistance Analysis Authors@R: c( person(role = c("aut", "cre"), diff --git a/NEWS.md b/NEWS.md index 6d157a75..b75b7874 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 0.7.1.9066 +# AMR 0.7.1.9067 ### 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/R/first_isolate.R b/R/first_isolate.R index a49bb844..0d9af640 100755 --- a/R/first_isolate.R +++ b/R/first_isolate.R @@ -496,7 +496,7 @@ first_isolate <- function(x, big.mark <- ifelse(decimal.mark != ",", ",", ".") # handle empty microorganisms - if (any(all_first$newvar_mo == "UNKNOWN", na.rm = TRUE)) { + if (any(all_first$newvar_mo == "UNKNOWN", na.rm = TRUE) & info == TRUE) { if (include_unknown == TRUE) { message(blue(paste0("NOTE: Included ", format(sum(all_first$newvar_mo == "UNKNOWN"), decimal.mark = decimal.mark, big.mark = big.mark), @@ -511,7 +511,7 @@ first_isolate <- function(x, all_first[which(all_first$newvar_mo == "UNKNOWN"), 'real_first_isolate'] <- include_unknown # exclude all NAs - if (any(is.na(all_first$newvar_mo))) { + if (any(is.na(all_first$newvar_mo)) & info == TRUE) { message(blue(paste0("NOTE: Excluded ", format(sum(is.na(all_first$newvar_mo)), decimal.mark = decimal.mark, big.mark = big.mark), ' isolates with a microbial ID "NA" (column `', bold(col_mo), '`).'))) diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 37891d44..6c5db214 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -78,7 +78,7 @@ AMR (for R) - 0.7.1.9066 + 0.7.1.9067 diff --git a/docs/articles/AMR.html b/docs/articles/AMR.html index 14fbcb40..74153215 100644 --- a/docs/articles/AMR.html +++ b/docs/articles/AMR.html @@ -40,7 +40,7 @@ AMR (for R) - 0.7.1.9063 + 0.7.1.9067 @@ -185,7 +185,7 @@

How to conduct AMR analysis

Matthijs S. Berends

-

27 August 2019

+

28 August 2019

@@ -194,7 +194,7 @@ -

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 27 August 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 28 August 2019.

Introduction

@@ -210,21 +210,21 @@ -2019-08-27 +2019-08-28 abcd Escherichia coli S S -2019-08-27 +2019-08-28 abcd Escherichia coli S R -2019-08-27 +2019-08-28 efgh Escherichia coli R @@ -320,71 +320,71 @@ -2014-06-23 -O4 -Hospital A +2017-06-03 +E4 +Hospital D Escherichia coli S S +R S -S -F +M -2016-10-05 -W5 -Hospital A -Escherichia coli -R -S -S -S -F - - -2017-12-26 -S8 -Hospital A -Escherichia coli -S -R -R -R -F - - -2011-11-26 -Z1 +2015-02-25 +J4 Hospital A Streptococcus pneumoniae -S -S -S -S -F - - -2014-04-03 -Y7 -Hospital B -Escherichia coli -S -I -S -S -F - - -2012-06-06 -F9 -Hospital B -Escherichia coli -S +R S S S M + +2014-08-28 +F7 +Hospital B +Staphylococcus aureus +S +R +S +S +M + + +2011-12-16 +U7 +Hospital A +Staphylococcus aureus +S +S +R +S +F + + +2015-02-09 +C8 +Hospital A +Escherichia coli +R +I +S +S +M + + +2014-11-26 +Y5 +Hospital C +Escherichia coli +S +R +S +S +F +

Now, let’s start the cleaning and the analysis!

@@ -406,8 +406,8 @@ # # Item Count Percent Cum. Count Cum. Percent # --- ----- ------- -------- ----------- ------------- -# 1 M 10,514 52.6% 10,514 52.6% -# 2 F 9,486 47.4% 20,000 100.0% +# 1 M 10,360 51.8% 10,360 51.8% +# 2 F 9,640 48.2% 20,000 100.0%

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 %>%
@@ -437,14 +437,14 @@
 # Pasteurella multocida (no changes)
 # Staphylococcus (no changes)
 # Streptococcus groups A, B, C, G (no changes)
-# Streptococcus pneumoniae (1,504 values changed)
+# Streptococcus pneumoniae (1,477 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,298 values changed)
+# Table 01: Intrinsic resistance in Enterobacteriaceae (1,306 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,705 values changed)
+# Table 04: Intrinsic resistance in Gram-positive bacteria (2,760 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)
@@ -452,24 +452,24 @@
 # Table 13: Interpretive rules for quinolones (no changes)
 # 
 # Other rules
-# Non-EUCAST: amoxicillin/clav acid = S where ampicillin = S (2,323 values changed)
-# Non-EUCAST: ampicillin = R where amoxicillin/clav acid = R (118 values changed)
+# Non-EUCAST: amoxicillin/clav acid = S where ampicillin = S (2,250 values changed)
+# Non-EUCAST: ampicillin = R where amoxicillin/clav acid = R (100 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,559 out of 20,000 rows, making a total of 7,948 edits
+# EUCAST rules affected 6,548 out of 20,000 rows, making a total of 7,893 edits
 # => added 0 test results
 # 
-# => changed 7,948 test results
-#    - 115 test results changed from S to I
-#    - 4,723 test results changed from S to R
-#    - 1,098 test results changed from I to S
-#    - 338 test results changed from I to R
-#    - 1,648 test results changed from R to S
-#    - 26 test results changed from R to I
+# => changed 7,893 test results
+#    - 102 test results changed from S to I
+#    - 4,732 test results changed from S to R
+#    - 1,108 test results changed from I to S
+#    - 328 test results changed from I to R
+#    - 1,603 test results changed from R to S
+#    - 20 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.
@@ -497,7 +497,7 @@ # NOTE: Using column `bacteria` as input for `col_mo`. # NOTE: Using column `date` as input for `col_date`. # NOTE: Using column `patient_id` as input for `col_patient_id`. -# => Found 5,672 first isolates (28.4% of total)
+# => Found 5,693 first isolates (28.5% of total)

So only is suitable for resistance analysis! We can now filter on it with the filter() function, also from the dplyr package:

data_1st <- data %>% 
   filter(first == TRUE)
@@ -508,7 +508,7 @@

First weighted isolates

-

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 K7, 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 Q3, sorted on date:

@@ -524,43 +524,43 @@ - - + + + - - + - - + + - - + + - - + + - + - - + + - + @@ -568,8 +568,19 @@ - - + + + + + + + + + + + + + @@ -577,21 +588,10 @@ - - - - - - - - - - - - - + + @@ -601,30 +601,30 @@ - - + + + + + + + + + + + + + - - - - - - - - - - - - - + + @@ -645,7 +645,7 @@ # 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,107 first weighted isolates (75.5% of total) +# => Found 15,134 first weighted isolates (75.7% of total)
isolate
12010-02-15K72010-01-10Q3 B_ESCHR_COLR SSSR S TRUE
22010-03-24K72010-03-10Q3 B_ESCHR_COLRRSS R S FALSE
32010-06-05K72010-04-30Q3 B_ESCHR_COL R SRS S FALSE
42010-07-16K72010-07-02Q3 B_ESCHR_COLIR S S S
52010-09-22K72010-10-10Q3B_ESCHR_COLSSRSFALSE
62010-11-26Q3 B_ESCHR_COL R SS FALSE
62011-01-18K7B_ESCHR_COLSSSSFALSE
72011-01-26K72011-01-09Q3 B_ESCHR_COL S S
82011-02-11K72011-02-01Q3 B_ESCHR_COL R SRSTRUE
92011-03-20Q3B_ESCHR_COLSS S S FALSE
92011-02-17K7B_ESCHR_COLISSSTRUE
102011-04-01K72011-08-04Q3 B_ESCHR_COL S S
@@ -662,23 +662,23 @@ - - + + + - - + - - + + - - + + @@ -686,32 +686,20 @@ - - + + - + - - - - - - - - - - - - - - + + @@ -720,13 +708,25 @@ - - - - + + + + + + + + + + + + + + + + @@ -734,44 +734,44 @@ - - + + - + - - + + + - - + - - + + - - + + - - + + @@ -782,11 +782,11 @@
isolate
12010-02-15K72010-01-10Q3 B_ESCHR_COLR SSSR S TRUE TRUE
22010-03-24K72010-03-10Q3 B_ESCHR_COLRRSS R S FALSE
32010-06-05K72010-04-30Q3 B_ESCHR_COL R SRS S FALSE TRUE
42010-07-16K7B_ESCHR_COLISSSFALSETRUE
52010-09-22K72010-07-02Q3 B_ESCHR_COL R SFALSE FALSE
62011-01-18K7
52010-10-10Q3 B_ESCHR_COL S SRSFALSETRUE
62010-11-26Q3B_ESCHR_COLRS S S FALSE
72011-01-26K72011-01-09Q3 B_ESCHR_COL S S S S FALSEFALSETRUE
82011-02-11K72011-02-01Q3 B_ESCHR_COL R SR SSFALSETRUE TRUE
92011-02-17K72011-03-20Q3 B_ESCHR_COLI S S STRUESFALSE TRUE
102011-04-01K72011-08-04Q3 B_ESCHR_COL S S
-

Instead of 2, now 7 isolates are flagged. In total, of all isolates are marked ‘first weighted’ - 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 8 isolates are flagged. In total, of all isolates are marked ‘first weighted’ - 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:

data_1st <- data %>% 
   filter_first_weighted_isolate()
-

So we end up with 15,107 isolates for analysis.

+

So we end up with 15,134 isolates for analysis.

We can remove unneeded columns:

data_1st <- data_1st %>% 
   select(-c(first, keyab))
@@ -812,15 +812,15 @@ 1 -2014-06-23 -O4 -Hospital A +2017-06-03 +E4 +Hospital D B_ESCHR_COL S S +R S -S -F +M Gram-negative Escherichia coli @@ -828,41 +828,41 @@ 2 -2016-10-05 -W5 +2015-02-25 +J4 Hospital A -B_ESCHR_COL +B_STRPT_PNE +R R S -S -S -F -Gram-negative -Escherichia -coli +R +M +Gram-positive +Streptococcus +pneumoniae TRUE -3 -2017-12-26 -S8 +4 +2011-12-16 +U7 Hospital A -B_ESCHR_COL +B_STPHY_AUR S S R -R +S F -Gram-negative -Escherichia -coli +Gram-positive +Staphylococcus +aureus TRUE -5 -2014-04-03 -Y7 -Hospital B +6 +2014-11-26 +Y5 +Hospital C B_ESCHR_COL S S @@ -876,29 +876,29 @@ 7 -2011-05-16 -I8 -Hospital D -B_KLBSL_PNE +2010-08-09 +C5 +Hospital B +B_ESCHR_COL +S +S +S R -S -S -S M Gram-negative -Klebsiella -pneumoniae +Escherichia +coli TRUE 8 -2014-12-28 -Z2 +2011-07-24 +W6 Hospital B B_STPHY_AUR +R S -S -S +R S F Gram-positive @@ -925,7 +925,7 @@
data_1st %>% freq(genus, species)

Frequency table

Class: character
-Length: 15,107 (of which NA: 0 = 0.00%)
+Length: 15,134 (of which NA: 0 = 0.00%)
Unique: 4

Shortest: 16
Longest: 24

@@ -942,33 +942,33 @@ Longest: 24

1 Escherichia coli -7,471 -49.5% -7,471 -49.5% +7,330 +48.4% +7,330 +48.4% 2 Staphylococcus aureus -3,789 -25.1% -11,260 -74.5% +3,816 +25.2% +11,146 +73.6% 3 Streptococcus pneumoniae -2,296 -15.2% -13,556 -89.7% +2,386 +15.8% +13,532 +89.4% 4 Klebsiella pneumoniae -1,551 -10.3% -15,107 +1,602 +10.6% +15,134 100.0% @@ -979,7 +979,7 @@ Longest: 24

Resistance percentages

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:

data_1st %>% portion_R(AMX)
-# [1] 0.4685245
+# [1] 0.4649795

Or can be used in conjuction with group_by() and summarise(), both from the dplyr package:

data_1st %>% 
   group_by(hospital) %>% 
@@ -992,19 +992,19 @@ Longest: 24

Hospital A -0.4686054 +0.4684865 Hospital B -0.4644004 +0.4595616 Hospital C -0.4821269 +0.4685616 Hospital D -0.4655684 +0.4664897 @@ -1022,23 +1022,23 @@ Longest: 24

Hospital A -0.4686054 -4539 +0.4684865 +4506 Hospital B -0.4644004 -5295 +0.4595616 +5292 Hospital C -0.4821269 -2238 +0.4685616 +2322 Hospital D -0.4655684 -3035 +0.4664897 +3014 @@ -1058,27 +1058,27 @@ Longest: 24

Escherichia -0.9243742 -0.8933208 -0.9950475 +0.9289222 +0.8896317 +0.9924966 Klebsiella -0.8149581 -0.8884591 -0.9787234 +0.8021223 +0.9082397 +0.9812734 Staphylococcus -0.9192399 -0.9160728 -0.9912906 +0.9263627 +0.9129979 +0.9900419 Streptococcus -0.5997387 +0.6240570 0.0000000 -0.5997387 +0.6240570 diff --git a/docs/articles/AMR_files/figure-html/plot 1-1.png b/docs/articles/AMR_files/figure-html/plot 1-1.png index 6487c708..efb2ed1a 100644 Binary files a/docs/articles/AMR_files/figure-html/plot 1-1.png and b/docs/articles/AMR_files/figure-html/plot 1-1.png differ diff --git a/docs/articles/AMR_files/figure-html/plot 3-1.png b/docs/articles/AMR_files/figure-html/plot 3-1.png index aa497f96..d19dbaf0 100644 Binary files a/docs/articles/AMR_files/figure-html/plot 3-1.png and b/docs/articles/AMR_files/figure-html/plot 3-1.png differ diff --git a/docs/articles/AMR_files/figure-html/plot 4-1.png b/docs/articles/AMR_files/figure-html/plot 4-1.png index d2a79de1..d158321c 100644 Binary files a/docs/articles/AMR_files/figure-html/plot 4-1.png and b/docs/articles/AMR_files/figure-html/plot 4-1.png differ diff --git a/docs/articles/AMR_files/figure-html/plot 5-1.png b/docs/articles/AMR_files/figure-html/plot 5-1.png index b6ae7075..dd02ed77 100644 Binary files a/docs/articles/AMR_files/figure-html/plot 5-1.png and b/docs/articles/AMR_files/figure-html/plot 5-1.png differ diff --git a/docs/articles/benchmarks.html b/docs/articles/benchmarks.html index ce172125..4b8a57ff 100644 --- a/docs/articles/benchmarks.html +++ b/docs/articles/benchmarks.html @@ -40,7 +40,7 @@ AMR (for R) - 0.7.1.9063 + 0.7.1.9067
@@ -185,7 +185,7 @@

Benchmarks

Matthijs S. Berends

-

27 August 2019

+

28 August 2019

@@ -210,14 +210,14 @@ times = 10) print(S.aureus, unit = "ms", signif = 2) # Unit: milliseconds -# expr min lq mean median uq max neval -# as.mo("sau") 8.1 8.1 8.3 8.3 8.4 8.6 10 -# as.mo("stau") 31.0 31.0 48.0 40.0 48.0 130.0 10 -# as.mo("staaur") 8.1 8.3 10.0 8.4 8.6 24.0 10 -# as.mo("STAAUR") 8.1 8.1 12.0 8.4 9.2 28.0 10 -# as.mo("S. aureus") 22.0 23.0 26.0 23.0 24.0 40.0 10 -# as.mo("S. aureus") 22.0 23.0 23.0 23.0 23.0 24.0 10 -# as.mo("Staphylococcus aureus") 3.6 3.8 4.0 3.9 4.0 5.2 10
+# expr min lq mean median uq max neval +# as.mo("sau") 8.4 8.5 16.0 9.7 25.0 27 10 +# as.mo("stau") 31.0 31.0 33.0 31.0 33.0 49 10 +# as.mo("staaur") 8.1 8.3 13.0 8.5 23.0 24 10 +# as.mo("STAAUR") 8.2 8.5 9.1 8.9 9.4 11 10 +# as.mo("S. aureus") 22.0 22.0 23.0 23.0 23.0 24 10 +# as.mo("S. aureus") 22.0 23.0 34.0 23.0 24.0 110 10 +# as.mo("Staphylococcus aureus") 3.8 3.9 5.0 4.0 4.3 12 10

In the table above, all measurements are shown in milliseconds (thousands of seconds). A value of 5 milliseconds means it can determine 200 input values per second. It case of 100 milliseconds, this is only 10 input values per second. The second input is the only one that has to be looked up thoroughly. All the others are known codes (the first one is a WHONET code) or common laboratory codes, or common full organism names like the last one. Full organism names are always preferred.

To achieve this speed, the as.mo function also takes into account the prevalence of human pathogenic microorganisms. The downside is of course that less prevalent microorganisms will be determined less fast. See this example for the ID of Thermus islandicus (B_THERMS_ISL), a bug probably never found before in humans:

T.islandicus <- microbenchmark(as.mo("theisl"),
@@ -229,12 +229,12 @@
 print(T.islandicus, unit = "ms", signif = 2)
 # Unit: milliseconds
 #                         expr min  lq mean median  uq max neval
-#              as.mo("theisl") 260 270  280    280 290 300    10
-#              as.mo("THEISL") 260 280  300    290 300 370    10
-#       as.mo("T. islandicus") 130 140  140    140 150 150    10
-#      as.mo("T.  islandicus") 130 130  130    130 140 150    10
-#  as.mo("Thermus islandicus")  47  48   53     50  52  71    10
-

That takes 9.6 times as much time on average. A value of 100 milliseconds means it can only determine ~10 different input values per second. We can conclude that looking up arbitrary codes of less prevalent microorganisms is the worst way to go, in terms of calculation performance. Full names (like Thermus islandicus) are almost fast - these are the most probable input from most data sets.

+# as.mo("theisl") 260 280 280 280 290 290 10 +# as.mo("THEISL") 250 260 280 280 290 300 10 +# as.mo("T. islandicus") 120 130 130 130 150 150 10 +# as.mo("T. islandicus") 120 130 140 140 140 150 10 +# as.mo("Thermus islandicus") 47 47 53 48 62 67 10 +

That takes 9.3 times as much time on average. A value of 100 milliseconds means it can only determine ~10 different input values per second. We can conclude that looking up arbitrary codes of less prevalent microorganisms is the worst way to go, in terms of calculation performance. Full names (like Thermus islandicus) are almost fast - these are the most probable input from most data sets.

In the figure below, we compare Escherichia coli (which is very common) with Prevotella brevis (which is moderately common) and with Thermus islandicus (which is very uncommon):

par(mar = c(5, 16, 4, 2)) # set more space for left margin text (16)
 
@@ -280,8 +280,8 @@
 print(run_it, unit = "ms", signif = 3)
 # Unit: milliseconds
 #        expr min  lq mean median  uq max neval
-#  mo_name(x) 611 618  646    642 656 720    10
-

So transforming 500,000 values (!!) of 50 unique values only takes 0.64 seconds (641 ms). You only lose time on your unique input values.

+# mo_name(x) 587 591 604 594 612 653 10 +

So transforming 500,000 values (!!) of 50 unique values only takes 0.59 seconds (594 ms). You only lose time on your unique input values.

@@ -293,11 +293,11 @@ times = 10) print(run_it, unit = "ms", signif = 3) # Unit: milliseconds -# expr min lq mean median uq max neval -# A 6.440 6.690 9.070 7.040 7.500 27.800 10 -# B 21.800 22.200 23.600 23.400 23.800 30.200 10 -# C 0.661 0.826 0.844 0.836 0.928 0.936 10

-

So going from mo_name("Staphylococcus aureus") to "Staphylococcus aureus" takes 0.0008 seconds - it doesn’t even start calculating if the result would be the same as the expected resulting value. That goes for all helper functions:

+# expr min lq mean median uq max neval +# A 6.270 6.300 6.69 6.540 6.990 7.93 10 +# B 21.600 22.700 25.80 23.300 24.400 43.70 10 +# C 0.795 0.812 0.89 0.879 0.962 1.03 10 +

So going from mo_name("Staphylococcus aureus") to "Staphylococcus aureus" takes 0.0009 seconds - it doesn’t even start calculating if the result would be the same as the expected resulting value. That goes for all helper functions:

run_it <- microbenchmark(A = mo_species("aureus"),
                          B = mo_genus("Staphylococcus"),
                          C = mo_name("Staphylococcus aureus"),
@@ -310,14 +310,14 @@
 print(run_it, unit = "ms", signif = 3)
 # Unit: milliseconds
 #  expr   min    lq  mean median    uq   max neval
-#     A 0.468 0.472 0.483  0.483 0.487 0.520    10
-#     B 0.619 0.621 0.649  0.648 0.656 0.698    10
-#     C 0.702 0.732 0.770  0.788 0.799 0.809    10
-#     D 0.456 0.457 0.487  0.466 0.475 0.684    10
-#     E 0.451 0.463 0.466  0.466 0.471 0.479    10
-#     F 0.437 0.457 0.464  0.463 0.469 0.497    10
-#     G 0.450 0.454 0.468  0.466 0.477 0.495    10
-#     H 0.454 0.458 0.471  0.464 0.471 0.510    10
+# A 0.452 0.459 0.473 0.464 0.475 0.518 10 +# B 0.607 0.610 0.654 0.616 0.639 0.860 10 +# C 0.661 0.686 0.724 0.729 0.763 0.796 10 +# D 0.441 0.448 0.473 0.458 0.471 0.596 10 +# E 0.412 0.439 0.464 0.449 0.458 0.593 10 +# F 0.437 0.447 0.471 0.454 0.483 0.586 10 +# G 0.437 0.446 0.478 0.454 0.477 0.580 10 +# H 0.435 0.445 0.467 0.454 0.459 0.581 10

Of course, when running mo_phylum("Firmicutes") the function has zero knowledge about the actual microorganism, namely S. aureus. But since the result would be "Firmicutes" too, there is no point in calculating the result. And because this package ‘knows’ all phyla of all known bacteria (according to the Catalogue of Life), it can just return the initial value immediately.

@@ -344,13 +344,13 @@ print(run_it, unit = "ms", signif = 4) # Unit: milliseconds # expr min lq mean median uq max neval -# en 17.37 18.13 21.04 18.34 20.65 35.24 10 -# de 18.69 19.32 19.49 19.44 19.77 20.06 10 -# nl 24.85 25.07 27.07 25.37 25.58 42.68 10 -# es 18.96 19.55 23.91 19.88 21.02 41.15 10 -# it 18.85 19.34 21.08 19.52 20.22 35.18 10 -# fr 18.80 19.32 21.40 19.56 20.29 37.00 10 -# pt 18.81 19.45 19.57 19.59 19.64 20.20 10
+# en 17.56 18.00 22.17 18.14 26.18 35.39 10 +# de 18.94 19.20 19.99 19.86 20.44 21.82 10 +# nl 23.95 25.02 29.17 25.22 28.39 45.95 10 +# es 19.05 19.34 22.98 19.75 20.59 36.66 10 +# it 18.70 19.27 19.36 19.35 19.57 19.79 10 +# fr 18.54 19.07 21.03 19.24 19.37 37.92 10 +# pt 18.57 18.92 19.58 19.31 20.32 21.21 10

Currently supported are German, Dutch, Spanish, Italian, French and Portuguese.

diff --git a/docs/articles/benchmarks_files/figure-html/unnamed-chunk-5-1.png b/docs/articles/benchmarks_files/figure-html/unnamed-chunk-5-1.png index ce9ef648..817c1125 100644 Binary files a/docs/articles/benchmarks_files/figure-html/unnamed-chunk-5-1.png and b/docs/articles/benchmarks_files/figure-html/unnamed-chunk-5-1.png differ diff --git a/docs/articles/index.html b/docs/articles/index.html index 1533f23e..0fac2ef6 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -78,7 +78,7 @@ AMR (for R) - 0.7.1.9066 + 0.7.1.9067 diff --git a/docs/articles/resistance_predict.html b/docs/articles/resistance_predict.html index e3b2144a..1de32406 100644 --- a/docs/articles/resistance_predict.html +++ b/docs/articles/resistance_predict.html @@ -40,7 +40,7 @@ AMR (for R) - 0.7.1.9063 + 0.7.1.9067 @@ -185,7 +185,7 @@

How to predict antimicrobial resistance

Matthijs S. Berends

-

27 August 2019

+

28 August 2019

diff --git a/docs/authors.html b/docs/authors.html index aeb82a0a..f5ea91a9 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -78,7 +78,7 @@ AMR (for R) - 0.7.1.9066 + 0.7.1.9067 diff --git a/docs/index.html b/docs/index.html index 85b8b772..9da4c525 100644 --- a/docs/index.html +++ b/docs/index.html @@ -42,7 +42,7 @@ AMR (for R) - 0.7.1.9066 + 0.7.1.9067 diff --git a/docs/news/index.html b/docs/news/index.html index d4f7b5db..ca82086f 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -78,7 +78,7 @@ AMR (for R) - 0.7.1.9066 + 0.7.1.9067 @@ -225,9 +225,9 @@ -
+

-AMR 0.7.1.9066 Unreleased +AMR 0.7.1.9067 Unreleased

@@ -1258,7 +1258,7 @@ Using as.mo(..., allow_uncertain = 3)

Contents

diff --git a/docs/reference/age_groups.html b/docs/reference/age_groups.html index 3fefc588..cd87d781 100644 --- a/docs/reference/age_groups.html +++ b/docs/reference/age_groups.html @@ -80,7 +80,7 @@ AMR (for R) - 0.7.1.9063 + 0.7.1.9067
diff --git a/docs/reference/as.rsi.html b/docs/reference/as.rsi.html index 806c8943..c22697fd 100644 --- a/docs/reference/as.rsi.html +++ b/docs/reference/as.rsi.html @@ -80,7 +80,7 @@ AMR (for R) - 0.7.1.9065 + 0.7.1.9067
diff --git a/docs/reference/availability.html b/docs/reference/availability.html index 8ed16971..8b8cb318 100644 --- a/docs/reference/availability.html +++ b/docs/reference/availability.html @@ -80,7 +80,7 @@ AMR (for R) - 0.7.1.9063 + 0.7.1.9067 diff --git a/docs/reference/bug_drug_combinations.html b/docs/reference/bug_drug_combinations.html index 9a6a3a10..cdbe1dfc 100644 --- a/docs/reference/bug_drug_combinations.html +++ b/docs/reference/bug_drug_combinations.html @@ -80,7 +80,7 @@ AMR (for R) - 0.7.1.9066 + 0.7.1.9067 diff --git a/docs/reference/count.html b/docs/reference/count.html index 31ff2aba..6016805e 100644 --- a/docs/reference/count.html +++ b/docs/reference/count.html @@ -81,7 +81,7 @@ count_R and count_IR can be used to count resistant isolates, count_S and count_ AMR (for R) - 0.7.1.9063 + 0.7.1.9067 diff --git a/docs/reference/eucast_rules.html b/docs/reference/eucast_rules.html index 9ea4dff0..43ebb124 100644 --- a/docs/reference/eucast_rules.html +++ b/docs/reference/eucast_rules.html @@ -80,7 +80,7 @@ AMR (for R) - 0.7.1.9065 + 0.7.1.9067 diff --git a/docs/reference/example_isolates.html b/docs/reference/example_isolates.html index 9f03db51..d6d8238c 100644 --- a/docs/reference/example_isolates.html +++ b/docs/reference/example_isolates.html @@ -80,7 +80,7 @@ AMR (for R) - 0.7.1.9063 + 0.7.1.9067 diff --git a/docs/reference/filter_ab_class.html b/docs/reference/filter_ab_class.html index 8be6cbaa..d1bbffd2 100644 --- a/docs/reference/filter_ab_class.html +++ b/docs/reference/filter_ab_class.html @@ -80,7 +80,7 @@ AMR (for R) - 0.7.1.9063 + 0.7.1.9067 diff --git a/docs/reference/first_isolate.html b/docs/reference/first_isolate.html index 99f63702..49a6b735 100644 --- a/docs/reference/first_isolate.html +++ b/docs/reference/first_isolate.html @@ -80,7 +80,7 @@ AMR (for R) - 0.7.1.9065 + 0.7.1.9067 diff --git a/docs/reference/ggplot_rsi.html b/docs/reference/ggplot_rsi.html index c36986d3..ac55a0a5 100644 --- a/docs/reference/ggplot_rsi.html +++ b/docs/reference/ggplot_rsi.html @@ -80,7 +80,7 @@ AMR (for R) - 0.7.1.9063 + 0.7.1.9067 diff --git a/docs/reference/index.html b/docs/reference/index.html index e1f0229c..370cf3fe 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -78,7 +78,7 @@ AMR (for R) - 0.7.1.9066 + 0.7.1.9067 diff --git a/docs/reference/join.html b/docs/reference/join.html index f05511bd..8486fc43 100644 --- a/docs/reference/join.html +++ b/docs/reference/join.html @@ -80,7 +80,7 @@ AMR (for R) - 0.7.1.9063 + 0.7.1.9067 diff --git a/docs/reference/key_antibiotics.html b/docs/reference/key_antibiotics.html index 417e3b28..7cd6f965 100644 --- a/docs/reference/key_antibiotics.html +++ b/docs/reference/key_antibiotics.html @@ -80,7 +80,7 @@ AMR (for R) - 0.7.1.9065 + 0.7.1.9067 diff --git a/docs/reference/like.html b/docs/reference/like.html index 35be8bbe..d313e9d8 100644 --- a/docs/reference/like.html +++ b/docs/reference/like.html @@ -80,7 +80,7 @@ AMR (for R) - 0.7.1.9063 + 0.7.1.9067 diff --git a/docs/reference/mdro.html b/docs/reference/mdro.html index 67974ebe..19e22ec3 100644 --- a/docs/reference/mdro.html +++ b/docs/reference/mdro.html @@ -80,7 +80,7 @@ AMR (for R) - 0.7.1.9065 + 0.7.1.9067 diff --git a/docs/reference/portion.html b/docs/reference/portion.html index 9eefe394..4ae6c511 100644 --- a/docs/reference/portion.html +++ b/docs/reference/portion.html @@ -81,7 +81,7 @@ portion_R and portion_IR can be used to calculate resistance, portion_S and port AMR (for R) - 0.7.1.9063 + 0.7.1.9067 diff --git a/docs/reference/resistance_predict.html b/docs/reference/resistance_predict.html index 48d7bb81..8b964ab3 100644 --- a/docs/reference/resistance_predict.html +++ b/docs/reference/resistance_predict.html @@ -80,7 +80,7 @@ AMR (for R) - 0.7.1.9063 + 0.7.1.9067