diff --git a/articles/AMR.html b/articles/AMR.html index 4fe41e36..f8c879fc 100644 --- a/articles/AMR.html +++ b/articles/AMR.html @@ -395,21 +395,43 @@ data set:

-2017-08-16 -S1 +2012-03-28 +G1 +Hospital B +Escherichia coli +S +S +S +S +M + + +2010-09-12 +E1 Hospital A Escherichia coli -R S S -R +S +S +M + + +2015-07-10 +N9 +Hospital D +Klebsiella pneumoniae +S +S +S +S F -2014-12-04 -J1 +2016-02-13 +B8 Hospital B -Escherichia coli +Staphylococcus aureus R S S @@ -417,48 +439,26 @@ data set:

M -2012-07-21 -R6 -Hospital C -Escherichia coli -S -S -R -S -F - - -2012-11-26 -K8 +2016-12-26 +X3 Hospital A Staphylococcus aureus -S -R -S -S -M - - -2011-07-23 -Z2 -Hospital B -Escherichia coli -R R +I S S F -2016-05-31 -S7 +2014-04-05 +K5 Hospital B Escherichia coli +R S S S -S -F +M @@ -494,16 +494,16 @@ Longest: 1

1 M -10,563 -52.82% -10,563 -52.82% +10,517 +52.59% +10,517 +52.59% 2 F -9,437 -47.19% +9,483 +47.42% 20,000 100.00% @@ -616,10 +616,10 @@ takes into account the antimicrobial susceptibility test results using # Basing inclusion on all antimicrobial results, using a points threshold of # 2 # Including isolates from ICU. -# => Found 10,633 'phenotype-based' first isolates (53.2% of total where a +# => Found 10,603 'phenotype-based' first isolates (53.0% of total where a # microbial ID was available) -

So only 53.2% is suitable for resistance analysis! We can now filter -on it with the filter() function, also from the +

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

 data_1st <- data %>%
@@ -629,7 +629,7 @@ on it with the data_1st <- data %>%
   filter_first_isolate()
 # Including isolates from ICU.
-

So we end up with 10,633 isolates for analysis. Now our data looks +

So we end up with 10,603 isolates for analysis. Now our data looks like:

 head(data_1st)
@@ -646,8 +646,8 @@ like:

- - + + @@ -669,92 +669,60 @@ like:

3 -2012-07-21 -R6 -Hospital C -B_ESCHR_COLI -S -S -R -S -F -Gram-negative -Escherichia -coli -TRUE - - -4 -2012-11-26 -K8 -Hospital A -B_STPHY_AURS -R -R -S -S -M -Gram-positive -Staphylococcus -aureus -TRUE - - -5 -2011-07-23 -Z2 -Hospital B -B_ESCHR_COLI -R -R -S -S -F -Gram-negative -Escherichia -coli -TRUE - - -6 -2016-05-31 -S7 -Hospital B -B_ESCHR_COLI -S -S -S -S -F -Gram-negative -Escherichia -coli -TRUE - - -7 -2011-07-29 -C9 -Hospital B -B_STPHY_AURS -R -S -S -S -M -Gram-positive -Staphylococcus -aureus -TRUE - - -14 -2016-07-22 -N8 +2015-07-10 +N9 Hospital D +B_KLBSL_PNMN +R +S +S +S +F +Gram-negative +Klebsiella +pneumoniae +TRUE + + +8 +2013-12-26 +K2 +Hospital D +B_KLBSL_PNMN +R +I +S +S +M +Gram-negative +Klebsiella +pneumoniae +TRUE + + +11 +2017-12-04 +B10 +Hospital B B_ESCHR_COLI -R -R +S +S +S +S +M +Gram-negative +Escherichia +coli +TRUE + + +12 +2010-03-06 +X9 +Hospital A +B_ESCHR_COLI +S +S S S F @@ -763,6 +731,38 @@ like:

coli TRUE + +14 +2017-11-16 +K5 +Hospital B +B_ESCHR_COLI +R +R +S +S +M +Gram-negative +Escherichia +coli +TRUE + + +15 +2012-05-28 +X4 +Hospital B +B_KLBSL_PNMN +R +S +R +R +F +Gram-negative +Klebsiella +pneumoniae +TRUE +

Time for the analysis!

@@ -796,8 +796,8 @@ readable:

data_1st %>% freq(genus, species)

Frequency table

Class: character
-Length: 10,633
-Available: 10,633 (100%, NA: 0 = 0%)
+Length: 10,603
+Available: 10,603 (100%, NA: 0 = 0%)
Unique: 4

Shortest: 16
Longest: 24

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

1 Escherichia coli -4,624 -43.49% -4,624 -43.49% +4,605 +43.43% +4,605 +43.43% 2 Staphylococcus aureus -2,730 -25.67% -7,354 -69.16% +2,704 +25.50% +7,309 +68.93% 3 Streptococcus pneumoniae -2,082 -19.58% -9,436 -88.74% +2,080 +19.62% +9,389 +88.55% 4 Klebsiella pneumoniae -1,197 -11.26% -10,633 +1,214 +11.45% +10,603 100.00% @@ -869,14 +869,14 @@ antibiotic class they are in:

- + - + @@ -897,92 +897,92 @@ antibiotic class they are in:

-2012-12-19 -S3 -Hospital A -B_STRPT_PNMN -S -S -R -R -F -Gram-positive -Streptococcus -pneumoniae -TRUE - - -2013-04-29 -E8 -Hospital D -B_STRPT_PNMN -R -R -S -R -M -Gram-positive -Streptococcus -pneumoniae -TRUE - - -2014-11-08 -R2 +2012-05-28 +X4 Hospital B -B_STRPT_PNMN -S -S -S -R -F -Gram-positive -Streptococcus -pneumoniae -TRUE - - -2012-09-13 -W3 -Hospital B -B_STRPT_PNMN -S -S -R -R -F -Gram-positive -Streptococcus -pneumoniae -TRUE - - -2017-11-23 -F9 -Hospital B -B_STRPT_PNMN -R -R -S -R -M -Gram-positive -Streptococcus -pneumoniae -TRUE - - -2014-07-26 -R5 -Hospital C B_KLBSL_PNMN R S +R +R +F +Gram-negative +Klebsiella +pneumoniae +TRUE + + +2013-02-21 +Q4 +Hospital A +B_ESCHR_COLI +R +S S R F Gram-negative -Klebsiella +Escherichia +coli +TRUE + + +2014-12-17 +V4 +Hospital B +B_ESCHR_COLI +S +S +R +R +F +Gram-negative +Escherichia +coli +TRUE + + +2012-01-20 +E6 +Hospital C +B_STPHY_AURS +S +S +S +R +M +Gram-positive +Staphylococcus +aureus +TRUE + + +2014-01-15 +Y1 +Hospital D +B_ESCHR_COLI +R +R +R +R +F +Gram-negative +Escherichia +coli +TRUE + + +2015-02-24 +I1 +Hospital A +B_STRPT_PNMN +S +S +S +R +M +Gram-positive +Streptococcus pneumoniae TRUE @@ -1009,50 +1009,50 @@ different bug/drug combinations, you can use the E. coli AMX -2175 -124 -2325 -4624 +2153 +133 +2319 +4605 E. coli AMC -3402 -145 -1077 -4624 +3353 +146 +1106 +4605 E. coli CIP -3385 +3357 0 -1239 -4624 +1248 +4605 E. coli GEN -4046 +4032 0 -578 -4624 +573 +4605 K. pneumoniae AMX 0 0 -1197 -1197 +1214 +1214 K. pneumoniae AMC -922 -67 -208 -1197 +938 +48 +228 +1214 @@ -1075,34 +1075,34 @@ different bug/drug combinations, you can use the E. coli GEN -4046 +4032 0 -578 -4624 +573 +4605 K. pneumoniae GEN -1060 +1077 0 137 -1197 +1214 S. aureus GEN -2411 +2407 0 -319 -2730 +297 +2704 S. pneumoniae GEN 0 0 -2082 -2082 +2080 +2080 @@ -1134,7 +1134,7 @@ I (proportion_SI(), equa own:

 data_1st %>% resistance(AMX)
-# [1] 0.5444371
+# [1] 0.5472036

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

@@ -1149,19 +1149,19 @@ own:

Hospital A -0.5425466 +0.5600486 Hospital B -0.5360493 +0.5391692 Hospital C -0.5492327 +0.5552826 Hospital D -0.5585458 +0.5345403 @@ -1186,23 +1186,23 @@ all isolates available for every group (i.e. values S, I or R):

Hospital A -0.5425466 -3220 +0.5600486 +3289 Hospital B -0.5360493 -3731 +0.5391692 +3587 Hospital C -0.5492327 -1564 +0.5552826 +1628 Hospital D -0.5585458 -2118 +0.5345403 +2099 @@ -1227,27 +1227,27 @@ therapies very easily:

Escherichia -0.7670848 -0.8750000 -0.9764273 +0.7598263 +0.8755700 +0.9774159 Klebsiella -0.8262322 -0.8855472 -0.9791145 +0.8121911 +0.8871499 +0.9728171 Staphylococcus -0.7908425 -0.8831502 -0.9754579 +0.7917899 +0.8901627 +0.9822485 Streptococcus -0.5317003 +0.5423077 0.0000000 -0.5317003 +0.5423077 @@ -1275,23 +1275,23 @@ classes, use a antibiotic class selector such as Hospital A -54.3% -25.2% +56.0% +28.0% Hospital B -53.6% -26.7% +53.9% +27.0% Hospital C -54.9% -25.9% +55.5% +25.3% Hospital D -55.9% -29.3% +53.5% +26.1% @@ -1407,16 +1407,18 @@ classes) <mic> and <disk>:

mic_values <- random_mic(size = 100) mic_values # Class 'mic' -# [1] 0.001 0.5 0.002 4 0.025 8 4 32 0.025 32 -# [11] >=256 0.001 0.5 0.5 0.002 0.002 0.025 16 1 0.025 -# [21] >=256 0.0625 0.002 0.5 0.0625 4 1 0.001 16 >=256 -# [31] 0.005 0.002 0.002 >=256 0.005 0.025 0.5 8 0.125 0.125 -# [41] 0.005 0.005 >=256 4 0.005 0.001 0.025 0.01 0.01 128 -# [51] 0.001 0.5 0.005 32 64 8 0.005 8 0.001 32 -# [61] 0.5 128 0.001 2 32 0.125 16 16 8 0.002 -# [71] 0.25 4 0.25 128 0.002 0.5 0.25 0.025 0.025 4 -# [81] >=256 8 0.002 1 0.001 64 0.25 0.5 0.005 16 -# [91] 0.025 0.25 0.025 1 2 2 >=256 1 0.5 0.125
+# [1] 32 <=0.001 16 16 0.5 0.5 0.0625 4 0.25 +# [10] 0.01 128 256 0.01 <=0.001 0.25 0.25 128 256 +# [19] 8 64 256 256 1 32 0.0625 0.005 4 +# [28] 0.005 0.125 0.025 0.125 8 64 <=0.001 0.5 0.025 +# [37] 0.002 0.5 0.002 4 <=0.001 0.25 1 0.125 4 +# [46] 128 256 0.01 0.002 0.01 32 32 0.005 4 +# [55] 0.0625 256 0.25 2 32 0.01 <=0.001 4 0.5 +# [64] 8 0.125 0.005 <=0.001 64 1 0.5 16 1 +# [73] 2 0.005 0.25 64 32 16 <=0.001 128 0.025 +# [82] 4 256 16 0.125 2 0.005 <=0.001 0.0625 0.005 +# [91] 0.5 2 128 0.5 2 16 0.002 <=0.001 0.125 +# [100] 0.002
 # base R:
 plot(mic_values)
@@ -1450,10 +1452,10 @@ plotting:

disk_values <- random_disk(size = 100, mo = "E. coli", ab = "cipro") disk_values # Class 'disk' -# [1] 30 31 30 24 26 25 23 24 17 22 30 27 20 19 24 21 21 20 21 26 22 24 18 30 17 -# [26] 28 30 22 27 27 31 19 24 27 23 18 30 21 20 18 19 21 26 18 18 20 17 27 30 25 -# [51] 31 21 23 23 27 19 24 30 25 22 31 19 26 26 24 27 19 17 25 20 28 28 26 24 19 -# [76] 22 18 30 23 27 27 21 28 21 24 23 17 23 20 24 31 17 21 17 19 26 18 29 20 25 +# [1] 20 26 25 18 21 30 25 24 29 29 18 31 24 22 19 21 21 30 18 22 27 20 25 19 28 +# [26] 28 29 26 17 24 20 30 22 30 24 18 25 27 29 29 22 28 18 29 28 21 29 27 19 29 +# [51] 21 17 17 23 26 22 27 30 29 20 26 18 18 17 24 21 23 25 26 17 24 22 18 31 29 +# [76] 29 21 24 27 22 28 26 25 19 17 23 24 28 31 18 30 30 25 22 22 31 25 31 24 26
 # base R:
 plot(disk_values, mo = "E. coli", ab = "cipro")
diff --git a/articles/AMR_files/figure-html/disk_plots-1.png b/articles/AMR_files/figure-html/disk_plots-1.png index f6f74a31..fcf99dc9 100644 Binary files a/articles/AMR_files/figure-html/disk_plots-1.png and b/articles/AMR_files/figure-html/disk_plots-1.png differ diff --git a/articles/AMR_files/figure-html/disk_plots_mo_ab-1.png b/articles/AMR_files/figure-html/disk_plots_mo_ab-1.png index 1c0127ef..2e2edebb 100644 Binary files a/articles/AMR_files/figure-html/disk_plots_mo_ab-1.png and b/articles/AMR_files/figure-html/disk_plots_mo_ab-1.png differ diff --git a/articles/AMR_files/figure-html/mic_plots-1.png b/articles/AMR_files/figure-html/mic_plots-1.png index 7f991ed1..939466a2 100644 Binary files a/articles/AMR_files/figure-html/mic_plots-1.png and b/articles/AMR_files/figure-html/mic_plots-1.png differ diff --git a/articles/AMR_files/figure-html/mic_plots-2.png b/articles/AMR_files/figure-html/mic_plots-2.png index 2091a7c6..f106cbc3 100644 Binary files a/articles/AMR_files/figure-html/mic_plots-2.png and b/articles/AMR_files/figure-html/mic_plots-2.png differ diff --git a/articles/AMR_files/figure-html/mic_plots_mo_ab-1.png b/articles/AMR_files/figure-html/mic_plots_mo_ab-1.png index ecf9655d..1f8b0866 100644 Binary files a/articles/AMR_files/figure-html/mic_plots_mo_ab-1.png and b/articles/AMR_files/figure-html/mic_plots_mo_ab-1.png differ diff --git a/articles/AMR_files/figure-html/mic_plots_mo_ab-2.png b/articles/AMR_files/figure-html/mic_plots_mo_ab-2.png index 72d684bb..b15f3ec2 100644 Binary files a/articles/AMR_files/figure-html/mic_plots_mo_ab-2.png and b/articles/AMR_files/figure-html/mic_plots_mo_ab-2.png differ diff --git a/articles/AMR_files/figure-html/plot 1-1.png b/articles/AMR_files/figure-html/plot 1-1.png index adf84e62..17420c86 100644 Binary files a/articles/AMR_files/figure-html/plot 1-1.png and b/articles/AMR_files/figure-html/plot 1-1.png differ diff --git a/articles/AMR_files/figure-html/plot 3-1.png b/articles/AMR_files/figure-html/plot 3-1.png index 35e75e45..ff9e8fe5 100644 Binary files a/articles/AMR_files/figure-html/plot 3-1.png and b/articles/AMR_files/figure-html/plot 3-1.png differ diff --git a/articles/AMR_files/figure-html/plot 4-1.png b/articles/AMR_files/figure-html/plot 4-1.png index e57911ec..742f0ecc 100644 Binary files a/articles/AMR_files/figure-html/plot 4-1.png and b/articles/AMR_files/figure-html/plot 4-1.png differ diff --git a/articles/AMR_files/figure-html/plot 5-1.png b/articles/AMR_files/figure-html/plot 5-1.png index 2e3b546e..9bcef634 100644 Binary files a/articles/AMR_files/figure-html/plot 5-1.png and b/articles/AMR_files/figure-html/plot 5-1.png differ diff --git a/articles/MDR.html b/articles/MDR.html index d58edf2f..65039e00 100644 --- a/articles/MDR.html +++ b/articles/MDR.html @@ -370,19 +370,19 @@ names or codes, this would have worked exactly the same way:

 head(my_TB_data)
 #   rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin
-# 1          R         S            R          S            R            R
-# 2          R         I            R          R            R            I
-# 3          I         R            S          I            S            R
-# 4          I         I            I          R            I            S
-# 5          R         R            S          R            I            S
-# 6          S         S            R          R            R            I
+# 1          I         I            I          S            S            R
+# 2          R         S            S          S            I            I
+# 3          S         R            R          R            S            R
+# 4          S         I            R          S            I            I
+# 5          S         S            S          I            S            R
+# 6          I         S            R          S            I            I
 #   kanamycin
 # 1         I
 # 2         S
-# 3         S
-# 4         S
-# 5         S
-# 6         R
+# 3 R +# 4 I +# 5 R +# 6 I

We can now add the interpretation of MDR-TB to our data set. You can use:

@@ -423,40 +423,40 @@ Unique: 5

1 Mono-resistant -3231 -64.62% -3231 -64.62% +3140 +62.80% +3140 +62.80% 2 Negative -961 -19.22% -4192 -83.84% +1031 +20.62% +4171 +83.42% 3 Multi-drug-resistant -445 -8.90% -4637 -92.74% +463 +9.26% +4634 +92.68% 4 Poly-resistant -250 -5.00% -4887 -97.74% +252 +5.04% +4886 +97.72% 5 Extensively drug-resistant -113 -2.26% +114 +2.28% 5000 100.00% diff --git a/articles/datasets.html b/articles/datasets.html index 9ffd1d8c..315a1a36 100644 --- a/articles/datasets.html +++ b/articles/datasets.html @@ -191,7 +191,7 @@ column names:
mo, fullname, status, kingdomgbif_renamed_to, prevalence and snomed.

This data set is in R available as microorganisms, after you load the AMR package.

-

It was last updated on 12 November 2022 08:46:26 UTC. Find more info +

It was last updated on 29 October 2022 12:15:23 UTC. Find more info about the structure of this data set here.

Direct download links: