From 20d0d4d3e5091f36ccc9e7168b4dd554c7a4b550 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 21:16:06 +0000 Subject: [PATCH] Built site for AMR@2.1.1.9133: 9520977 --- 404.html | 2 +- LICENSE-text.html | 2 +- articles/AMR.html | 68 +--- articles/AMR_for_Python.html | 252 ++++++------- articles/AMR_with_tidymodels.html | 6 +- articles/EUCAST.html | 2 +- articles/MDR.html | 2 +- articles/PCA.html | 2 +- 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 +- index.html | 4 +- news/index.html | 34 +- pkgdown.yml | 2 +- reference/AMR-deprecated.html | 2 +- reference/AMR-options.html | 2 +- reference/AMR.html | 2 +- reference/WHOCC.html | 2 +- reference/WHONET.html | 2 +- reference/ab_from_text.html | 14 +- reference/ab_property.html | 11 +- reference/add_custom_antimicrobials.html | 2 +- reference/add_custom_microorganisms.html | 2 +- reference/age.html | 22 +- reference/age_groups.html | 2 +- reference/antibiogram-1.png | Bin 34842 -> 36532 bytes reference/antibiogram-3.png | Bin 29929 -> 31299 bytes reference/antibiogram.html | 355 ++++++++----------- reference/antibiotics.html | 2 +- reference/antimicrobial_class_selectors.html | 71 +--- reference/as.ab.html | 2 +- reference/as.av.html | 2 +- reference/as.disk.html | 2 +- reference/as.mic.html | 2 +- reference/as.mo.html | 12 +- reference/as.sir.html | 83 ++--- reference/atc_online.html | 10 +- reference/av_from_text.html | 14 +- reference/av_property.html | 2 +- reference/availability.html | 2 +- reference/bug_drug_combinations.html | 26 +- reference/clinical_breakpoints.html | 2 +- reference/count.html | 10 +- reference/custom_eucast_rules.html | 2 +- reference/dosage.html | 2 +- reference/eucast_rules.html | 18 +- reference/example_isolates.html | 2 +- reference/example_isolates_unclean.html | 2 +- reference/export_ncbi_biosample.html | 12 +- reference/first_isolate.html | 55 +-- reference/g.test.html | 2 +- reference/get_episode.html | 103 +++--- reference/ggplot_pca.html | 33 +- reference/ggplot_sir.html | 48 +-- reference/guess_ab_col.html | 10 +- reference/index.html | 29 +- reference/intrinsic_resistant.html | 2 +- reference/italicise_taxonomy.html | 2 +- reference/join.html | 2 +- reference/key_antimicrobials.html | 34 +- reference/kurtosis.html | 6 +- reference/like.html | 2 +- reference/mdro.html | 31 +- reference/mean_amr_distance.html | 73 ++-- reference/microorganisms.codes.html | 2 +- reference/microorganisms.groups.html | 2 +- reference/microorganisms.html | 2 +- reference/mo_matching_score.html | 2 +- reference/mo_property.html | 293 ++++----------- reference/mo_source.html | 8 +- reference/pca.html | 13 +- reference/plot-1.png | Bin 26365 -> 26075 bytes reference/plot-12.png | Bin 38047 -> 37953 bytes reference/plot-13.png | Bin 55743 -> 55308 bytes reference/plot-14.png | Bin 25637 -> 25676 bytes reference/plot-2.png | Bin 26389 -> 26532 bytes reference/plot-3.png | Bin 28311 -> 28270 bytes reference/plot-4.png | Bin 40289 -> 39934 bytes reference/plot-5.png | Bin 40072 -> 40323 bytes reference/plot-6.png | Bin 39408 -> 39601 bytes reference/plot.html | 135 +++---- reference/proportion.html | 60 ++-- reference/random.html | 36 +- reference/resistance_predict.html | 55 +-- reference/skewness.html | 4 +- reference/top_n_microorganisms.html | 192 ++++++++++ reference/translate.html | 2 +- reference/wisca.html | 8 + search.json | 2 +- sitemap.xml | 1 + 93 files changed, 1017 insertions(+), 1320 deletions(-) create mode 100644 reference/top_n_microorganisms.html create mode 100644 reference/wisca.html diff --git a/404.html b/404.html index d4052a65c..9ce965421 100644 --- a/404.html +++ b/404.html @@ -30,7 +30,7 @@ AMR (for R) - 2.1.1.9125 + 2.1.1.9133 + + + + + +
+
+
+ +
+

This function filters a data set to include only the top n microorganisms based on a specified property, such as taxonomic family or genus. For example, it can filter a data set to the top 3 species, or to any species in the top 5 genera, or to the top 3 species in each of the top 5 genera.

+
+ +
+

Usage

+
top_n_microorganisms(x, n, property = "fullname", n_for_each = NULL,
+  col_mo = NULL, ...)
+
+ +
+

Arguments

+ + +
x
+

a data frame containing microbial data

+ + +
n
+

an integer specifying the maximum number of unique values of the property to include in the output

+ + +
property
+

a character string indicating the microorganism property to use for filtering. Must be one of the column names of the microorganisms data set: "mo", "fullname", "status", "kingdom", "phylum", "class", "order", "family", "genus", "species", "subspecies", "rank", "ref", "oxygen_tolerance", "source", "lpsn", "lpsn_parent", "lpsn_renamed_to", "mycobank", "mycobank_parent", "mycobank_renamed_to", "gbif", "gbif_parent", "gbif_renamed_to", "prevalence", or "snomed". If NULL, the raw values from col_mo will be used without transformation.

+ + +
n_for_each
+

an optional integer specifying the maximum number of rows to retain for each value of the selected property. If NULL, all rows within the top n groups will be included.

+ + +
col_mo
+

A character string indicating the column in x that contains microorganism names or codes. Defaults to the first column of class mo. Values will be coerced using as.mo().

+ + +
...
+

Additional arguments passed on to mo_property() when property is not NULL.

+ +
+
+

Details

+

This function is useful for preprocessing data before creating antibiograms or other analyses that require focused subsets of microbial data. For example, it can filter a data set to only include isolates from the top 10 species.

+
+ + +
+

Examples

+
# filter to the top 3 species:
+top_n_microorganisms(example_isolates,
+                     n = 3)
+#> # A tibble: 1,015 × 46
+#>    date       patient   age gender ward     mo           PEN   OXA   FLC   AMX  
+#>    <date>     <chr>   <dbl> <chr>  <chr>    <mo>         <sir> <sir> <sir> <sir>
+#>  1 2002-01-02 A77334     65 F      Clinical B_ESCHR_COLI R     NA    NA    NA   
+#>  2 2002-01-03 A77334     65 F      Clinical B_ESCHR_COLI R     NA    NA    NA   
+#>  3 2002-01-14 462729     78 M      Clinical B_STPHY_AURS R     NA    S     R    
+#>  4 2002-01-14 462729     78 M      Clinical B_STPHY_AURS R     NA    S     R    
+#>  5 2002-01-19 738003     71 M      Clinical B_ESCHR_COLI R     NA    NA    NA   
+#>  6 2002-01-19 738003     71 M      Clinical B_ESCHR_COLI R     NA    NA    NA   
+#>  7 2002-02-03 481442     76 M      ICU      B_STPHY_CONS R     NA    S     NA   
+#>  8 2002-02-14 067927     45 F      ICU      B_STPHY_CONS R     NA    R     NA   
+#>  9 2002-02-14 067927     45 F      ICU      B_STPHY_CONS S     NA    S     NA   
+#> 10 2002-02-21 A56499     64 M      Clinical B_STPHY_CONS S     NA    S     NA   
+#> # ℹ 1,005 more rows
+#> # ℹ 36 more variables: AMC <sir>, AMP <sir>, TZP <sir>, CZO <sir>, FEP <sir>,
+#> #   CXM <sir>, FOX <sir>, CTX <sir>, CAZ <sir>, CRO <sir>, GEN <sir>,
+#> #   TOB <sir>, AMK <sir>, KAN <sir>, TMP <sir>, SXT <sir>, NIT <sir>,
+#> #   FOS <sir>, LNZ <sir>, CIP <sir>, MFX <sir>, VAN <sir>, TEC <sir>,
+#> #   TCY <sir>, TGC <sir>, DOX <sir>, ERY <sir>, CLI <sir>, AZM <sir>,
+#> #   IPM <sir>, MEM <sir>, MTR <sir>, CHL <sir>, COL <sir>, MUP <sir>, …
+
+# filter to any species in the top 5 genera:
+top_n_microorganisms(example_isolates,
+                     n = 5, property = "genus")
+#> # A tibble: 1,742 × 46
+#>    date       patient   age gender ward     mo           PEN   OXA   FLC   AMX  
+#>    <date>     <chr>   <dbl> <chr>  <chr>    <mo>         <sir> <sir> <sir> <sir>
+#>  1 2002-01-02 A77334     65 F      Clinical B_ESCHR_COLI R     NA    NA    NA   
+#>  2 2002-01-03 A77334     65 F      Clinical B_ESCHR_COLI R     NA    NA    NA   
+#>  3 2002-01-07 067927     45 F      ICU      B_STPHY_EPDR R     NA    R     NA   
+#>  4 2002-01-07 067927     45 F      ICU      B_STPHY_EPDR R     NA    R     NA   
+#>  5 2002-01-13 067927     45 F      ICU      B_STPHY_EPDR R     NA    R     NA   
+#>  6 2002-01-13 067927     45 F      ICU      B_STPHY_EPDR R     NA    R     NA   
+#>  7 2002-01-14 462729     78 M      Clinical B_STPHY_AURS R     NA    S     R    
+#>  8 2002-01-14 462729     78 M      Clinical B_STPHY_AURS R     NA    S     R    
+#>  9 2002-01-16 067927     45 F      ICU      B_STPHY_EPDR R     NA    R     NA   
+#> 10 2002-01-17 858515     79 F      ICU      B_STPHY_EPDR R     NA    S     NA   
+#> # ℹ 1,732 more rows
+#> # ℹ 36 more variables: AMC <sir>, AMP <sir>, TZP <sir>, CZO <sir>, FEP <sir>,
+#> #   CXM <sir>, FOX <sir>, CTX <sir>, CAZ <sir>, CRO <sir>, GEN <sir>,
+#> #   TOB <sir>, AMK <sir>, KAN <sir>, TMP <sir>, SXT <sir>, NIT <sir>,
+#> #   FOS <sir>, LNZ <sir>, CIP <sir>, MFX <sir>, VAN <sir>, TEC <sir>,
+#> #   TCY <sir>, TGC <sir>, DOX <sir>, ERY <sir>, CLI <sir>, AZM <sir>,
+#> #   IPM <sir>, MEM <sir>, MTR <sir>, CHL <sir>, COL <sir>, MUP <sir>, …
+
+# filter to the top 3 species in each of the top 5 genera:
+top_n_microorganisms(example_isolates,
+                     n = 5, property = "genus", n_for_each = 3)
+#> # A tibble: 1,497 × 46
+#>    date       patient   age gender ward     mo           PEN   OXA   FLC   AMX  
+#>    <date>     <chr>   <dbl> <chr>  <chr>    <mo>         <sir> <sir> <sir> <sir>
+#>  1 2002-02-21 4FC193     69 M      Clinical B_ENTRC_FACM NA    NA    NA    NA   
+#>  2 2002-04-08 130252     78 M      ICU      B_ENTRC_FCLS NA    NA    NA    NA   
+#>  3 2002-06-23 798871     82 M      Clinical B_ENTRC_FCLS NA    NA    NA    NA   
+#>  4 2002-06-23 798871     82 M      Clinical B_ENTRC_FCLS NA    NA    NA    NA   
+#>  5 2003-04-20 6BC362     62 M      ICU      B_ENTRC      NA    NA    NA    NA   
+#>  6 2003-04-21 6BC362     62 M      ICU      B_ENTRC      NA    NA    NA    NA   
+#>  7 2003-08-13 F35553     52 M      ICU      B_ENTRC_FCLS NA    NA    NA    NA   
+#>  8 2003-09-05 F35553     52 M      ICU      B_ENTRC      NA    NA    NA    NA   
+#>  9 2003-09-05 F35553     52 M      ICU      B_ENTRC_FCLS NA    NA    NA    NA   
+#> 10 2003-09-28 1B0933     80 M      Clinical B_ENTRC      NA    NA    NA    NA   
+#> # ℹ 1,487 more rows
+#> # ℹ 36 more variables: AMC <sir>, AMP <sir>, TZP <sir>, CZO <sir>, FEP <sir>,
+#> #   CXM <sir>, FOX <sir>, CTX <sir>, CAZ <sir>, CRO <sir>, GEN <sir>,
+#> #   TOB <sir>, AMK <sir>, KAN <sir>, TMP <sir>, SXT <sir>, NIT <sir>,
+#> #   FOS <sir>, LNZ <sir>, CIP <sir>, MFX <sir>, VAN <sir>, TEC <sir>,
+#> #   TCY <sir>, TGC <sir>, DOX <sir>, ERY <sir>, CLI <sir>, AZM <sir>,
+#> #   IPM <sir>, MEM <sir>, MTR <sir>, CHL <sir>, COL <sir>, MUP <sir>, …
+
+
+
+ + +
+ + + + + + + diff --git a/reference/translate.html b/reference/translate.html index 43627e76a..a142d013a 100644 --- a/reference/translate.html +++ b/reference/translate.html @@ -7,7 +7,7 @@ AMR (for R) - 2.1.1.9125 + 2.1.1.9133