From e731388cb53741cb53acec2002ab17af9c50240a Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 27 Dec 2022 15:14:41 +0000 Subject: [PATCH] Built site for AMR: 1.8.2.9071@fe09e92 --- 404.html | 2 +- LICENSE-text.html | 2 +- articles/AMR.html | 526 +++++++++--------- .../AMR_files/figure-html/disk_plots-1.png | Bin 38158 -> 38150 bytes .../figure-html/disk_plots_mo_ab-1.png | Bin 52626 -> 52612 bytes .../AMR_files/figure-html/mic_plots-1.png | Bin 28446 -> 28153 bytes .../AMR_files/figure-html/mic_plots-2.png | Bin 35820 -> 39133 bytes .../figure-html/mic_plots_mo_ab-1.png | Bin 38608 -> 38099 bytes .../figure-html/mic_plots_mo_ab-2.png | Bin 49596 -> 51386 bytes articles/AMR_files/figure-html/plot 1-1.png | Bin 43234 -> 43237 bytes articles/AMR_files/figure-html/plot 3-1.png | Bin 28450 -> 28442 bytes articles/AMR_files/figure-html/plot 4-1.png | Bin 78081 -> 78078 bytes articles/AMR_files/figure-html/plot 5-1.png | Bin 49880 -> 49918 bytes articles/EUCAST.html | 2 +- articles/MDR.html | 60 +- articles/PCA.html | 4 +- articles/SPSS.html | 6 +- articles/WHONET.html | 2 +- articles/datasets.html | 4 +- articles/index.html | 2 +- articles/resistance_predict.html | 2 +- articles/welcome_to_AMR.html | 2 +- authors.html | 2 +- extra.css | 6 +- extra.js | 6 +- index.html | 2 +- news/index.html | 26 +- pkgdown.yml | 2 +- reference/AMR-deprecated.html | 2 +- reference/AMR.html | 2 +- reference/Rplot005.png | Bin 12995 -> 13158 bytes reference/Rplot006.png | Bin 12512 -> 12686 bytes reference/Rplot007.png | Bin 12912 -> 13441 bytes reference/Rplot008.png | Bin 19185 -> 17941 bytes reference/Rplot009.png | Bin 8666 -> 8078 bytes reference/WHOCC.html | 2 +- reference/WHONET.html | 2 +- reference/ab_from_text.html | 2 +- reference/ab_property.html | 2 +- reference/add_custom_antimicrobials.html | 37 +- reference/add_custom_microorganisms.html | 280 ++++++++++ reference/age.html | 22 +- reference/age_groups.html | 2 +- reference/antibiotic_class_selectors.html | 2 +- reference/antibiotics.html | 2 +- reference/as.ab.html | 2 +- reference/as.av.html | 2 +- reference/as.disk.html | 2 +- reference/as.mic.html | 2 +- reference/as.mo.html | 2 +- reference/as.rsi.html | 22 +- reference/atc_online.html | 2 +- reference/av_from_text.html | 2 +- reference/av_property.html | 2 +- reference/availability.html | 2 +- reference/bug_drug_combinations.html | 2 +- reference/count.html | 2 +- reference/custom_eucast_rules.html | 2 +- reference/dosage.html | 2 +- reference/eucast_rules.html | 2 +- reference/example_isolates.html | 2 +- reference/example_isolates_unclean.html | 2 +- reference/first_isolate.html | 2 +- reference/g.test.html | 2 +- reference/get_episode.html | 145 ++--- reference/ggplot_pca.html | 2 +- reference/ggplot_rsi.html | 2 +- reference/guess_ab_col.html | 2 +- reference/index.html | 7 +- reference/intrinsic_resistant.html | 2 +- reference/italicise_taxonomy.html | 2 +- reference/join.html | 2 +- reference/key_antimicrobials.html | 2 +- reference/kurtosis.html | 6 +- reference/like.html | 2 +- reference/mdro.html | 2 +- reference/mean_amr_distance.html | 78 +-- reference/microorganisms.codes.html | 2 +- reference/microorganisms.html | 2 +- reference/mo_matching_score.html | 2 +- reference/mo_property.html | 2 +- reference/mo_source.html | 2 +- reference/pca.html | 2 +- reference/plot-1.png | Bin 26205 -> 27288 bytes reference/plot-2.png | Bin 26360 -> 26541 bytes reference/plot-3.png | Bin 28423 -> 28409 bytes reference/plot-4.png | Bin 38110 -> 39045 bytes reference/plot-5.png | Bin 38032 -> 38206 bytes reference/plot-6.png | Bin 36823 -> 36922 bytes reference/plot-7.png | Bin 37581 -> 37882 bytes reference/plot-8.png | Bin 56904 -> 54736 bytes reference/plot-9.png | Bin 26451 -> 24756 bytes reference/plot.html | 2 +- reference/proportion.html | 2 +- reference/random.html | 35 +- reference/resistance_predict.html | 2 +- reference/rsi_translation.html | 2 +- reference/skewness.html | 4 +- reference/translate.html | 2 +- search.json | 2 +- sitemap.xml | 3 + 101 files changed, 844 insertions(+), 549 deletions(-) create mode 100644 reference/add_custom_microorganisms.html diff --git a/404.html b/404.html index e412b414..dbb9ee53 100644 --- a/404.html +++ b/404.html @@ -36,7 +36,7 @@ AMR (for R) - 1.8.2.9069 + 1.8.2.9071 + + + + + +
+
+
+ +
+

With add_custom_microorganisms() you can add your own custom antimicrobial drug codes to the AMR package.

+
+ +
+

Usage

+
add_custom_microorganisms(x)
+
+clear_custom_microorganisms()
+
+ +
+

Arguments

+
x
+

a data.frame resembling the microorganisms data set, at least containing columns "mo", "genus" and "species"

+ +
+
+

Details

+

This function will fill in missing taxonomy for you, if specific taxonomic columns are missing, see Examples.

+

Important: Due to how R works, the add_custom_microorganisms() function has to be run in every R session - added microorganisms are not stored between sessions and are thus lost when R is exited.

+

There are two ways to automate this process:

+

Method 1: Save the microorganisms to a local or remote file (can even be the internet). To use this method:

  1. Create a data set in the structure of the microorganisms data set (containing at the very least columns "ab" and "name") and save it with saveRDS() to a location of choice, e.g. "~/my_custom_mo.rds", or any remote location.

  2. +
  3. Set the file location to the AMR_custom_mo R option: options(AMR_custom_mo = "~/my_custom_mo.rds"). This can even be a remote file location, such as an https URL. Since options are not saved between R sessions, it is best to save this option to the .Rprofile file so that it will loaded on start-up of R. To do this, open the .Rprofile file using e.g. utils::file.edit("~/.Rprofile"), add this text and save the file:

    +

    # Add custom microorganism codes:
    +options(AMR_custom_mo = "~/my_custom_mo.rds")

    +

    Upon package load, this file will be loaded and run through the add_custom_microorganisms() function.

  4. +

Method 2: Save the microorganism directly to your .Rprofile file. An important downside is that this requires to load the AMR package at every start-up. To use this method:

  1. Edit the .Rprofile file using e.g. utils::file.edit("~/.Rprofile").

  2. +
  3. Add a text like below and save the file:

    +

     # Add custom antibiotic drug codes:
    + library(AMR)
    + add_custom_microorganisms(
    +   data.frame(mo = "ENT_ASB_CLO",
    +              genus = "Enterobacter",
    +              species = "asburiae/cloacae")
    + )

  4. +

Use clear_custom_microorganisms() to clear the previously added antimicrobials.

+
+
+

See also

+

add_custom_antimicrobials() to add custom antimicrobials to this package.

+
+ +
+

Examples

+
# \donttest{
+
+# a combination of species is not formal taxonomy, so
+# this will result in only "Enterobacter asburiae":
+mo_name("Enterobacter asburiae/cloacae")
+#> [1] "Enterobacter asburiae"
+
+# now add a custom entry - it will be considered by as.mo() and
+# all mo_*() functions
+add_custom_microorganisms(
+  data.frame(mo = "ENT_ASB_CLO",
+             genus = "Enterobacter",
+             species = "asburiae/cloacae"
+  )
+)
+#> ℹ Added one record to the internal microorganisms data set.
+
+# "ENT_ASB_CLO" is now a new microorganism:
+mo_name("Enterobacter asburiae/cloacae")
+#> [1] "Enterobacter asburiae/cloacae"
+as.mo("ent_asb_clo")
+#> Class 'mo'
+#> [1] ENT_ASB_CLO
+mo_name("ent_asb_clo")
+#> [1] "Enterobacter asburiae/cloacae"
+# all internal algorithms will work as well:
+mo_name("Ent asburia cloacae")
+#> [1] "Enterobacter asburiae/cloacae"
+
+# and even the taxonomy was added based on the genus!
+mo_family("ent_asb_clo")
+#> [1] "Enterobacteriaceae"
+mo_gramstain("Enterobacter asburiae/cloacae")
+#> [1] "Gram-negative"
+
+mo_info("ent_asb_clo")
+#> $kingdom
+#> [1] "Bacteria"
+#> 
+#> $phylum
+#> [1] "Pseudomonadota"
+#> 
+#> $class
+#> [1] "Gammaproteobacteria"
+#> 
+#> $order
+#> [1] "Enterobacterales"
+#> 
+#> $family
+#> [1] "Enterobacteriaceae"
+#> 
+#> $genus
+#> [1] "Enterobacter"
+#> 
+#> $species
+#> [1] "asburiae/cloacae"
+#> 
+#> $subspecies
+#> [1] NA
+#> 
+#> $status
+#> [1] "accepted"
+#> 
+#> $synonyms
+#> NULL
+#> 
+#> $gramstain
+#> [1] "Gram-negative"
+#> 
+#> $url
+#> [1] ""
+#> 
+#> $ref
+#> [1] NA
+#> 
+#> $snomed
+#> character(0)
+#> 
+# }
+
+
+
+ + +
+ + + + + + + diff --git a/reference/age.html b/reference/age.html index edb98180..86c024ff 100644 --- a/reference/age.html +++ b/reference/age.html @@ -10,7 +10,7 @@ AMR (for R) - 1.8.2.9069 + 1.8.2.9071