diff --git a/articles/AMR.html b/articles/AMR.html index 3fa02440..a9411b63 100644 --- a/articles/AMR.html +++ b/articles/AMR.html @@ -325,19 +325,41 @@ -2015-11-18 -X2 +2017-11-03 +T2 Hospital A -Klebsiella pneumoniae -S +Escherichia coli +R S S S F -2014-12-18 -I9 +2016-05-27 +Z9 +Hospital B +Staphylococcus aureus +S +S +S +S +F + + +2015-01-19 +N8 +Hospital C +Escherichia coli +I +R +S +S +F + + +2017-03-31 +G7 Hospital C Escherichia coli S @@ -347,48 +369,26 @@ M -2015-09-24 -V4 +2014-04-10 +C6 Hospital A -Staphylococcus aureus +Streptococcus pneumoniae S -R -S -S -F - - -2012-11-26 -E7 -Hospital D -Escherichia coli -R -I -S -S -M - - -2010-08-28 -A7 -Hospital A -Escherichia coli -R S S S M -2016-05-06 -V5 +2011-02-09 +N4 Hospital A Escherichia coli S -I -R S -F +S +S +M @@ -422,16 +422,16 @@ Longest: 1

1 M -10,324 -51.62% -10,324 -51.62% +10,375 +51.88% +10,375 +51.88% 2 F -9,676 -48.38% +9,625 +48.13% 20,000 100.00% @@ -488,9 +488,9 @@ Longest: 1

# Basing inclusion on all antimicrobial results, using a points threshold of # 2 # Including isolates from ICU. -# => Found 10,765 'phenotype-based' first isolates (53.8% of total where a +# => Found 10,660 'phenotype-based' first isolates (53.3% of total where a # microbial ID was available) -

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

+

So only 53.3% 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)
@@ -499,7 +499,7 @@ Longest: 1

data_1st <- data %>% filter_first_isolate() # Including isolates from ICU. -

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

+

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

 head(data_1st)
@@ -537,25 +537,41 @@ Longest: 1

- - - - - - + + + + + + - - - + + + - - - + + + + + + + + + + + + + + + + + + + @@ -568,62 +584,30 @@ Longest: 1

- - - - - - - - - - - - - - - - - - - - - + + + + + + + + - - - - - - + + + - - + + - - - - - - - - - - - - - - - - @@ -632,6 +616,22 @@ Longest: 1

+ + + + + + + + + + + + + + + +
12015-11-18X2Hospital AB_KLBSL_PNMNR22016-05-27Z9Hospital BB_STPHY_AURSS S S S FGram-negativeKlebsiellapneumoniaeGram-positiveStaphylococcusaureus TRUE
22014-12-18I932015-01-19N8Hospital CB_ESCHR_COLIRRSSFGram-negativeEscherichiacoliTRUE
42017-03-31G7 Hospital C B_ESCHR_COLI S coli TRUE
32015-09-24V4Hospital AB_STPHY_AURSRRSSFGram-positiveStaphylococcusaureusTRUE
42012-11-26E7Hospital DB_ESCHR_COLI52014-04-10C6Hospital AB_STRPT_PNMNSSS RISS MGram-negativeEscherichiacoliGram-positiveStreptococcuspneumoniae TRUE
62016-05-06V52011-02-09N4 Hospital A B_ESCHR_COLI S SRSFGram-negativeEscherichiacoliTRUE
72011-03-21N1Hospital DB_ESCHR_COLISS S S M coli TRUE
102010-07-27E4Hospital DB_STPHY_AURSRSRSMGram-positiveStaphylococcusaureusTRUE

Time for the analysis!

@@ -653,8 +653,8 @@ Longest: 1

data_1st %>% freq(genus, species)

Frequency table

Class: character
-Length: 10,765
-Available: 10,765 (100.0%, NA: 0 = 0.0%)
+Length: 10,660
+Available: 10,660 (100.0%, NA: 0 = 0.0%)
Unique: 4

Shortest: 16
Longest: 24

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

1 Escherichia coli -4,655 -43.24% -4,655 -43.24% +4,666 +43.77% +4,666 +43.77% 2 Staphylococcus aureus -2,771 -25.74% -7,426 -68.98% +2,717 +25.49% +7,383 +69.26% 3 Streptococcus pneumoniae -2,156 -20.03% -9,582 -89.01% +2,101 +19.71% +9,484 +88.97% 4 Klebsiella pneumoniae -1,183 -10.99% -10,765 +1,176 +11.03% +10,660 100.00% @@ -716,14 +716,14 @@ Longest: 24

- + - + @@ -744,27 +744,27 @@ Longest: 24

-2016-02-22 -Y6 -Hospital D -B_STPHY_AURS -R -R +2014-04-10 +C6 +Hospital A +B_STRPT_PNMN +S +S S R -F +M Gram-positive -Staphylococcus -aureus +Streptococcus +pneumoniae TRUE -2012-04-22 -E8 +2012-08-04 +I5 Hospital D B_ESCHR_COLI -S -S +R +R R R M @@ -774,12 +774,42 @@ Longest: 24

TRUE -2010-08-20 -F1 +2012-11-28 +Y4 +Hospital A +B_ESCHR_COLI +S +S +R +R +F +Gram-negative +Escherichia +coli +TRUE + + +2010-08-07 +F10 Hospital B B_STRPT_PNMN -I -I +S +S +S +R +M +Gram-positive +Streptococcus +pneumoniae +TRUE + + +2017-09-28 +A7 +Hospital C +B_STRPT_PNMN +R +R S R M @@ -789,24 +819,9 @@ Longest: 24

TRUE -2016-05-20 -X2 -Hospital A -B_STPHY_AURS -R -I -S -R -F -Gram-positive -Staphylococcus -aureus -TRUE - - -2017-02-25 -Y7 -Hospital A +2010-05-24 +W9 +Hospital B B_STRPT_PNMN S S @@ -818,21 +833,6 @@ Longest: 24

pneumoniae TRUE - -2016-01-31 -Y4 -Hospital C -B_ESCHR_COLI -S -S -S -R -F -Gram-negative -Escherichia -coli -TRUE -

If you want to get a quick glance of the number of isolates in different bug/drug combinations, you can use the bug_drug_combinations() function:

@@ -854,50 +854,50 @@ Longest: 24

E. coli AMX -2244 -103 -2308 -4655 +2239 +144 +2283 +4666 E. coli AMC -3412 -156 -1087 -4655 +3411 +155 +1100 +4666 E. coli CIP -3414 +3389 0 -1241 -4655 +1277 +4666 E. coli GEN -4073 +4077 0 -582 -4655 +589 +4666 K. pneumoniae AMX 0 0 -1183 -1183 +1176 +1176 K. pneumoniae AMC -960 -38 -185 -1183 +910 +50 +216 +1176 @@ -920,34 +920,34 @@ Longest: 24

E. coli GEN -4073 +4077 0 -582 -4655 +589 +4666 K. pneumoniae GEN -1070 +1045 0 -113 -1183 +131 +1176 S. aureus GEN -2442 +2422 0 -329 -2771 +295 +2717 S. pneumoniae GEN 0 0 -2156 -2156 +2101 +2101 @@ -961,7 +961,7 @@ Longest: 24

As per the EUCAST guideline of 2019, we calculate resistance as the proportion of R (proportion_R(), equal to resistance()) and susceptibility as the proportion of S and I (proportion_SI(), equal to susceptibility()). These functions can be used on their own:

 data_1st %>% resistance(AMX)
-# [1] 0.5452856
+# [1] 0.5409006

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

 data_1st %>%
@@ -975,19 +975,19 @@ Longest: 24

Hospital A -0.5467334 +0.5371953 Hospital B -0.5472356 +0.5490456 Hospital C -0.5282083 +0.5335844 Hospital D -0.5523125 +0.5374532 @@ -1008,23 +1008,23 @@ Longest: 24

Hospital A -0.5467334 -3199 +0.5371953 +3159 Hospital B -0.5472356 -3726 +0.5490456 +3772 Hospital C -0.5282083 -1613 +0.5335844 +1593 Hospital D -0.5523125 -2227 +0.5374532 +2136 @@ -1047,27 +1047,27 @@ Longest: 24

Escherichia -0.7664876 -0.8749731 -0.9735768 +0.7642520 +0.8737677 +0.9747107 Klebsiella -0.8436179 -0.9044801 -0.9873204 +0.8163265 +0.8886054 +0.9855442 Staphylococcus -0.7971851 -0.8812703 -0.9765428 +0.7935223 +0.8914244 +0.9775488 Streptococcus -0.5343228 +0.5316516 0.0000000 -0.5343228 +0.5316516 @@ -1092,23 +1092,23 @@ Longest: 24

Hospital A -54.7% -27.4% +53.7% +27.5% Hospital B -54.7% -26.0% +54.9% +27.3% Hospital C -52.8% -24.9% +53.4% +26.0% Hospital D -55.2% -26.5% +53.7% +25.7% @@ -1206,17 +1206,17 @@ Longest: 24

mic_values <- random_mic(size = 100) mic_values # Class <mic> -# [1] 32 <=0.001 0.025 <=0.001 4 0.125 0.01 0.002 32 -# [10] 16 64 4 <=0.001 0.01 16 0.01 64 64 -# [19] 256 0.0625 0.002 0.005 0.125 0.025 32 128 0.5 -# [28] 16 0.5 32 0.005 32 0.01 2 0.125 128 -# [37] 64 8 0.002 0.01 2 <=0.001 0.005 64 0.0625 -# [46] <=0.001 8 0.5 64 32 0.5 0.005 0.01 <=0.001 -# [55] 16 0.5 8 0.0625 0.125 128 16 0.5 0.002 -# [64] 16 8 128 128 4 256 0.5 8 4 -# [73] 16 0.025 2 1 16 0.005 0.01 16 1 -# [82] 0.25 0.01 0.002 0.0625 0.005 128 64 128 8 -# [91] 0.002 1 8 8 0.25 0.125 16 2 0.5 +# [1] 64 4 0.25 64 256 4 128 0.125 64 +# [10] 64 4 4 8 16 32 2 0.005 0.002 +# [19] 4 256 0.25 0.5 2 <=0.001 0.025 0.0625 32 +# [28] 1 128 0.005 0.0625 0.25 2 0.002 8 1 +# [37] 16 0.125 8 1 32 16 1 16 8 +# [46] 16 0.005 0.5 128 <=0.001 32 2 0.0625 0.5 +# [55] 2 64 128 4 0.5 16 0.0625 0.0625 0.002 +# [64] 0.25 0.025 4 16 32 0.0625 0.0625 0.5 0.5 +# [73] 0.002 32 16 0.005 1 0.25 256 0.25 0.025 +# [82] 128 8 0.25 0.0625 1 256 16 0.5 0.125 +# [91] 0.005 2 0.002 128 0.5 32 0.0625 0.025 0.125 # [100] 256
 # base R:
@@ -1244,10 +1244,10 @@ Longest: 24

disk_values <- random_disk(size = 100, mo = "E. coli", ab = "cipro") disk_values # Class <disk> -# [1] 29 31 21 24 20 24 29 22 21 20 19 25 17 30 30 28 25 27 23 20 18 22 31 25 24 -# [26] 29 25 21 29 20 22 23 27 30 23 22 30 22 18 20 23 27 25 23 21 21 24 21 29 26 -# [51] 21 26 26 24 30 24 30 25 23 30 20 29 22 17 20 18 21 22 27 29 30 30 30 21 30 -# [76] 26 19 28 26 22 25 19 21 23 29 17 23 23 24 26 28 17 17 30 23 29 31 19 19 31
+# [1] 23 29 23 29 18 26 17 23 28 31 21 24 18 17 25 26 24 18 25 18 28 18 30 20 28 +# [26] 24 28 21 31 25 29 21 19 18 18 20 31 18 28 31 17 24 21 18 31 21 26 22 27 18 +# [51] 29 29 19 31 17 20 30 21 21 26 30 25 31 26 26 29 29 29 20 21 23 18 27 25 28 +# [76] 29 28 20 20 26 17 20 24 21 28 28 28 31 21 20 21 17 28 24 23 29 22 23 30 29
 # 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 624b2835..6d456bec 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 62aee7b5..41d0f698 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 3e938133..81e23f69 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 f5a88a55..582c2a81 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 0aa9cb1d..95f796e4 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 6e5cb9e5..f7a929d9 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 eaf625d5..92fbc6ce 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 df1cc4dd..24e174bd 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 2f05fdd3..aa9a81cc 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 a3100995..e1a42359 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 c07a55ff..751f4ac5 100644 --- a/articles/MDR.html +++ b/articles/MDR.html @@ -314,19 +314,19 @@ Unique: 2

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

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

 mdro(my_TB_data, guideline = "TB")
@@ -357,40 +357,40 @@ Unique: 5

1 Mono-resistant -3186 -63.72% -3186 -63.72% +3223 +64.46% +3223 +64.46% 2 Negative -1014 -20.28% -4200 -84.00% +980 +19.60% +4203 +84.06% 3 Multi-drug-resistant -475 -9.50% -4675 -93.50% +435 +8.70% +4638 +92.76% 4 Poly-resistant -233 -4.66% -4908 -98.16% +249 +4.98% +4887 +97.74% 5 Extensively drug-resistant -92 -1.84% +113 +2.26% 5000 100.00% diff --git a/articles/datasets.html b/articles/datasets.html index ea661e49..93650b54 100644 --- a/articles/datasets.html +++ b/articles/datasets.html @@ -177,7 +177,7 @@

A data set with 48,787 rows and 22 columns, containing the following column names:
mo, fullname, status, kingdom, phylum, class, order, family, genus, species, subspecies, rank, ref, source, lpsn, lpsn_parent, lpsn_renamed_to, gbif, gbif_parent, gbif_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 14 October 2022 11:03:47 UTC. Find more info about the structure of this data set here.

+

It was last updated on 14 October 2022 13:45:54 UTC. Find more info about the structure of this data set here.

Direct download links: