From f03933940c799face7ff2856b52f065e6f638448 Mon Sep 17 00:00:00 2001 From: Matthijs Berends Date: Mon, 27 Jan 2025 21:43:10 +0100 Subject: [PATCH] (v2.1.1.9131) implement testthat --- ...ecent.yaml => check-current-testthat.yaml} | 27 +- ...check-old.yaml => check-old-tinytest.yaml} | 3 + .github/workflows/publish-to-pypi.yml | 1 - DESCRIPTION | 2 +- NEWS.md | 2 +- PythonPackage/AMR/AMR.egg-info/PKG-INFO | 2 +- ...ny.whl => AMR-2.1.1.9131-py3-none-any.whl} | Bin 10161 -> 10161 bytes PythonPackage/AMR/dist/amr-2.1.1.9129.tar.gz | Bin 9995 -> 0 bytes PythonPackage/AMR/dist/amr-2.1.1.9131.tar.gz | Bin 0 -> 10013 bytes PythonPackage/AMR/setup.py | 2 +- R/ggplot_pca.R | 2 +- R/ggplot_sir.R | 10 +- R/plotting.R | 8 +- data-raw/_generate_GPT_knowledge_input.sh | 27 +- ....txt => gpt_training_text_v2.1.1.9131.txt} | 283 +++++------------- data-raw/reproduction_of_microorganisms.R | 6 +- tests/testthat.R | 45 +++ .../testthat}/test-_deprecated.R | 0 {inst/tests => tests/testthat}/test-_misc.R | 9 - {inst/tests => tests/testthat}/test-ab.R | 0 .../testthat}/test-ab_from_text.R | 0 .../testthat}/test-ab_property.R | 0 .../testthat}/test-ab_selectors.R | 0 {inst/tests => tests/testthat}/test-age.R | 0 .../testthat}/test-antibiogram.R | 0 .../testthat}/test-atc_online.R | 0 {inst/tests => tests/testthat}/test-av.R | 0 .../testthat}/test-av_from_text.R | 0 .../testthat}/test-av_property.R | 0 .../testthat}/test-availability.R | 0 .../testthat}/test-bug_drug_combinations.R | 0 {inst/tests => tests/testthat}/test-count.R | 0 .../testthat}/test-custom_antimicrobials.R | 0 .../testthat}/test-custom_microorganisms.R | 0 {inst/tests => tests/testthat}/test-data.R | 0 {inst/tests => tests/testthat}/test-disk.R | 0 .../testthat}/test-eucast_rules.R | 0 .../testthat}/test-first_isolate.R | 0 {inst/tests => tests/testthat}/test-g.test.R | 0 .../testthat}/test-get_episode.R | 0 .../testthat}/test-ggplot_sir.R | 0 .../testthat}/test-guess_ab_col.R | 0 .../testthat}/test-italicise_taxonomy.R | 0 .../testthat}/test-join_microorganisms.R | 0 .../testthat}/test-key_antimicrobials.R | 0 .../tests => tests/testthat}/test-kurtosis.R | 0 {inst/tests => tests/testthat}/test-like.R | 0 {inst/tests => tests/testthat}/test-mdro.R | 0 .../testthat}/test-mean_amr_distance.R | 0 {inst/tests => tests/testthat}/test-mic.R | 0 {inst/tests => tests/testthat}/test-mo.R | 0 .../testthat}/test-mo_property.R | 0 {inst/tests => tests/testthat}/test-pca.R | 0 .../testthat}/test-proportion.R | 0 {inst/tests => tests/testthat}/test-random.R | 0 .../testthat}/test-resistance_predict.R | 0 {inst/tests => tests/testthat}/test-sir.R | 0 .../tests => tests/testthat}/test-skewness.R | 0 .../testthat}/test-top_n_microorganisms.R | 0 .../tests => tests/testthat}/test-translate.R | 0 {inst/tests => tests/testthat}/test-vctrs.R | 0 {inst/tests => tests/testthat}/test-zzz.R | 1 - tests/{tinytest.R => tinytest.R.old} | 9 +- 63 files changed, 172 insertions(+), 267 deletions(-) rename .github/workflows/{check-recent.yaml => check-current-testthat.yaml} (83%) rename .github/workflows/{check-old.yaml => check-old-tinytest.yaml} (97%) rename PythonPackage/AMR/dist/{AMR-2.1.1.9129-py3-none-any.whl => AMR-2.1.1.9131-py3-none-any.whl} (84%) delete mode 100644 PythonPackage/AMR/dist/amr-2.1.1.9129.tar.gz create mode 100644 PythonPackage/AMR/dist/amr-2.1.1.9131.tar.gz rename data-raw/{gpt_training_text_v2.1.1.9129.txt => gpt_training_text_v2.1.1.9131.txt} (98%) create mode 100644 tests/testthat.R rename {inst/tests => tests/testthat}/test-_deprecated.R (100%) rename {inst/tests => tests/testthat}/test-_misc.R (87%) rename {inst/tests => tests/testthat}/test-ab.R (100%) rename {inst/tests => tests/testthat}/test-ab_from_text.R (100%) rename {inst/tests => tests/testthat}/test-ab_property.R (100%) rename {inst/tests => tests/testthat}/test-ab_selectors.R (100%) rename {inst/tests => tests/testthat}/test-age.R (100%) rename {inst/tests => tests/testthat}/test-antibiogram.R (100%) rename {inst/tests => tests/testthat}/test-atc_online.R (100%) rename {inst/tests => tests/testthat}/test-av.R (100%) rename {inst/tests => tests/testthat}/test-av_from_text.R (100%) rename {inst/tests => tests/testthat}/test-av_property.R (100%) rename {inst/tests => tests/testthat}/test-availability.R (100%) rename {inst/tests => tests/testthat}/test-bug_drug_combinations.R (100%) rename {inst/tests => tests/testthat}/test-count.R (100%) rename {inst/tests => tests/testthat}/test-custom_antimicrobials.R (100%) rename {inst/tests => tests/testthat}/test-custom_microorganisms.R (100%) rename {inst/tests => tests/testthat}/test-data.R (100%) rename {inst/tests => tests/testthat}/test-disk.R (100%) rename {inst/tests => tests/testthat}/test-eucast_rules.R (100%) rename {inst/tests => tests/testthat}/test-first_isolate.R (100%) rename {inst/tests => tests/testthat}/test-g.test.R (100%) rename {inst/tests => tests/testthat}/test-get_episode.R (100%) rename {inst/tests => tests/testthat}/test-ggplot_sir.R (100%) rename {inst/tests => tests/testthat}/test-guess_ab_col.R (100%) rename {inst/tests => tests/testthat}/test-italicise_taxonomy.R (100%) rename {inst/tests => tests/testthat}/test-join_microorganisms.R (100%) rename {inst/tests => tests/testthat}/test-key_antimicrobials.R (100%) rename {inst/tests => tests/testthat}/test-kurtosis.R (100%) rename {inst/tests => tests/testthat}/test-like.R (100%) rename {inst/tests => tests/testthat}/test-mdro.R (100%) rename {inst/tests => tests/testthat}/test-mean_amr_distance.R (100%) rename {inst/tests => tests/testthat}/test-mic.R (100%) rename {inst/tests => tests/testthat}/test-mo.R (100%) rename {inst/tests => tests/testthat}/test-mo_property.R (100%) rename {inst/tests => tests/testthat}/test-pca.R (100%) rename {inst/tests => tests/testthat}/test-proportion.R (100%) rename {inst/tests => tests/testthat}/test-random.R (100%) rename {inst/tests => tests/testthat}/test-resistance_predict.R (100%) rename {inst/tests => tests/testthat}/test-sir.R (100%) rename {inst/tests => tests/testthat}/test-skewness.R (100%) rename {inst/tests => tests/testthat}/test-top_n_microorganisms.R (100%) rename {inst/tests => tests/testthat}/test-translate.R (100%) rename {inst/tests => tests/testthat}/test-vctrs.R (100%) rename {inst/tests => tests/testthat}/test-zzz.R (99%) rename tests/{tinytest.R => tinytest.R.old} (94%) diff --git a/.github/workflows/check-recent.yaml b/.github/workflows/check-current-testthat.yaml similarity index 83% rename from .github/workflows/check-recent.yaml rename to .github/workflows/check-current-testthat.yaml index 3d2e9663d..c00d160b2 100644 --- a/.github/workflows/check-recent.yaml +++ b/.github/workflows/check-current-testthat.yaml @@ -55,31 +55,34 @@ jobs: # current development version, check all major OSes: - {os: macOS-latest, r: 'devel', allowfail: false} - {os: windows-latest, r: 'devel', allowfail: false} - - {os: ubuntu-latest, r: 'devel', allowfail: false} + - {os: ubuntu-latest, r: 'devel', allowfail: false, http-user-agent: 'release'} # current 'release' version, check all major OSes: - {os: macOS-latest, r: 'release', allowfail: false} - {os: windows-latest, r: 'release', allowfail: false} - {os: ubuntu-latest, r: 'release', allowfail: false} - # older versions (see also check-old.yaml for even older versions): + # older versions (see also check-old-tinytest.yaml for even older versions): - {os: ubuntu-latest, r: '4.3', allowfail: false} - {os: ubuntu-latest, r: '4.2', allowfail: false} - {os: ubuntu-latest, r: '4.1', allowfail: false} - - {os: ubuntu-latest, r: '4.0', allowfail: false} # when a new R releases, this one has to move to check-old.yaml + - {os: ubuntu-latest, r: '4.0', allowfail: false} + - {os: ubuntu-latest, r: '3.6', allowfail: false} + # when testthat loses support for a version, move it to check-old-tinytest.yaml env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_KEEP_PKG_SOURCE: yes steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2 - uses: r-lib/actions/setup-r@v2 with: r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} # use RStudio Package Manager to quickly install packages use-public-rspm: true @@ -87,17 +90,9 @@ jobs: with: extra-packages: any::rcmdcheck needs: check + upgrade: 'TRUE' - uses: r-lib/actions/check-r-package@v2 - env: - _R_CHECK_LENGTH_1_CONDITION_: verbose - _R_CHECK_LENGTH_1_LOGIC2_: verbose - # during 'R CMD check', R_LIBS_USER will be overwritten, so: - R_LIBS_USER_GH_ACTIONS: ${{ env.R_LIBS_USER }} - R_RUN_TINYTEST: true - - - name: Show tinytest output - if: always() - run: | - find . -name 'tinytest.Rout*' -exec cat '{}' \; || true - shell: bash + with: + upload-snapshots: true + build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' diff --git a/.github/workflows/check-old.yaml b/.github/workflows/check-old-tinytest.yaml similarity index 97% rename from .github/workflows/check-old.yaml rename to .github/workflows/check-old-tinytest.yaml index 4ffeb7524..b740a953d 100644 --- a/.github/workflows/check-old.yaml +++ b/.github/workflows/check-old-tinytest.yaml @@ -110,6 +110,9 @@ jobs: # this is a required value to run the unit tests: R_RUN_TINYTEST: true run: | + mv tests/testthat inst/ + rm tests/testthat.R + mv tests/tinytest.R.old tests/tinytest.R cd .. R CMD build AMR R CMD check --as-cran --no-manual --run-donttest AMR_*.tar.gz diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 968458734..742ee59ef 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -39,7 +39,6 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout code uses: actions/checkout@v3 diff --git a/DESCRIPTION b/DESCRIPTION index 69f382ee8..011ea1bf1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 2.1.1.9129 +Version: 2.1.1.9131 Date: 2025-01-27 Title: Antimicrobial Resistance Data Analysis Description: Functions to simplify and standardise antimicrobial resistance (AMR) diff --git a/NEWS.md b/NEWS.md index 3e1cee524..5a8659664 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 2.1.1.9129 +# AMR 2.1.1.9131 *(this beta version will eventually become v3.0. We're happy to reach a new major milestone soon, which will be all about the new One Health support! Install this beta using [the instructions here](https://msberends.github.io/AMR/#latest-development-version).)* diff --git a/PythonPackage/AMR/AMR.egg-info/PKG-INFO b/PythonPackage/AMR/AMR.egg-info/PKG-INFO index 30b6ef0b2..943704a47 100644 --- a/PythonPackage/AMR/AMR.egg-info/PKG-INFO +++ b/PythonPackage/AMR/AMR.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.2 Name: AMR -Version: 2.1.1.9129 +Version: 2.1.1.9131 Summary: A Python wrapper for the AMR R package Home-page: https://github.com/msberends/AMR Author: Matthijs Berends diff --git a/PythonPackage/AMR/dist/AMR-2.1.1.9129-py3-none-any.whl b/PythonPackage/AMR/dist/AMR-2.1.1.9131-py3-none-any.whl similarity index 84% rename from PythonPackage/AMR/dist/AMR-2.1.1.9129-py3-none-any.whl rename to PythonPackage/AMR/dist/AMR-2.1.1.9131-py3-none-any.whl index de4518af6e321966a3fab8d55ed354c91422f886..785e61c5a0a52a7bfc2a88b3775fc69367140953 100644 GIT binary patch delta 627 zcmdn!ztNv3z?+#xgn@y9gP~&SMxJn1ri!JTQ(1XgKy(S`5^j#lrPfh@=ATKKtRO1E zWNbLuO0<&6N_X>C(P~~LklebyACF^z21Em~91uJD2I(5<83LiDAy9dcav4+Q(#fZk zlT6?Ba%TPiv;BKMNG69F_kDb$cS)8!|$^1X00-g1FW`%ISeX0Q|l3DvN zUp%#KJAZlX>~jy#d(=ALyV8DX@8Rmqn0tR(5`^Ax|Nbj9IsB3C^-D}MPQBO2U$eNW^s~?}?sRVa_^FFXeHGk7taU%2O9!L*AcZiUQKfZ2yd9Zk>+JVEpif zGr*gXNrV}e7A9|1wFahv$)6yUzM2gpB^0Zvfg*FZnmj0K_o(TBqgG7@#N$v0^UTy$ R!0JH}Jvm7otiDTK9RT*H0mA?Q delta 627 zcmdn!ztNv3z?+#xgn@y9gTb_FBTqOhlWEoFR90RV5M9E#gqy>x$~vl~E$_x;1yKnm zBg@HFqLoayoHuV3t>#q%$*t@A@i+!(Kr|4`0kNZRkgk!QArM*`0+k0Tmob@DO+KY8 z2h#jXS)(4L>Hi$pwj@TNtxOCI@)(-*QZkE6bTjkP^7VsUo&AGcYR~%?FEU^__OaUD zdqX2vB%dwI($I;bYo750sAxX0=B z6wl?VYx9;_S@Es33ja8@qdr0FQ>wcD;}Zop;+xV0Sx%H}E}PxLFthkagT2f-mDjCr z_FH_?)V{UoE8C6I&pA`~D_I8$s-^#{yS}JIP+Rqirqu0SY;CDG>gT4c&@)=Sdi{lG zx>pr+C-Xh;c*;AwYxcvv8sYCgu2*s|t=Mv1Qrb-=%fQ@M`0qrMCrSogg1v2x_RIh&W~AFVBEJKBWx{!e!U3FE802^;E6H^6A6qck{ds$-dLSc8fpZ_5H=0@-h_j z7R@*rSoi3}=0DSfc10I%n(cHyXN(pR%Vq=aHMHBe;ER+9%s?H)B9aMY^FfOs70V4j(} S3RpcTq9-S*gVlGbs{;W25CI(k diff --git a/PythonPackage/AMR/dist/amr-2.1.1.9129.tar.gz b/PythonPackage/AMR/dist/amr-2.1.1.9129.tar.gz deleted file mode 100644 index 58447fa5db8b3f24c611f44c4b95a512d31e9575..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9995 zcmch7RZtv2vo7uq!Gi~P4X(kRKyW9xyYAxd65K5bkPuuKcellYJHd5UcD??6PmR2rvt04-Q^Vp0_2;!z;|`W#IvL7Hsdi*80az z;`Ga<-#Ld0i_y|~MWIH4YF5sA`k>A9gs`uN4rNRPLqZ!i$x1GR?t^P5=pkhE6s1>< zKzb#;bp$DUkZ2jHog&dx>i4Yp2^DlVZ2eU+Rtc(LR(`vqecuA6z-e%-xp+Wm3$H$-_mc8{W^d1dUg4D+qjvR&|bEi-h0)0rGga$Z4Yn@ zxE(xzUHMVM3I+gy;acufBnL2aF>;ByAzWeDnYnWC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U%|AW~Lb9j0%L%f56TRLE(YN+>Zhj0IfjGJMBGa4sz z5XqCbU~qL7mh_th^qdoQjjR^`ADN)O+Im)4!x-$P_5eVI^Tgzk8xr^o*p&q)uDont zOYUCbo<74A`bQPdV8JohNmGX+h4)w8@6y^N60>a_4#{B_rC|5EJ40o{x5ReCv^HVY z*UrlT*SnQN(7@|MblKevwS0KJ2y9y#!|ZUoEQvY>$&yLx`olzma3yEhOY!1PlXEvM z8CYcMfwpxsS%{fy*OPAQfzN`#H*I(tGqFkZ%B23;NF(jB2;}%d#qzl|ih+C^1aU`! z#QCk2RO5?Q?CxStJ%DjjmZvwDAjc?&&qhh9cy4W0Sip&bsWvVltdXXJ!Uk@dHwq1Qq zQm~AXmqcIK)uEVrfP_-)nEGhSS+M(ll%$vZvp8%^q#z!mo24`>A*q6BE;5$&y)=&X WNA>^hcKt33hC65wgbud_5BFb;&D;6_ diff --git a/PythonPackage/AMR/dist/amr-2.1.1.9131.tar.gz b/PythonPackage/AMR/dist/amr-2.1.1.9131.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..2f87749444bf33ef6d5e5b54ba750c5413624b5f GIT binary patch literal 10013 zcmch7WlS7Uw=Fv8pv9p$l;RFW26u|Jw7^i@iaRYX#eFF5PI0$l#bI!Fcc_5Qq|HqdxOo39QC@ytE;kbwq%&U| z*Oit!Ysr&OmtO0fs%!@H=SA5XS!&5?tB`(+38<*&wKjEl2vc+`kZdWP>EpfQYS+Er z@Cl$tok)5K@{oYV6UA184Ju3klL~n&B5J6yZok~ajMW>F{!qk=vpEoXm zFu3CKSpmiyEdnCiHvb#@ht#w)^Z*v+ea9SQ%g(_;EN*8j8%M(Q>C$}1I8?kHXb}}^AL&| zF#p^eMDQU3Vh=+Udb+&R0&K3#AT+)hz4lFb^cRMMPUFH<5dQoyf1agTglrLlRt|wb ze}mX;SkXyG7|bKu#;Hk zLI$G7EM=dBQFbslS!rdVSINszHZ%nr53 zp^~4$r*Z&+`?Vp+Dr+8n7gh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e&>4Pgzy?141Ue$bNtzukUT*F1ydQfnKKHj$D33sb+y(EtDd literal 0 HcmV?d00001 diff --git a/PythonPackage/AMR/setup.py b/PythonPackage/AMR/setup.py index 51c775221..c4cc427cd 100644 --- a/PythonPackage/AMR/setup.py +++ b/PythonPackage/AMR/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name='AMR', - version='2.1.1.9129', + version='2.1.1.9131', packages=find_packages(), install_requires=[ 'rpy2', diff --git a/R/ggplot_pca.R b/R/ggplot_pca.R index 72e86aa03..0b1d3b95f 100755 --- a/R/ggplot_pca.R +++ b/R/ggplot_pca.R @@ -244,7 +244,7 @@ ggplot_pca <- function(x, g <- g + ggplot2::geom_path( data = ell, ggplot2::aes(colour = groups, group = groups), - size = ellipse_size, + linewidth = ellipse_size, alpha = points_alpha ) } diff --git a/R/ggplot_sir.R b/R/ggplot_sir.R index 59207cf49..16f97efb6 100755 --- a/R/ggplot_sir.R +++ b/R/ggplot_sir.R @@ -211,8 +211,7 @@ ggplot_sir <- function(data, meet_criteria(caption, allow_class = "character", has_length = 1, allow_NULL = TRUE) meet_criteria(x.title, allow_class = "character", has_length = 1, allow_NULL = TRUE) meet_criteria(y.title, allow_class = "character", has_length = 1, allow_NULL = TRUE) - - # we work with aes_string later on + x_deparse <- deparse(substitute(x)) if (x_deparse != "x") { x <- x_deparse @@ -309,8 +308,7 @@ geom_sir <- function(position = NULL, if (identical(position, "fill")) { position <- ggplot2::position_fill(vjust = 0.5, reverse = TRUE) } - - # we work with aes_string later on + x_deparse <- deparse(substitute(x)) if (x_deparse != "x") { x <- x_deparse @@ -324,7 +322,7 @@ geom_sir <- function(position = NULL, } else if (tolower(x) %in% tolower(c("SIR", "sir", "interpretations", "result"))) { x <- "interpretation" } - + ggplot2::geom_col( data = function(x) { sir_df( @@ -335,7 +333,7 @@ geom_sir <- function(position = NULL, combine_SI = combine_SI ) }, - mapping = ggplot2::aes_string(x = x, y = y, fill = fill), + mapping = utils::modifyList(ggplot2::aes(), list(x = str2lang(x), y = str2lang(y), fill = str2lang(fill))), position = position, ... ) diff --git a/R/plotting.R b/R/plotting.R index 29135e16b..a81bdf880 100755 --- a/R/plotting.R +++ b/R/plotting.R @@ -956,7 +956,6 @@ facet_sir <- function(facet = c("interpretation", "antibiotic"), nrow = NULL) { meet_criteria(facet, allow_class = "character", has_length = 1) meet_criteria(nrow, allow_class = c("numeric", "integer"), has_length = 1, allow_NULL = TRUE, is_positive = TRUE, is_finite = TRUE) - # we work with aes_string later on facet_deparse <- deparse(substitute(facet)) if (facet_deparse != "facet") { facet <- facet_deparse @@ -1107,13 +1106,10 @@ labels_sir_count <- function(position = NULL, if (identical(position, "fill")) { position <- ggplot2::position_fill(vjust = 0.5, reverse = TRUE) } + x_name <- x ggplot2::geom_text( - mapping = ggplot2::aes_string( - label = "lbl", - x = x, - y = "value" - ), + mapping = utils::modifyList(ggplot2::aes(), list(label = str2lang("lbl"), x = str2lang(x), y = str2lang("value"))), position = position, inherit.aes = FALSE, size = datalabels.size, diff --git a/data-raw/_generate_GPT_knowledge_input.sh b/data-raw/_generate_GPT_knowledge_input.sh index 87fe9c7cf..fe5d86726 100644 --- a/data-raw/_generate_GPT_knowledge_input.sh +++ b/data-raw/_generate_GPT_knowledge_input.sh @@ -13,9 +13,12 @@ version="$1" output_file="data-raw/gpt_training_text_v${version}.txt" # Clear the output file if it exists -echo "This files contains all context you must know about the AMR package for R." > "$output_file" +echo "This knowledge base contains all context you must know about the AMR package for R. You are a GPT trained to be an assistant for the AMR package in R. You are an incredible R specialist, especially trained in this package and in the tidyverse." > "$output_file" +echo "" >> "$output_file" echo "First and foremost, you are trained on version ${version}. Remember this whenever someone asks which AMR package version you’re at." >> "$output_file" -echo "--------------------------------" >> "$output_file" +echo "" >> "$output_file" +echo "Below are the contents of the `NAMESPACE` file, the `index.md` file, and all the `man/*.Rd` files (documentation) in the package. Every file content is split using 100 hypens." >> "$output_file" +echo "----------------------------------------------------------------------------------------------------" >> "$output_file" echo "" >> "$output_file" # Function to remove header block (delimited by # ======) @@ -23,8 +26,9 @@ remove_header() { sed '/# =\{6,\}/,/# =\{6,\}/d' "$1" } -# Process all .R files in the 'R' folder +# # Process all .R files in the 'R' folder # for file in R/*.R; do +# echo "--------------------------------------------------" >> "$output_file" # echo "THE PART HEREAFTER CONTAINS CONTENTS FROM FILE '$file':" >> "$output_file" # echo -e "\n" >> "$output_file" # remove_header "$file" >> "$output_file" @@ -34,6 +38,7 @@ remove_header() { # Process important metadata files (DESCRIPTION, NAMESPACE, index.md) for file in NAMESPACE index.md; do if [[ -f $file ]]; then + echo "----------------------------------------------------------------------------------------------------" >> "$output_file" echo "THE PART HEREAFTER CONTAINS CONTENTS FROM FILE '$file':" >> "$output_file" echo -e "\n" >> "$output_file" cat "$file" >> "$output_file" @@ -43,6 +48,7 @@ done # Process all .Rd files from the 'man' folder for file in man/*.Rd; do + echo "----------------------------------------------------------------------------------------------------" >> "$output_file" echo "THE PART HEREAFTER CONTAINS CONTENTS FROM FILE '$file':" >> "$output_file" echo -e "\n" >> "$output_file" remove_header "$file" >> "$output_file" @@ -51,19 +57,20 @@ done # Process all .Rmd files in the 'vignettes' folder for file in vignettes/*.Rmd; do + echo "----------------------------------------------------------------------------------------------------" >> "$output_file" echo "THE PART HEREAFTER CONTAINS CONTENTS FROM FILE '$file':" >> "$output_file" echo -e "\n" >> "$output_file" remove_header "$file" >> "$output_file" echo -e "\n\n" >> "$output_file" done -# Process all .Rmd files in the 'vignettes' folder -echo "THE PART HEREAFTER CONTAINS THE README OF OUR PYTHON PACKAGE" >> "$output_file" -echo -e "\n" >> "$output_file" -for file in PythonPackage/AMR/README.md; do - remove_header "$file" >> "$output_file" - echo -e "\n\n" >> "$output_file" -done +# Process README.md +# echo "THE PART HEREAFTER CONTAINS THE README OF OUR PYTHON PACKAGE" >> "$output_file" +# echo -e "\n" >> "$output_file" +# for file in PythonPackage/AMR/README.md; do +# remove_header "$file" >> "$output_file" +# echo -e "\n\n" >> "$output_file" +# done # Process test files (if available) in the 'tests' folder # for file in tests/*.R; do diff --git a/data-raw/gpt_training_text_v2.1.1.9129.txt b/data-raw/gpt_training_text_v2.1.1.9131.txt similarity index 98% rename from data-raw/gpt_training_text_v2.1.1.9129.txt rename to data-raw/gpt_training_text_v2.1.1.9131.txt index f7252d947..478b94be3 100644 --- a/data-raw/gpt_training_text_v2.1.1.9129.txt +++ b/data-raw/gpt_training_text_v2.1.1.9131.txt @@ -1,7 +1,11 @@ -This files contains all context you must know about the AMR package for R. -First and foremost, you are trained on version 2.1.1.9129. Remember this whenever someone asks which AMR package version you’re at. --------------------------------- +This knowledge base contains all context you must know about the AMR package for R. You are a GPT trained to be an assistant for the AMR package in R. You are an incredible R specialist, especially trained in this package and in the tidyverse. +First and foremost, you are trained on version 2.1.1.9131. Remember this whenever someone asks which AMR package version you’re at. + +Below are the contents of the file, the file, and all the files (documentation) in the package. Every file content is split using 100 hypens. +---------------------------------------------------------------------------------------------------- + +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'NAMESPACE': @@ -371,6 +375,7 @@ importFrom(stats,var) +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'index.md': @@ -688,6 +693,7 @@ This R package is free, open-source software and licensed under the [GNU General +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/AMR-deprecated.Rd': @@ -710,6 +716,7 @@ These functions are so-called '\link{Deprecated}'. \strong{They will be removed +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/AMR-options.Rd': @@ -774,6 +781,7 @@ Now the team settings are configured in only one place, and can be maintained th +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/AMR.Rd': @@ -870,6 +878,7 @@ Other contributors: +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/WHOCC.Rd': @@ -901,6 +910,7 @@ ab_tradenames("flucloxacillin") +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/WHONET.Rd': @@ -957,6 +967,7 @@ WHONET +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/ab_from_text.Rd': @@ -1057,6 +1068,7 @@ if (require("dplyr")) { +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/ab_property.Rd': @@ -1235,6 +1247,7 @@ if (require("dplyr")) { +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/add_custom_antimicrobials.Rd': @@ -1345,6 +1358,7 @@ x[, betalactams()] +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/add_custom_microorganisms.Rd': @@ -1464,6 +1478,7 @@ mo_gramstain(c("C. freundii complex", "C. braakii complex")) +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/age.Rd': @@ -1518,6 +1533,7 @@ To split ages into groups, use the \code{\link[=age_groups]{age_groups()}} funct +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/age_groups.Rd': @@ -1600,6 +1616,7 @@ To determine ages, based on one or more reference dates, use the \code{\link[=ag +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/antibiogram.Rd': @@ -2002,6 +2019,7 @@ plot(ab2) +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/antibiotics.Rd': @@ -2096,6 +2114,7 @@ antivirals +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/antimicrobial_class_selectors.Rd': @@ -2476,6 +2495,7 @@ if (require("data.table")) { +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/as.ab.Rd': @@ -2587,6 +2607,7 @@ if (require("dplyr")) { +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/as.av.Rd': @@ -2683,6 +2704,7 @@ av_name("acicl") +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/as.disk.Rd': @@ -2760,6 +2782,7 @@ as.sir(df, uti = TRUE) +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/as.mic.Rd': @@ -2901,6 +2924,7 @@ if (require("ggplot2")) { +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/as.mo.Rd': @@ -3167,6 +3191,7 @@ The \code{\link[=mo_property]{mo_*}} functions (such as \code{\link[=mo_genus]{m +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/as.sir.Rd': @@ -3562,6 +3587,7 @@ if (require("dplyr")) { +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/atc_online.Rd': @@ -3649,6 +3675,7 @@ if (requireNamespace("curl") && requireNamespace("rvest") && requireNamespace("x +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/av_from_text.Rd': @@ -3712,6 +3739,7 @@ av_from_text("28/03/2020 valaciclovir po tid", type = "admin") +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/av_property.Rd': @@ -3835,6 +3863,7 @@ av_name("J05AB01") +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/availability.Rd': @@ -3874,6 +3903,7 @@ if (require("dplyr")) { +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/bug_drug_combinations.Rd': @@ -3960,6 +3990,7 @@ bug_drug_combinations(example_isolates, +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/clinical_breakpoints.Rd': @@ -4038,6 +4069,7 @@ clinical_breakpoints +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/count.Rd': @@ -4241,6 +4273,7 @@ if (require("dplyr")) { +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/custom_eucast_rules.Rd': @@ -4395,6 +4428,7 @@ x2 +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/dosage.Rd': @@ -4434,6 +4468,7 @@ dosage +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/eucast_rules.Rd': @@ -4588,6 +4623,7 @@ eucast_dosage(c("tobra", "genta", "cipro"), "iv", version_breakpoints = 10) +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/example_isolates.Rd': @@ -4625,6 +4661,7 @@ example_isolates +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/example_isolates_unclean.Rd': @@ -4660,6 +4697,7 @@ example_isolates_unclean +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/export_ncbi_biosample.Rd': @@ -4687,6 +4725,7 @@ Export Data Set as NCBI BioSample Antibiogram +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/first_isolate.Rd': @@ -4871,6 +4910,7 @@ if (require("dplyr")) { +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/g.test.Rd': @@ -5018,6 +5058,7 @@ g.test(x) +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/get_episode.Rd': @@ -5217,6 +5258,7 @@ if (require("dplyr")) { +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/ggplot_pca.Rd': @@ -5354,6 +5396,7 @@ if (require("dplyr")) { +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/ggplot_sir.Rd': @@ -5540,6 +5583,7 @@ if (require("ggplot2") && require("dplyr")) { +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/guess_ab_col.Rd': @@ -5594,6 +5638,7 @@ guess_ab_col(df, as.ab("augmentin")) +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/intrinsic_resistant.Rd': @@ -5632,6 +5677,7 @@ intrinsic_resistant +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/italicise_taxonomy.Rd': @@ -5670,6 +5716,7 @@ cat(italicise_taxonomy("An overview of S. aureus isolates", type = "ansi")) +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/join.Rd': @@ -5750,6 +5797,7 @@ if (require("dplyr")) { +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/key_antimicrobials.Rd': @@ -5889,6 +5937,7 @@ if (require("dplyr")) { +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/kurtosis.Rd': @@ -5929,6 +5978,7 @@ kurtosis(rnorm(10000), excess = TRUE) +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/like.Rd': @@ -6013,6 +6063,7 @@ if (require("dplyr")) { +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/mdro.Rd': @@ -6251,6 +6302,7 @@ if (require("dplyr")) { +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/mean_amr_distance.Rd': @@ -6349,6 +6401,7 @@ if (require("dplyr")) { +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/microorganisms.Rd': @@ -6459,6 +6512,7 @@ microorganisms +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/microorganisms.codes.Rd': @@ -6503,6 +6557,7 @@ mo_is_intrinsic_resistant("eco", ab = "vancomycin") +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/microorganisms.groups.Rd': @@ -6543,6 +6598,7 @@ microorganisms.groups[microorganisms.groups$mo_group == "B_BCTRD_FRGL-C", ] +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/mo_matching_score.Rd': @@ -6625,6 +6681,7 @@ mo_matching_score( +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/mo_property.Rd': @@ -6991,6 +7048,7 @@ Data set \link{microorganisms} +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/mo_source.Rd': @@ -7104,6 +7162,7 @@ If the original file (in the previous case an Excel file) is moved or deleted, t +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/pca.Rd': @@ -7199,6 +7258,7 @@ if (require("dplyr")) { +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/plot.Rd': @@ -7464,6 +7524,7 @@ if (require("ggplot2")) { +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/proportion.Rd': @@ -7749,6 +7810,7 @@ if (require("dplyr")) { +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/random.Rd': @@ -7808,6 +7870,7 @@ random_disk(25, "Streptococcus pneumoniae", "ampicillin") # range 12-27 +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/resistance_predict.Rd': @@ -7961,6 +8024,7 @@ Models: \code{\link[=lm]{lm()}} \code{\link[=glm]{glm()}} +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/skewness.Rd': @@ -8000,6 +8064,7 @@ skewness(runif(1000)) +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/top_n_microorganisms.Rd': @@ -8050,6 +8115,7 @@ top_n_microorganisms(example_isolates, +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/translate.Rd': @@ -8135,6 +8201,7 @@ ab_name("amox/clav") +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'vignettes/AMR.Rmd': @@ -8493,6 +8560,7 @@ our_data_1st %>% +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'vignettes/AMR_for_Python.Rmd': @@ -8694,6 +8762,7 @@ Whether you're cleaning data or analysing resistance patterns, the `AMR` Python +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'vignettes/AMR_with_tidymodels.Rmd': @@ -8883,6 +8952,7 @@ This workflow is extensible to other antibiotic classes and resistance patterns, +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'vignettes/EUCAST.Rmd': @@ -8989,6 +9059,7 @@ knitr::kable(eucast_rules(data), align = "lccccccc") +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'vignettes/MDR.Rmd': @@ -9158,6 +9229,7 @@ freq(my_TB_data$mdr) +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'vignettes/PCA.Rmd': @@ -9257,6 +9329,7 @@ ggplot_pca(pca_result, ellipse = TRUE) + +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'vignettes/WHONET.Rmd': @@ -9362,6 +9435,7 @@ tryCatch( +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'vignettes/datasets.Rmd': @@ -9737,6 +9811,7 @@ microorganisms.codes %>% +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'vignettes/resistance_predict.Rmd': @@ -9874,6 +9949,7 @@ summary(model)$coefficients +---------------------------------------------------------------------------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'vignettes/welcome_to_AMR.Rmd': @@ -9946,204 +10022,3 @@ This AMR package for R is free, open-source software and licensed under the [GNU -THE PART HEREAFTER CONTAINS THE README OF OUR PYTHON PACKAGE - - ---- -title: "AMR for Python" -output: - rmarkdown::html_vignette: - toc: true - toc_depth: 3 -vignette: > - %\VignetteIndexEntry{AMR for Python} - %\VignetteEncoding{UTF-8} - %\VignetteEngine{knitr::rmarkdown} -editor_options: - chunk_output_type: console ---- - -```{r setup, include = FALSE, results = 'markup'} -knitr::opts_chunk$set( - warning = FALSE, - collapse = TRUE, - comment = "#>", - fig.width = 7.5, - fig.height = 5 -) -``` - -# Introduction - -The `AMR` package for R is a powerful tool for antimicrobial resistance (AMR) analysis. It provides extensive features for handling microbial and antimicrobial data. However, for those who work primarily in Python, we now have a more intuitive option available: the [`AMR` Python Package Index](https://pypi.org/project/AMR/). - -This Python package is a wrapper round the `AMR` R package. It uses the `rpy2` package internally. Despite the need to have R installed, Python users can now easily work with AMR data directly through Python code. - -# Install - -1. Since the Python package is available on the official [Python Package Index](https://pypi.org/project/AMR/), you can just run: - - ```bash - pip install AMR - ``` - -2. Make sure you have R installed. There is **no need to install the `AMR` R package**, as it will be installed automatically. - - For Linux: - - ```bash - # Ubuntu / Debian - sudo apt install r-base - # Fedora: - sudo dnf install R - # CentOS/RHEL - sudo yum install R - ``` - - For macOS (using [Homebrew](https://brew.sh)): - - ```bash - brew install r - ``` - - For Windows, visit the [CRAN download page](https://cran.r-project.org) to download and install R. - -# Examples of Usage - -## Cleaning Taxonomy - -Here’s an example that demonstrates how to clean microorganism and drug names using the `AMR` Python package: - -```python -import pandas as pd -import AMR - -# Sample data -data = { - "MOs": ['E. coli', 'ESCCOL', 'esco', 'Esche coli'], - "Drug": ['Cipro', 'CIP', 'J01MA02', 'Ciproxin'] -} -df = pd.DataFrame(data) - -# Use AMR functions to clean microorganism and drug names -df['MO_clean'] = AMR.mo_name(df['MOs']) -df['Drug_clean'] = AMR.ab_name(df['Drug']) - -# Display the results -print(df) -``` - -| MOs | Drug | MO_clean | Drug_clean | -|-------------|-----------|--------------------|---------------| -| E. coli | Cipro | Escherichia coli | Ciprofloxacin | -| ESCCOL | CIP | Escherichia coli | Ciprofloxacin | -| esco | J01MA02 | Escherichia coli | Ciprofloxacin | -| Esche coli | Ciproxin | Escherichia coli | Ciprofloxacin | - -### Explanation - -* **mo_name:** This function standardises microorganism names. Here, different variations of *Escherichia coli* (such as "E. coli", "ESCCOL", "esco", and "Esche coli") are all converted into the correct, standardised form, "Escherichia coli". - -* **ab_name**: Similarly, this function standardises antimicrobial names. The different representations of ciprofloxacin (e.g., "Cipro", "CIP", "J01MA02", and "Ciproxin") are all converted to the standard name, "Ciprofloxacin". - -## Calculating AMR - -```python -import AMR -import pandas as pd - -df = AMR.example_isolates -result = AMR.resistance(df["AMX"]) -print(result) -``` - -``` -[0.59555556] -``` - -## Generating Antibiograms - -One of the core functions of the `AMR` package is generating an antibiogram, a table that summarises the antimicrobial susceptibility of bacterial isolates. Here’s how you can generate an antibiogram from Python: - -```python -result2a = AMR.antibiogram(df[["mo", "AMX", "CIP", "TZP"]]) -print(result2a) -``` - -| Pathogen | Amoxicillin | Ciprofloxacin | Piperacillin/tazobactam | -|-----------------|-----------------|-----------------|--------------------------| -| CoNS | 7% (10/142) | 73% (183/252) | 30% (10/33) | -| E. coli | 50% (196/392) | 88% (399/456) | 94% (393/416) | -| K. pneumoniae | 0% (0/58) | 96% (53/55) | 89% (47/53) | -| P. aeruginosa | 0% (0/30) | 100% (30/30) | None | -| P. mirabilis | None | 94% (34/36) | None | -| S. aureus | 6% (8/131) | 90% (171/191) | None | -| S. epidermidis | 1% (1/91) | 64% (87/136) | None | -| S. hominis | None | 80% (56/70) | None | -| S. pneumoniae | 100% (112/112) | None | 100% (112/112) | - - -```python -result2b = AMR.antibiogram(df[["mo", "AMX", "CIP", "TZP"]], mo_transform = "gramstain") -print(result2b) -``` - -| Pathogen | Amoxicillin | Ciprofloxacin | Piperacillin/tazobactam | -|----------------|-----------------|------------------|--------------------------| -| Gram-negative | 36% (226/631) | 91% (621/684) | 88% (565/641) | -| Gram-positive | 43% (305/703) | 77% (560/724) | 86% (296/345) | - - -In this example, we generate an antibiogram by selecting various antibiotics. - -## Taxonomic Data Sets Now in Python! - -As a Python user, you might like that the most important data sets of the `AMR` R package, `microorganisms`, `antibiotics`, `clinical_breakpoints`, and `example_isolates`, are now available as regular Python data frames: - -```python -AMR.microorganisms -``` - -| mo | fullname | status | kingdom | gbif | gbif_parent | gbif_renamed_to | prevalence | -|--------------|------------------------------------|----------|----------|-----------|-------------|-----------------|------------| -| B_GRAMN | (unknown Gram-negatives) | unknown | Bacteria | None | None | None | 2.0 | -| B_GRAMP | (unknown Gram-positives) | unknown | Bacteria | None | None | None | 2.0 | -| B_ANAER-NEG | (unknown anaerobic Gram-negatives) | unknown | Bacteria | None | None | None | 2.0 | -| B_ANAER-POS | (unknown anaerobic Gram-positives) | unknown | Bacteria | None | None | None | 2.0 | -| B_ANAER | (unknown anaerobic bacteria) | unknown | Bacteria | None | None | None | 2.0 | -| ... | ... | ... | ... | ... | ... | ... | ... | -| B_ZYMMN_POMC | Zymomonas pomaceae | accepted | Bacteria | 10744418 | 3221412 | None | 2.0 | -| B_ZYMPH | Zymophilus | synonym | Bacteria | None | 9475166 | None | 2.0 | -| B_ZYMPH_PCVR | Zymophilus paucivorans | synonym | Bacteria | None | None | None | 2.0 | -| B_ZYMPH_RFFN | Zymophilus raffinosivorans | synonym | Bacteria | None | None | None | 2.0 | -| F_ZYZYG | Zyzygomyces | unknown | Fungi | None | 7581 | None | 2.0 | - -```python -AMR.antibiotics -``` - -| ab | cid | name | group | oral_ddd | oral_units | iv_ddd | iv_units | -|-----|-------------|----------------------|----------------------------|----------|------------|--------|----------| -| AMA | 4649.0 | 4-aminosalicylic acid| Antimycobacterials | 12.00 | g | NaN | None | -| ACM | 6450012.0 | Acetylmidecamycin | Macrolides/lincosamides | NaN | None | NaN | None | -| ASP | 49787020.0 | Acetylspiramycin | Macrolides/lincosamides | NaN | None | NaN | None | -| ALS | 8954.0 | Aldesulfone sodium | Other antibacterials | 0.33 | g | NaN | None | -| AMK | 37768.0 | Amikacin | Aminoglycosides | NaN | None | 1.0 | g | -| ... | ... | ... | ... | ... | ... | ... | ... | -| VIR | 11979535.0 | Virginiamycine | Other antibacterials | NaN | None | NaN | None | -| VOR | 71616.0 | Voriconazole | Antifungals/antimycotics | 0.40 | g | 0.4 | g | -| XBR | 72144.0 | Xibornol | Other antibacterials | NaN | None | NaN | None | -| ZID | 77846445.0 | Zidebactam | Other antibacterials | NaN | None | NaN | None | -| ZFD | NaN | Zoliflodacin | None | NaN | None | NaN | None | - - -# Conclusion - -With the `AMR` Python package, Python users can now effortlessly call R functions from the `AMR` R package. This eliminates the need for complex `rpy2` configurations and provides a clean, easy-to-use interface for antimicrobial resistance analysis. The examples provided above demonstrate how this can be applied to typical workflows, such as standardising microorganism and antimicrobial names or calculating resistance. - -By just running `import AMR`, users can seamlessly integrate the robust features of the R `AMR` package into Python workflows. - -Whether you're cleaning data or analysing resistance patterns, the `AMR` Python package makes it easy to work with AMR data in Python. - - - diff --git a/data-raw/reproduction_of_microorganisms.R b/data-raw/reproduction_of_microorganisms.R index 842bbcd77..1076b864f 100644 --- a/data-raw/reproduction_of_microorganisms.R +++ b/data-raw/reproduction_of_microorganisms.R @@ -2210,6 +2210,6 @@ devtools::load_all(".") # run the unit tests Sys.setenv(NOT_CRAN = "true") -testthat::test_file("inst/tests/testthat/test-data.R") -testthat::test_file("inst/tests/testthat/test-mo.R") -testthat::test_file("inst/tests/testthat/test-mo_property.R") +testthat::test_file("tests/testthat/test-data.R") +testthat::test_file("tests/testthat/test-mo.R") +testthat::test_file("tests/testthat/test-mo_property.R") diff --git a/tests/testthat.R b/tests/testthat.R new file mode 100644 index 000000000..65458d15f --- /dev/null +++ b/tests/testthat.R @@ -0,0 +1,45 @@ +# ==================================================================== # +# TITLE: # +# AMR: An R Package for Working with Antimicrobial Resistance Data # +# # +# SOURCE CODE: # +# https://github.com/msberends/AMR # +# # +# PLEASE CITE THIS SOFTWARE AS: # +# Berends MS, Luz CF, Friedrich AW, et al. (2022). # +# AMR: An R Package for Working with Antimicrobial Resistance Data. # +# Journal of Statistical Software, 104(3), 1-31. # +# https://doi.org/10.18637/jss.v104.i03 # +# # +# Developed at the University of Groningen and the University Medical # +# Center Groningen in The Netherlands, in collaboration with many # +# colleagues from around the world, see our website. # +# # +# This R package is free software; you can freely use and distribute # +# it for both personal and commercial purposes under the terms of the # +# GNU General Public License version 2.0 (GNU GPL-2), as published by # +# the Free Software Foundation. # +# We created this package for both routine data analysis and academic # +# research and it was publicly released in the hope that it will be # +# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # +# # +# Visit our website for the full manual and a complete tutorial about # +# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # +# ==================================================================== # + +library(testthat) +library(AMR) + +# add functions from the tinytest package (which we use for older R versions) +expect_inherits <- function(x, y, ...) { + expect(inherits(x, y), + failure_message = paste0("object has class ", paste0(class(x), collapse = "/"), + ", required is class ", paste0(y, collapse = "/"))) +} +expect_stdout <- expect_output +if (getRversion() < "4.0.0") { + deparse1 <- AMR:::deparse1 +} + +# start unit tests +test_check("AMR") diff --git a/inst/tests/test-_deprecated.R b/tests/testthat/test-_deprecated.R similarity index 100% rename from inst/tests/test-_deprecated.R rename to tests/testthat/test-_deprecated.R diff --git a/inst/tests/test-_misc.R b/tests/testthat/test-_misc.R similarity index 87% rename from inst/tests/test-_misc.R rename to tests/testthat/test-_misc.R index 2e5544edb..582a09c5e 100755 --- a/inst/tests/test-_misc.R +++ b/tests/testthat/test-_misc.R @@ -27,15 +27,6 @@ # how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # ==================================================================== # -if (tryCatch(!is.function(expect_stout), error = function(e) TRUE)) { - expect_stout <<- testthat::expect_output -} -if (tryCatch(!is.function(expect_inherits), error = function(e) TRUE)) { - expect_inherits <<- function(x, y, ...) testthat::expect(inherits(x, y), - failure_message = paste0("Expected class ", paste(y, collapse = "/"), - ", got class ", paste(class(x), collapse = "/"))) -} - expect_equal(AMR:::percentage(0.25), "25%") expect_equal(AMR:::percentage(0.5), "50%") expect_equal(AMR:::percentage(0.500, digits = 1), "50.0%") diff --git a/inst/tests/test-ab.R b/tests/testthat/test-ab.R similarity index 100% rename from inst/tests/test-ab.R rename to tests/testthat/test-ab.R diff --git a/inst/tests/test-ab_from_text.R b/tests/testthat/test-ab_from_text.R similarity index 100% rename from inst/tests/test-ab_from_text.R rename to tests/testthat/test-ab_from_text.R diff --git a/inst/tests/test-ab_property.R b/tests/testthat/test-ab_property.R similarity index 100% rename from inst/tests/test-ab_property.R rename to tests/testthat/test-ab_property.R diff --git a/inst/tests/test-ab_selectors.R b/tests/testthat/test-ab_selectors.R similarity index 100% rename from inst/tests/test-ab_selectors.R rename to tests/testthat/test-ab_selectors.R diff --git a/inst/tests/test-age.R b/tests/testthat/test-age.R similarity index 100% rename from inst/tests/test-age.R rename to tests/testthat/test-age.R diff --git a/inst/tests/test-antibiogram.R b/tests/testthat/test-antibiogram.R similarity index 100% rename from inst/tests/test-antibiogram.R rename to tests/testthat/test-antibiogram.R diff --git a/inst/tests/test-atc_online.R b/tests/testthat/test-atc_online.R similarity index 100% rename from inst/tests/test-atc_online.R rename to tests/testthat/test-atc_online.R diff --git a/inst/tests/test-av.R b/tests/testthat/test-av.R similarity index 100% rename from inst/tests/test-av.R rename to tests/testthat/test-av.R diff --git a/inst/tests/test-av_from_text.R b/tests/testthat/test-av_from_text.R similarity index 100% rename from inst/tests/test-av_from_text.R rename to tests/testthat/test-av_from_text.R diff --git a/inst/tests/test-av_property.R b/tests/testthat/test-av_property.R similarity index 100% rename from inst/tests/test-av_property.R rename to tests/testthat/test-av_property.R diff --git a/inst/tests/test-availability.R b/tests/testthat/test-availability.R similarity index 100% rename from inst/tests/test-availability.R rename to tests/testthat/test-availability.R diff --git a/inst/tests/test-bug_drug_combinations.R b/tests/testthat/test-bug_drug_combinations.R similarity index 100% rename from inst/tests/test-bug_drug_combinations.R rename to tests/testthat/test-bug_drug_combinations.R diff --git a/inst/tests/test-count.R b/tests/testthat/test-count.R similarity index 100% rename from inst/tests/test-count.R rename to tests/testthat/test-count.R diff --git a/inst/tests/test-custom_antimicrobials.R b/tests/testthat/test-custom_antimicrobials.R similarity index 100% rename from inst/tests/test-custom_antimicrobials.R rename to tests/testthat/test-custom_antimicrobials.R diff --git a/inst/tests/test-custom_microorganisms.R b/tests/testthat/test-custom_microorganisms.R similarity index 100% rename from inst/tests/test-custom_microorganisms.R rename to tests/testthat/test-custom_microorganisms.R diff --git a/inst/tests/test-data.R b/tests/testthat/test-data.R similarity index 100% rename from inst/tests/test-data.R rename to tests/testthat/test-data.R diff --git a/inst/tests/test-disk.R b/tests/testthat/test-disk.R similarity index 100% rename from inst/tests/test-disk.R rename to tests/testthat/test-disk.R diff --git a/inst/tests/test-eucast_rules.R b/tests/testthat/test-eucast_rules.R similarity index 100% rename from inst/tests/test-eucast_rules.R rename to tests/testthat/test-eucast_rules.R diff --git a/inst/tests/test-first_isolate.R b/tests/testthat/test-first_isolate.R similarity index 100% rename from inst/tests/test-first_isolate.R rename to tests/testthat/test-first_isolate.R diff --git a/inst/tests/test-g.test.R b/tests/testthat/test-g.test.R similarity index 100% rename from inst/tests/test-g.test.R rename to tests/testthat/test-g.test.R diff --git a/inst/tests/test-get_episode.R b/tests/testthat/test-get_episode.R similarity index 100% rename from inst/tests/test-get_episode.R rename to tests/testthat/test-get_episode.R diff --git a/inst/tests/test-ggplot_sir.R b/tests/testthat/test-ggplot_sir.R similarity index 100% rename from inst/tests/test-ggplot_sir.R rename to tests/testthat/test-ggplot_sir.R diff --git a/inst/tests/test-guess_ab_col.R b/tests/testthat/test-guess_ab_col.R similarity index 100% rename from inst/tests/test-guess_ab_col.R rename to tests/testthat/test-guess_ab_col.R diff --git a/inst/tests/test-italicise_taxonomy.R b/tests/testthat/test-italicise_taxonomy.R similarity index 100% rename from inst/tests/test-italicise_taxonomy.R rename to tests/testthat/test-italicise_taxonomy.R diff --git a/inst/tests/test-join_microorganisms.R b/tests/testthat/test-join_microorganisms.R similarity index 100% rename from inst/tests/test-join_microorganisms.R rename to tests/testthat/test-join_microorganisms.R diff --git a/inst/tests/test-key_antimicrobials.R b/tests/testthat/test-key_antimicrobials.R similarity index 100% rename from inst/tests/test-key_antimicrobials.R rename to tests/testthat/test-key_antimicrobials.R diff --git a/inst/tests/test-kurtosis.R b/tests/testthat/test-kurtosis.R similarity index 100% rename from inst/tests/test-kurtosis.R rename to tests/testthat/test-kurtosis.R diff --git a/inst/tests/test-like.R b/tests/testthat/test-like.R similarity index 100% rename from inst/tests/test-like.R rename to tests/testthat/test-like.R diff --git a/inst/tests/test-mdro.R b/tests/testthat/test-mdro.R similarity index 100% rename from inst/tests/test-mdro.R rename to tests/testthat/test-mdro.R diff --git a/inst/tests/test-mean_amr_distance.R b/tests/testthat/test-mean_amr_distance.R similarity index 100% rename from inst/tests/test-mean_amr_distance.R rename to tests/testthat/test-mean_amr_distance.R diff --git a/inst/tests/test-mic.R b/tests/testthat/test-mic.R similarity index 100% rename from inst/tests/test-mic.R rename to tests/testthat/test-mic.R diff --git a/inst/tests/test-mo.R b/tests/testthat/test-mo.R similarity index 100% rename from inst/tests/test-mo.R rename to tests/testthat/test-mo.R diff --git a/inst/tests/test-mo_property.R b/tests/testthat/test-mo_property.R similarity index 100% rename from inst/tests/test-mo_property.R rename to tests/testthat/test-mo_property.R diff --git a/inst/tests/test-pca.R b/tests/testthat/test-pca.R similarity index 100% rename from inst/tests/test-pca.R rename to tests/testthat/test-pca.R diff --git a/inst/tests/test-proportion.R b/tests/testthat/test-proportion.R similarity index 100% rename from inst/tests/test-proportion.R rename to tests/testthat/test-proportion.R diff --git a/inst/tests/test-random.R b/tests/testthat/test-random.R similarity index 100% rename from inst/tests/test-random.R rename to tests/testthat/test-random.R diff --git a/inst/tests/test-resistance_predict.R b/tests/testthat/test-resistance_predict.R similarity index 100% rename from inst/tests/test-resistance_predict.R rename to tests/testthat/test-resistance_predict.R diff --git a/inst/tests/test-sir.R b/tests/testthat/test-sir.R similarity index 100% rename from inst/tests/test-sir.R rename to tests/testthat/test-sir.R diff --git a/inst/tests/test-skewness.R b/tests/testthat/test-skewness.R similarity index 100% rename from inst/tests/test-skewness.R rename to tests/testthat/test-skewness.R diff --git a/inst/tests/test-top_n_microorganisms.R b/tests/testthat/test-top_n_microorganisms.R similarity index 100% rename from inst/tests/test-top_n_microorganisms.R rename to tests/testthat/test-top_n_microorganisms.R diff --git a/inst/tests/test-translate.R b/tests/testthat/test-translate.R similarity index 100% rename from inst/tests/test-translate.R rename to tests/testthat/test-translate.R diff --git a/inst/tests/test-vctrs.R b/tests/testthat/test-vctrs.R similarity index 100% rename from inst/tests/test-vctrs.R rename to tests/testthat/test-vctrs.R diff --git a/inst/tests/test-zzz.R b/tests/testthat/test-zzz.R similarity index 99% rename from inst/tests/test-zzz.R rename to tests/testthat/test-zzz.R index 30bb82023..314b06623 100644 --- a/inst/tests/test-zzz.R +++ b/tests/testthat/test-zzz.R @@ -70,7 +70,6 @@ call_functions <- c( "read_excel" = "readxl", # ggplot2 "aes" = "ggplot2", - "aes_string" = "ggplot2", "arrow" = "ggplot2", "autoplot" = "ggplot2", "element_blank" = "ggplot2", diff --git a/tests/tinytest.R b/tests/tinytest.R.old similarity index 94% rename from tests/tinytest.R rename to tests/tinytest.R.old index 48ca4a9dc..4af748093 100644 --- a/tests/tinytest.R +++ b/tests/tinytest.R.old @@ -29,9 +29,6 @@ # we use {tinytest} for older R versions to allow unit testing in R >= 3.0.0. -# use this to quickly use testtthat for more informative errors: -# testthat::test_dir("inst/tests") - # test only on GitHub Actions - not on CRAN as tests are lengthy if (identical(Sys.getenv("R_RUN_TINYTEST"), "true")) { # env var 'R_LIBS_USER' gets overwritten during 'R CMD check' in GitHub Actions, so: @@ -71,9 +68,9 @@ if (identical(Sys.getenv("R_RUN_TINYTEST"), "true")) { suppressMessages( out <- test_package("AMR", - testdir = ifelse(dir.exists("inst/tests"), - "inst/tests", - "tests" + testdir = ifelse(dir.exists("inst/testthat"), + "inst/testthat", + "testthat" ), verbose = FALSE, color = FALSE