AMR 2.1.1.9125__py3-none-any.whl → 2.1.1.9127__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- AMR/__init__.py +2 -0
- AMR/datasets.py +12 -3
- AMR/functions.py +144 -138
- {AMR-2.1.1.9125.dist-info → AMR-2.1.1.9127.dist-info}/METADATA +42 -43
- AMR-2.1.1.9127.dist-info/RECORD +7 -0
- AMR-2.1.1.9125.dist-info/RECORD +0 -7
- {AMR-2.1.1.9125.dist-info → AMR-2.1.1.9127.dist-info}/WHEEL +0 -0
- {AMR-2.1.1.9125.dist-info → AMR-2.1.1.9127.dist-info}/top_level.txt +0 -0
AMR/__init__.py
CHANGED
@@ -26,6 +26,7 @@ from .functions import clear_custom_microorganisms
|
|
26
26
|
from .functions import age
|
27
27
|
from .functions import age_groups
|
28
28
|
from .functions import antibiogram
|
29
|
+
from .functions import wisca
|
29
30
|
from .functions import amr_class
|
30
31
|
from .functions import amr_selector
|
31
32
|
from .functions import aminoglycosides
|
@@ -201,5 +202,6 @@ from .functions import resistance_predict
|
|
201
202
|
from .functions import sir_predict
|
202
203
|
from .functions import ggplot_sir_predict
|
203
204
|
from .functions import skewness
|
205
|
+
from .functions import top_n_microorganisms
|
204
206
|
from .functions import reset_AMR_locale
|
205
207
|
from .functions import translate_AMR
|
AMR/datasets.py
CHANGED
@@ -3,6 +3,7 @@ GREEN = '\033[32m'
|
|
3
3
|
RESET = '\033[0m'
|
4
4
|
|
5
5
|
import os
|
6
|
+
import sys
|
6
7
|
from rpy2 import robjects
|
7
8
|
from rpy2.robjects import pandas2ri
|
8
9
|
from rpy2.robjects.packages import importr, isinstalled
|
@@ -10,7 +11,7 @@ import pandas as pd
|
|
10
11
|
import importlib.metadata as metadata
|
11
12
|
|
12
13
|
# Get the path to the virtual environment
|
13
|
-
venv_path =
|
14
|
+
venv_path = sys.prefix
|
14
15
|
|
15
16
|
# Define R library path within the venv
|
16
17
|
r_lib_path = os.path.join(venv_path, "R_libs")
|
@@ -18,11 +19,16 @@ r_lib_path = os.path.join(venv_path, "R_libs")
|
|
18
19
|
os.makedirs(r_lib_path, exist_ok=True)
|
19
20
|
# Set the R library path in .libPaths
|
20
21
|
base = importr('base')
|
22
|
+
# Turn off warnings
|
23
|
+
base.options(warn = -1)
|
24
|
+
|
21
25
|
base._libPaths(r_lib_path)
|
26
|
+
r_amr_lib_path = base._libPaths()[0]
|
22
27
|
|
23
28
|
# Check if the AMR package is installed in R
|
24
|
-
if not isinstalled('AMR'):
|
29
|
+
if not isinstalled('AMR', lib_loc = r_amr_lib_path):
|
25
30
|
utils = importr('utils')
|
31
|
+
print(f"{BLUE}AMR:{RESET} Installing AMR package to {BLUE}{r_amr_lib_path}/{RESET}...", flush=True)
|
26
32
|
utils.install_packages('AMR', repos='https://msberends.r-universe.dev', quiet=True)
|
27
33
|
|
28
34
|
# Python package version of AMR
|
@@ -37,12 +43,15 @@ r_amr_version = robjects.r(f'as.character(packageVersion("AMR", lib.loc = "{r_li
|
|
37
43
|
# Compare R and Python package versions
|
38
44
|
if r_amr_version != python_amr_version:
|
39
45
|
try:
|
40
|
-
print(f"{BLUE}AMR:{RESET} Updating package
|
46
|
+
print(f"{BLUE}AMR:{RESET} Updating AMR package in {BLUE}{r_amr_lib_path}/{RESET}...", flush=True)
|
41
47
|
utils = importr('utils')
|
42
48
|
utils.install_packages('AMR', repos='https://msberends.r-universe.dev', quiet=True)
|
43
49
|
except Exception as e:
|
44
50
|
print(f"{BLUE}AMR:{RESET} Could not update: {e}{RESET}", flush=True)
|
45
51
|
|
52
|
+
# Restore warnings to default
|
53
|
+
base.options(warn = 0)
|
54
|
+
|
46
55
|
print(f"{BLUE}AMR:{RESET} Setting up R environment and AMR datasets...", flush=True)
|
47
56
|
|
48
57
|
# Activate the automatic conversion between R and pandas DataFrames
|
AMR/functions.py
CHANGED
@@ -42,9 +42,9 @@ def ab_class(*args, **kwargs):
|
|
42
42
|
def ab_selector(*args, **kwargs):
|
43
43
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
44
44
|
return convert_to_python(amr_r.ab_selector(*args, **kwargs))
|
45
|
-
def ab_from_text(*args, **kwargs):
|
45
|
+
def ab_from_text(text, *args, **kwargs):
|
46
46
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
47
|
-
return convert_to_python(amr_r.ab_from_text(*args, **kwargs))
|
47
|
+
return convert_to_python(amr_r.ab_from_text(text, *args, **kwargs))
|
48
48
|
def ab_name(x, *args, **kwargs):
|
49
49
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
50
50
|
return convert_to_python(amr_r.ab_name(x, *args, **kwargs))
|
@@ -105,18 +105,21 @@ def age(x, *args, **kwargs):
|
|
105
105
|
def age_groups(x, *args, **kwargs):
|
106
106
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
107
107
|
return convert_to_python(amr_r.age_groups(x, *args, **kwargs))
|
108
|
-
def antibiogram(*args, **kwargs):
|
108
|
+
def antibiogram(x, *args, **kwargs):
|
109
109
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
110
|
-
return convert_to_python(amr_r.antibiogram(*args, **kwargs))
|
111
|
-
def
|
110
|
+
return convert_to_python(amr_r.antibiogram(x, *args, **kwargs))
|
111
|
+
def wisca(x, *args, **kwargs):
|
112
112
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
113
|
-
return convert_to_python(amr_r.
|
114
|
-
def
|
113
|
+
return convert_to_python(amr_r.wisca(x, *args, **kwargs))
|
114
|
+
def amr_class(amr_class, *args, **kwargs):
|
115
115
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
116
|
-
return convert_to_python(amr_r.
|
117
|
-
def
|
116
|
+
return convert_to_python(amr_r.amr_class(amr_class, *args, **kwargs))
|
117
|
+
def amr_selector(filter, *args, **kwargs):
|
118
118
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
119
|
-
return convert_to_python(amr_r.
|
119
|
+
return convert_to_python(amr_r.amr_selector(filter, *args, **kwargs))
|
120
|
+
def aminoglycosides(only_sir_columns = False, *args, **kwargs):
|
121
|
+
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
122
|
+
return convert_to_python(amr_r.aminoglycosides(only_sir_columns = False, *args, **kwargs))
|
120
123
|
def aminopenicillins(only_sir_columns = False, *args, **kwargs):
|
121
124
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
122
125
|
return convert_to_python(amr_r.aminopenicillins(only_sir_columns = False, *args, **kwargs))
|
@@ -126,15 +129,15 @@ def antifungals(only_sir_columns = False, *args, **kwargs):
|
|
126
129
|
def antimycobacterials(only_sir_columns = False, *args, **kwargs):
|
127
130
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
128
131
|
return convert_to_python(amr_r.antimycobacterials(only_sir_columns = False, *args, **kwargs))
|
129
|
-
def betalactams(*args, **kwargs):
|
132
|
+
def betalactams(only_sir_columns = False, *args, **kwargs):
|
130
133
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
131
|
-
return convert_to_python(amr_r.betalactams(*args, **kwargs))
|
134
|
+
return convert_to_python(amr_r.betalactams(only_sir_columns = False, *args, **kwargs))
|
132
135
|
def betalactams_with_inhibitor(only_sir_columns = False, *args, **kwargs):
|
133
136
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
134
137
|
return convert_to_python(amr_r.betalactams_with_inhibitor(only_sir_columns = False, *args, **kwargs))
|
135
|
-
def carbapenems(*args, **kwargs):
|
138
|
+
def carbapenems(only_sir_columns = False, *args, **kwargs):
|
136
139
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
137
|
-
return convert_to_python(amr_r.carbapenems(*args, **kwargs))
|
140
|
+
return convert_to_python(amr_r.carbapenems(only_sir_columns = False, *args, **kwargs))
|
138
141
|
def cephalosporins(only_sir_columns = False, *args, **kwargs):
|
139
142
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
140
143
|
return convert_to_python(amr_r.cephalosporins(only_sir_columns = False, *args, **kwargs))
|
@@ -159,9 +162,9 @@ def fluoroquinolones(only_sir_columns = False, *args, **kwargs):
|
|
159
162
|
def glycopeptides(only_sir_columns = False, *args, **kwargs):
|
160
163
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
161
164
|
return convert_to_python(amr_r.glycopeptides(only_sir_columns = False, *args, **kwargs))
|
162
|
-
def lincosamides(*args, **kwargs):
|
165
|
+
def lincosamides(only_sir_columns = False, *args, **kwargs):
|
163
166
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
164
|
-
return convert_to_python(amr_r.lincosamides(*args, **kwargs))
|
167
|
+
return convert_to_python(amr_r.lincosamides(only_sir_columns = False, *args, **kwargs))
|
165
168
|
def lipoglycopeptides(only_sir_columns = False, *args, **kwargs):
|
166
169
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
167
170
|
return convert_to_python(amr_r.lipoglycopeptides(only_sir_columns = False, *args, **kwargs))
|
@@ -180,9 +183,9 @@ def penicillins(only_sir_columns = False, *args, **kwargs):
|
|
180
183
|
def phenicols(only_sir_columns = False, *args, **kwargs):
|
181
184
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
182
185
|
return convert_to_python(amr_r.phenicols(only_sir_columns = False, *args, **kwargs))
|
183
|
-
def polymyxins(*args, **kwargs):
|
186
|
+
def polymyxins(only_sir_columns = False, *args, **kwargs):
|
184
187
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
185
|
-
return convert_to_python(amr_r.polymyxins(*args, **kwargs))
|
188
|
+
return convert_to_python(amr_r.polymyxins(only_sir_columns = False, *args, **kwargs))
|
186
189
|
def quinolones(only_sir_columns = False, *args, **kwargs):
|
187
190
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
188
191
|
return convert_to_python(amr_r.quinolones(only_sir_columns = False, *args, **kwargs))
|
@@ -207,9 +210,9 @@ def administrable_per_os(only_sir_columns = False, *args, **kwargs):
|
|
207
210
|
def administrable_iv(only_sir_columns = False, *args, **kwargs):
|
208
211
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
209
212
|
return convert_to_python(amr_r.administrable_iv(only_sir_columns = False, *args, **kwargs))
|
210
|
-
def not_intrinsic_resistant(*args, **kwargs):
|
213
|
+
def not_intrinsic_resistant(only_sir_columns = False, *args, **kwargs):
|
211
214
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
212
|
-
return convert_to_python(amr_r.not_intrinsic_resistant(*args, **kwargs))
|
215
|
+
return convert_to_python(amr_r.not_intrinsic_resistant(only_sir_columns = False, *args, **kwargs))
|
213
216
|
def as_ab(x, *args, **kwargs):
|
214
217
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
215
218
|
return convert_to_python(amr_r.as_ab(x, *args, **kwargs))
|
@@ -237,9 +240,9 @@ def is_mic(x):
|
|
237
240
|
def rescale_mic(x, *args, **kwargs):
|
238
241
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
239
242
|
return convert_to_python(amr_r.rescale_mic(x, *args, **kwargs))
|
240
|
-
def as_mo(*args, **kwargs):
|
243
|
+
def as_mo(x, *args, **kwargs):
|
241
244
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
242
|
-
return convert_to_python(amr_r.as_mo(*args, **kwargs))
|
245
|
+
return convert_to_python(amr_r.as_mo(x, *args, **kwargs))
|
243
246
|
def is_mo(x):
|
244
247
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
245
248
|
return convert_to_python(amr_r.is_mo(x))
|
@@ -270,9 +273,9 @@ def is_sir_eligible(x, *args, **kwargs):
|
|
270
273
|
def sir_interpretation_history(clean):
|
271
274
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
272
275
|
return convert_to_python(amr_r.sir_interpretation_history(clean))
|
273
|
-
def atc_online_property(*args, **kwargs):
|
276
|
+
def atc_online_property(atc_code, *args, **kwargs):
|
274
277
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
275
|
-
return convert_to_python(amr_r.atc_online_property(*args, **kwargs))
|
278
|
+
return convert_to_python(amr_r.atc_online_property(atc_code, *args, **kwargs))
|
276
279
|
def atc_online_groups(atc_code, *args, **kwargs):
|
277
280
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
278
281
|
return convert_to_python(amr_r.atc_online_groups(atc_code, *args, **kwargs))
|
@@ -282,9 +285,9 @@ def atc_online_ddd(atc_code, *args, **kwargs):
|
|
282
285
|
def atc_online_ddd_units(atc_code, *args, **kwargs):
|
283
286
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
284
287
|
return convert_to_python(amr_r.atc_online_ddd_units(atc_code, *args, **kwargs))
|
285
|
-
def av_from_text(*args, **kwargs):
|
288
|
+
def av_from_text(text, *args, **kwargs):
|
286
289
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
287
|
-
return convert_to_python(amr_r.av_from_text(*args, **kwargs))
|
290
|
+
return convert_to_python(amr_r.av_from_text(text, *args, **kwargs))
|
288
291
|
def av_name(x, *args, **kwargs):
|
289
292
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
290
293
|
return convert_to_python(amr_r.av_name(x, *args, **kwargs))
|
@@ -354,45 +357,45 @@ def count_all(*args, **kwargs):
|
|
354
357
|
def n_sir(*args, **kwargs):
|
355
358
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
356
359
|
return convert_to_python(amr_r.n_sir(*args, **kwargs))
|
357
|
-
def count_df(*args, **kwargs):
|
360
|
+
def count_df(data, *args, **kwargs):
|
358
361
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
359
|
-
return convert_to_python(amr_r.count_df(*args, **kwargs))
|
362
|
+
return convert_to_python(amr_r.count_df(data, *args, **kwargs))
|
360
363
|
def custom_eucast_rules(*args, **kwargs):
|
361
364
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
362
365
|
return convert_to_python(amr_r.custom_eucast_rules(*args, **kwargs))
|
363
|
-
def eucast_rules(*args, **kwargs):
|
366
|
+
def eucast_rules(x, *args, **kwargs):
|
364
367
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
365
|
-
return convert_to_python(amr_r.eucast_rules(*args, **kwargs))
|
368
|
+
return convert_to_python(amr_r.eucast_rules(x, *args, **kwargs))
|
366
369
|
def eucast_dosage(ab, *args, **kwargs):
|
367
370
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
368
371
|
return convert_to_python(amr_r.eucast_dosage(ab, *args, **kwargs))
|
369
|
-
def export_ncbi_biosample(*args, **kwargs):
|
372
|
+
def export_ncbi_biosample(x, *args, **kwargs):
|
370
373
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
371
|
-
return convert_to_python(amr_r.export_ncbi_biosample(*args, **kwargs))
|
372
|
-
def first_isolate(*args, **kwargs):
|
374
|
+
return convert_to_python(amr_r.export_ncbi_biosample(x, *args, **kwargs))
|
375
|
+
def first_isolate(x = None, *args, **kwargs):
|
373
376
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
374
|
-
return convert_to_python(amr_r.first_isolate(*args, **kwargs))
|
375
|
-
def filter_first_isolate(*args, **kwargs):
|
377
|
+
return convert_to_python(amr_r.first_isolate(x = None, *args, **kwargs))
|
378
|
+
def filter_first_isolate(x = None, *args, **kwargs):
|
376
379
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
377
|
-
return convert_to_python(amr_r.filter_first_isolate(*args, **kwargs))
|
380
|
+
return convert_to_python(amr_r.filter_first_isolate(x = None, *args, **kwargs))
|
378
381
|
def g_test(x, *args, **kwargs):
|
379
382
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
380
383
|
return convert_to_python(amr_r.g_test(x, *args, **kwargs))
|
381
384
|
def is_new_episode(x, *args, **kwargs):
|
382
385
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
383
386
|
return convert_to_python(amr_r.is_new_episode(x, *args, **kwargs))
|
384
|
-
def ggplot_pca(*args, **kwargs):
|
387
|
+
def ggplot_pca(x, *args, **kwargs):
|
385
388
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
386
|
-
return convert_to_python(amr_r.ggplot_pca(*args, **kwargs))
|
387
|
-
def ggplot_sir(*args, **kwargs):
|
389
|
+
return convert_to_python(amr_r.ggplot_pca(x, *args, **kwargs))
|
390
|
+
def ggplot_sir(data, *args, **kwargs):
|
388
391
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
389
|
-
return convert_to_python(amr_r.ggplot_sir(*args, **kwargs))
|
390
|
-
def geom_sir(*args, **kwargs):
|
392
|
+
return convert_to_python(amr_r.ggplot_sir(data, *args, **kwargs))
|
393
|
+
def geom_sir(position = None, *args, **kwargs):
|
391
394
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
392
|
-
return convert_to_python(amr_r.geom_sir(*args, **kwargs))
|
393
|
-
def guess_ab_col(*args, **kwargs):
|
395
|
+
return convert_to_python(amr_r.geom_sir(position = None, *args, **kwargs))
|
396
|
+
def guess_ab_col(x = None, *args, **kwargs):
|
394
397
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
395
|
-
return convert_to_python(amr_r.guess_ab_col(*args, **kwargs))
|
398
|
+
return convert_to_python(amr_r.guess_ab_col(x = None, *args, **kwargs))
|
396
399
|
def italicise_taxonomy(string, *args, **kwargs):
|
397
400
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
398
401
|
return convert_to_python(amr_r.italicise_taxonomy(string, *args, **kwargs))
|
@@ -417,24 +420,24 @@ def semi_join_microorganisms(x, *args, **kwargs):
|
|
417
420
|
def anti_join_microorganisms(x, *args, **kwargs):
|
418
421
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
419
422
|
return convert_to_python(amr_r.anti_join_microorganisms(x, *args, **kwargs))
|
420
|
-
def key_antimicrobials(*args, **kwargs):
|
423
|
+
def key_antimicrobials(x = None, *args, **kwargs):
|
421
424
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
422
|
-
return convert_to_python(amr_r.key_antimicrobials(*args, **kwargs))
|
425
|
+
return convert_to_python(amr_r.key_antimicrobials(x = None, *args, **kwargs))
|
423
426
|
def all_antimicrobials(x = None, *args, **kwargs):
|
424
427
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
425
428
|
return convert_to_python(amr_r.all_antimicrobials(x = None, *args, **kwargs))
|
426
|
-
def antimicrobials_equal(*args, **kwargs):
|
429
|
+
def antimicrobials_equal(y, *args, **kwargs):
|
427
430
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
428
|
-
return convert_to_python(amr_r.antimicrobials_equal(*args, **kwargs))
|
431
|
+
return convert_to_python(amr_r.antimicrobials_equal(y, *args, **kwargs))
|
429
432
|
def kurtosis(x, *args, **kwargs):
|
430
433
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
431
434
|
return convert_to_python(amr_r.kurtosis(x, *args, **kwargs))
|
432
435
|
def like(x, *args, **kwargs):
|
433
436
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
434
437
|
return convert_to_python(amr_r.like(x, *args, **kwargs))
|
435
|
-
def mdro(*args, **kwargs):
|
438
|
+
def mdro(x = None, *args, **kwargs):
|
436
439
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
437
|
-
return convert_to_python(amr_r.mdro(*args, **kwargs))
|
440
|
+
return convert_to_python(amr_r.mdro(x = None, *args, **kwargs))
|
438
441
|
def custom_mdro_guideline(*args, **kwargs):
|
439
442
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
440
443
|
return convert_to_python(amr_r.custom_mdro_guideline(*args, **kwargs))
|
@@ -450,9 +453,9 @@ def mdr_tb(x = None, *args, **kwargs):
|
|
450
453
|
def mdr_cmi2012(x = None, *args, **kwargs):
|
451
454
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
452
455
|
return convert_to_python(amr_r.mdr_cmi2012(x = None, *args, **kwargs))
|
453
|
-
def eucast_exceptional_phenotypes(*args, **kwargs):
|
456
|
+
def eucast_exceptional_phenotypes(x = None, *args, **kwargs):
|
454
457
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
455
|
-
return convert_to_python(amr_r.eucast_exceptional_phenotypes(*args, **kwargs))
|
458
|
+
return convert_to_python(amr_r.eucast_exceptional_phenotypes(x = None, *args, **kwargs))
|
456
459
|
def mean_amr_distance(x, *args, **kwargs):
|
457
460
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
458
461
|
return convert_to_python(amr_r.mean_amr_distance(x, *args, **kwargs))
|
@@ -462,126 +465,126 @@ def amr_distance_from_row(amr_distance, *args, **kwargs):
|
|
462
465
|
def mo_matching_score(x, *args, **kwargs):
|
463
466
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
464
467
|
return convert_to_python(amr_r.mo_matching_score(x, *args, **kwargs))
|
465
|
-
def mo_name(*args, **kwargs):
|
468
|
+
def mo_name(x, *args, **kwargs):
|
466
469
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
467
|
-
return convert_to_python(amr_r.mo_name(*args, **kwargs))
|
468
|
-
def mo_fullname(*args, **kwargs):
|
470
|
+
return convert_to_python(amr_r.mo_name(x, *args, **kwargs))
|
471
|
+
def mo_fullname(x, *args, **kwargs):
|
469
472
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
470
|
-
return convert_to_python(amr_r.mo_fullname(*args, **kwargs))
|
471
|
-
def mo_shortname(*args, **kwargs):
|
473
|
+
return convert_to_python(amr_r.mo_fullname(x, *args, **kwargs))
|
474
|
+
def mo_shortname(x, *args, **kwargs):
|
472
475
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
473
|
-
return convert_to_python(amr_r.mo_shortname(*args, **kwargs))
|
474
|
-
def mo_subspecies(*args, **kwargs):
|
476
|
+
return convert_to_python(amr_r.mo_shortname(x, *args, **kwargs))
|
477
|
+
def mo_subspecies(x, *args, **kwargs):
|
475
478
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
476
|
-
return convert_to_python(amr_r.mo_subspecies(*args, **kwargs))
|
477
|
-
def mo_species(*args, **kwargs):
|
479
|
+
return convert_to_python(amr_r.mo_subspecies(x, *args, **kwargs))
|
480
|
+
def mo_species(x, *args, **kwargs):
|
478
481
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
479
|
-
return convert_to_python(amr_r.mo_species(*args, **kwargs))
|
480
|
-
def mo_genus(*args, **kwargs):
|
482
|
+
return convert_to_python(amr_r.mo_species(x, *args, **kwargs))
|
483
|
+
def mo_genus(x, *args, **kwargs):
|
481
484
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
482
|
-
return convert_to_python(amr_r.mo_genus(*args, **kwargs))
|
483
|
-
def mo_family(*args, **kwargs):
|
485
|
+
return convert_to_python(amr_r.mo_genus(x, *args, **kwargs))
|
486
|
+
def mo_family(x, *args, **kwargs):
|
484
487
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
485
|
-
return convert_to_python(amr_r.mo_family(*args, **kwargs))
|
486
|
-
def mo_order(*args, **kwargs):
|
488
|
+
return convert_to_python(amr_r.mo_family(x, *args, **kwargs))
|
489
|
+
def mo_order(x, *args, **kwargs):
|
487
490
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
488
|
-
return convert_to_python(amr_r.mo_order(*args, **kwargs))
|
489
|
-
def mo_class(*args, **kwargs):
|
491
|
+
return convert_to_python(amr_r.mo_order(x, *args, **kwargs))
|
492
|
+
def mo_class(x, *args, **kwargs):
|
490
493
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
491
|
-
return convert_to_python(amr_r.mo_class(*args, **kwargs))
|
492
|
-
def mo_phylum(*args, **kwargs):
|
494
|
+
return convert_to_python(amr_r.mo_class(x, *args, **kwargs))
|
495
|
+
def mo_phylum(x, *args, **kwargs):
|
493
496
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
494
|
-
return convert_to_python(amr_r.mo_phylum(*args, **kwargs))
|
495
|
-
def mo_kingdom(*args, **kwargs):
|
497
|
+
return convert_to_python(amr_r.mo_phylum(x, *args, **kwargs))
|
498
|
+
def mo_kingdom(x, *args, **kwargs):
|
496
499
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
497
|
-
return convert_to_python(amr_r.mo_kingdom(*args, **kwargs))
|
498
|
-
def mo_domain(*args, **kwargs):
|
500
|
+
return convert_to_python(amr_r.mo_kingdom(x, *args, **kwargs))
|
501
|
+
def mo_domain(x, *args, **kwargs):
|
499
502
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
500
|
-
return convert_to_python(amr_r.mo_domain(*args, **kwargs))
|
501
|
-
def mo_type(*args, **kwargs):
|
503
|
+
return convert_to_python(amr_r.mo_domain(x, *args, **kwargs))
|
504
|
+
def mo_type(x, *args, **kwargs):
|
502
505
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
503
|
-
return convert_to_python(amr_r.mo_type(*args, **kwargs))
|
504
|
-
def mo_status(*args, **kwargs):
|
506
|
+
return convert_to_python(amr_r.mo_type(x, *args, **kwargs))
|
507
|
+
def mo_status(x, *args, **kwargs):
|
505
508
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
506
|
-
return convert_to_python(amr_r.mo_status(*args, **kwargs))
|
507
|
-
def mo_pathogenicity(*args, **kwargs):
|
509
|
+
return convert_to_python(amr_r.mo_status(x, *args, **kwargs))
|
510
|
+
def mo_pathogenicity(x, *args, **kwargs):
|
508
511
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
509
|
-
return convert_to_python(amr_r.mo_pathogenicity(*args, **kwargs))
|
510
|
-
def mo_gramstain(*args, **kwargs):
|
512
|
+
return convert_to_python(amr_r.mo_pathogenicity(x, *args, **kwargs))
|
513
|
+
def mo_gramstain(x, *args, **kwargs):
|
511
514
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
512
|
-
return convert_to_python(amr_r.mo_gramstain(*args, **kwargs))
|
513
|
-
def mo_is_gram_negative(*args, **kwargs):
|
515
|
+
return convert_to_python(amr_r.mo_gramstain(x, *args, **kwargs))
|
516
|
+
def mo_is_gram_negative(x, *args, **kwargs):
|
514
517
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
515
|
-
return convert_to_python(amr_r.mo_is_gram_negative(*args, **kwargs))
|
516
|
-
def mo_is_gram_positive(*args, **kwargs):
|
518
|
+
return convert_to_python(amr_r.mo_is_gram_negative(x, *args, **kwargs))
|
519
|
+
def mo_is_gram_positive(x, *args, **kwargs):
|
517
520
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
518
|
-
return convert_to_python(amr_r.mo_is_gram_positive(*args, **kwargs))
|
519
|
-
def mo_is_yeast(*args, **kwargs):
|
521
|
+
return convert_to_python(amr_r.mo_is_gram_positive(x, *args, **kwargs))
|
522
|
+
def mo_is_yeast(x, *args, **kwargs):
|
520
523
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
521
|
-
return convert_to_python(amr_r.mo_is_yeast(*args, **kwargs))
|
522
|
-
def mo_is_intrinsic_resistant(*args, **kwargs):
|
524
|
+
return convert_to_python(amr_r.mo_is_yeast(x, *args, **kwargs))
|
525
|
+
def mo_is_intrinsic_resistant(x, *args, **kwargs):
|
523
526
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
524
|
-
return convert_to_python(amr_r.mo_is_intrinsic_resistant(*args, **kwargs))
|
525
|
-
def mo_oxygen_tolerance(*args, **kwargs):
|
527
|
+
return convert_to_python(amr_r.mo_is_intrinsic_resistant(x, *args, **kwargs))
|
528
|
+
def mo_oxygen_tolerance(x, *args, **kwargs):
|
526
529
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
527
|
-
return convert_to_python(amr_r.mo_oxygen_tolerance(*args, **kwargs))
|
528
|
-
def mo_is_anaerobic(*args, **kwargs):
|
530
|
+
return convert_to_python(amr_r.mo_oxygen_tolerance(x, *args, **kwargs))
|
531
|
+
def mo_is_anaerobic(x, *args, **kwargs):
|
529
532
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
530
|
-
return convert_to_python(amr_r.mo_is_anaerobic(*args, **kwargs))
|
531
|
-
def mo_snomed(*args, **kwargs):
|
533
|
+
return convert_to_python(amr_r.mo_is_anaerobic(x, *args, **kwargs))
|
534
|
+
def mo_snomed(x, *args, **kwargs):
|
532
535
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
533
|
-
return convert_to_python(amr_r.mo_snomed(*args, **kwargs))
|
534
|
-
def mo_ref(*args, **kwargs):
|
536
|
+
return convert_to_python(amr_r.mo_snomed(x, *args, **kwargs))
|
537
|
+
def mo_ref(x, *args, **kwargs):
|
535
538
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
536
|
-
return convert_to_python(amr_r.mo_ref(*args, **kwargs))
|
537
|
-
def mo_authors(*args, **kwargs):
|
539
|
+
return convert_to_python(amr_r.mo_ref(x, *args, **kwargs))
|
540
|
+
def mo_authors(x, *args, **kwargs):
|
538
541
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
539
|
-
return convert_to_python(amr_r.mo_authors(*args, **kwargs))
|
540
|
-
def mo_year(*args, **kwargs):
|
542
|
+
return convert_to_python(amr_r.mo_authors(x, *args, **kwargs))
|
543
|
+
def mo_year(x, *args, **kwargs):
|
541
544
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
542
|
-
return convert_to_python(amr_r.mo_year(*args, **kwargs))
|
543
|
-
def mo_lpsn(*args, **kwargs):
|
545
|
+
return convert_to_python(amr_r.mo_year(x, *args, **kwargs))
|
546
|
+
def mo_lpsn(x, *args, **kwargs):
|
544
547
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
545
|
-
return convert_to_python(amr_r.mo_lpsn(*args, **kwargs))
|
546
|
-
def mo_mycobank(*args, **kwargs):
|
548
|
+
return convert_to_python(amr_r.mo_lpsn(x, *args, **kwargs))
|
549
|
+
def mo_mycobank(x, *args, **kwargs):
|
547
550
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
548
|
-
return convert_to_python(amr_r.mo_mycobank(*args, **kwargs))
|
549
|
-
def mo_gbif(*args, **kwargs):
|
551
|
+
return convert_to_python(amr_r.mo_mycobank(x, *args, **kwargs))
|
552
|
+
def mo_gbif(x, *args, **kwargs):
|
550
553
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
551
|
-
return convert_to_python(amr_r.mo_gbif(*args, **kwargs))
|
552
|
-
def mo_rank(*args, **kwargs):
|
554
|
+
return convert_to_python(amr_r.mo_gbif(x, *args, **kwargs))
|
555
|
+
def mo_rank(x, *args, **kwargs):
|
553
556
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
554
|
-
return convert_to_python(amr_r.mo_rank(*args, **kwargs))
|
555
|
-
def mo_taxonomy(*args, **kwargs):
|
557
|
+
return convert_to_python(amr_r.mo_rank(x, *args, **kwargs))
|
558
|
+
def mo_taxonomy(x, *args, **kwargs):
|
556
559
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
557
|
-
return convert_to_python(amr_r.mo_taxonomy(*args, **kwargs))
|
558
|
-
def mo_synonyms(*args, **kwargs):
|
560
|
+
return convert_to_python(amr_r.mo_taxonomy(x, *args, **kwargs))
|
561
|
+
def mo_synonyms(x, *args, **kwargs):
|
559
562
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
560
|
-
return convert_to_python(amr_r.mo_synonyms(*args, **kwargs))
|
563
|
+
return convert_to_python(amr_r.mo_synonyms(x, *args, **kwargs))
|
561
564
|
def mo_current(x, *args, **kwargs):
|
562
565
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
563
566
|
return convert_to_python(amr_r.mo_current(x, *args, **kwargs))
|
564
|
-
def mo_group_members(*args, **kwargs):
|
567
|
+
def mo_group_members(x, *args, **kwargs):
|
565
568
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
566
|
-
return convert_to_python(amr_r.mo_group_members(*args, **kwargs))
|
567
|
-
def mo_info(*args, **kwargs):
|
569
|
+
return convert_to_python(amr_r.mo_group_members(x, *args, **kwargs))
|
570
|
+
def mo_info(x, *args, **kwargs):
|
568
571
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
569
|
-
return convert_to_python(amr_r.mo_info(*args, **kwargs))
|
570
|
-
def mo_url(*args, **kwargs):
|
572
|
+
return convert_to_python(amr_r.mo_info(x, *args, **kwargs))
|
573
|
+
def mo_url(x, *args, **kwargs):
|
571
574
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
572
|
-
return convert_to_python(amr_r.mo_url(*args, **kwargs))
|
573
|
-
def mo_property(*args, **kwargs):
|
575
|
+
return convert_to_python(amr_r.mo_url(x, *args, **kwargs))
|
576
|
+
def mo_property(x, *args, **kwargs):
|
574
577
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
575
|
-
return convert_to_python(amr_r.mo_property(*args, **kwargs))
|
576
|
-
def pca(*args, **kwargs):
|
578
|
+
return convert_to_python(amr_r.mo_property(x, *args, **kwargs))
|
579
|
+
def pca(x, *args, **kwargs):
|
577
580
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
578
|
-
return convert_to_python(amr_r.pca(*args, **kwargs))
|
581
|
+
return convert_to_python(amr_r.pca(x, *args, **kwargs))
|
579
582
|
def theme_sir(*args, **kwargs):
|
580
583
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
581
584
|
return convert_to_python(amr_r.theme_sir(*args, **kwargs))
|
582
|
-
def labels_sir_count(*args, **kwargs):
|
585
|
+
def labels_sir_count(position = None, *args, **kwargs):
|
583
586
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
584
|
-
return convert_to_python(amr_r.labels_sir_count(*args, **kwargs))
|
587
|
+
return convert_to_python(amr_r.labels_sir_count(position = None, *args, **kwargs))
|
585
588
|
def resistance(*args, **kwargs):
|
586
589
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
587
590
|
return convert_to_python(amr_r.resistance(*args, **kwargs))
|
@@ -606,12 +609,12 @@ def proportion_SI(*args, **kwargs):
|
|
606
609
|
def proportion_S(*args, **kwargs):
|
607
610
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
608
611
|
return convert_to_python(amr_r.proportion_S(*args, **kwargs))
|
609
|
-
def proportion_df(*args, **kwargs):
|
612
|
+
def proportion_df(data, *args, **kwargs):
|
610
613
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
611
|
-
return convert_to_python(amr_r.proportion_df(*args, **kwargs))
|
612
|
-
def sir_df(*args, **kwargs):
|
614
|
+
return convert_to_python(amr_r.proportion_df(data, *args, **kwargs))
|
615
|
+
def sir_df(data, *args, **kwargs):
|
613
616
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
614
|
-
return convert_to_python(amr_r.sir_df(*args, **kwargs))
|
617
|
+
return convert_to_python(amr_r.sir_df(data, *args, **kwargs))
|
615
618
|
def random_mic(size = None, *args, **kwargs):
|
616
619
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
617
620
|
return convert_to_python(amr_r.random_mic(size = None, *args, **kwargs))
|
@@ -621,18 +624,21 @@ def random_disk(size = None, *args, **kwargs):
|
|
621
624
|
def random_sir(size = None, *args, **kwargs):
|
622
625
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
623
626
|
return convert_to_python(amr_r.random_sir(size = None, *args, **kwargs))
|
624
|
-
def resistance_predict(*args, **kwargs):
|
627
|
+
def resistance_predict(x, *args, **kwargs):
|
625
628
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
626
|
-
return convert_to_python(amr_r.resistance_predict(*args, **kwargs))
|
627
|
-
def sir_predict(*args, **kwargs):
|
629
|
+
return convert_to_python(amr_r.resistance_predict(x, *args, **kwargs))
|
630
|
+
def sir_predict(x, *args, **kwargs):
|
628
631
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
629
|
-
return convert_to_python(amr_r.sir_predict(*args, **kwargs))
|
630
|
-
def ggplot_sir_predict(*args, **kwargs):
|
632
|
+
return convert_to_python(amr_r.sir_predict(x, *args, **kwargs))
|
633
|
+
def ggplot_sir_predict(x, *args, **kwargs):
|
631
634
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
632
|
-
return convert_to_python(amr_r.ggplot_sir_predict(*args, **kwargs))
|
635
|
+
return convert_to_python(amr_r.ggplot_sir_predict(x, *args, **kwargs))
|
633
636
|
def skewness(x, *args, **kwargs):
|
634
637
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
635
638
|
return convert_to_python(amr_r.skewness(x, *args, **kwargs))
|
639
|
+
def top_n_microorganisms(x, *args, **kwargs):
|
640
|
+
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
641
|
+
return convert_to_python(amr_r.top_n_microorganisms(x, *args, **kwargs))
|
636
642
|
def reset_AMR_locale(*args, **kwargs):
|
637
643
|
"""See our website of the R package for the manual: https://msberends.github.io/AMR/index.html"""
|
638
644
|
return convert_to_python(amr_r.reset_AMR_locale(*args, **kwargs))
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: AMR
|
3
|
-
Version: 2.1.1.
|
3
|
+
Version: 2.1.1.9127
|
4
4
|
Summary: A Python wrapper for the AMR R package
|
5
5
|
Home-page: https://github.com/msberends/AMR
|
6
6
|
Author: Matthijs Berends
|
@@ -98,48 +98,6 @@ print(df)
|
|
98
98
|
|
99
99
|
* **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".
|
100
100
|
|
101
|
-
|
102
|
-
## Taxonomic Data Sets Now in Python!
|
103
|
-
|
104
|
-
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:
|
105
|
-
|
106
|
-
```python
|
107
|
-
AMR.microorganisms
|
108
|
-
```
|
109
|
-
|
110
|
-
| mo | fullname | status | kingdom | gbif | gbif_parent | gbif_renamed_to | prevalence |
|
111
|
-
|--------------|------------------------------------|----------|----------|-----------|-------------|-----------------|------------|
|
112
|
-
| B_GRAMN | (unknown Gram-negatives) | unknown | Bacteria | None | None | None | 2.0 |
|
113
|
-
| B_GRAMP | (unknown Gram-positives) | unknown | Bacteria | None | None | None | 2.0 |
|
114
|
-
| B_ANAER-NEG | (unknown anaerobic Gram-negatives) | unknown | Bacteria | None | None | None | 2.0 |
|
115
|
-
| B_ANAER-POS | (unknown anaerobic Gram-positives) | unknown | Bacteria | None | None | None | 2.0 |
|
116
|
-
| B_ANAER | (unknown anaerobic bacteria) | unknown | Bacteria | None | None | None | 2.0 |
|
117
|
-
| ... | ... | ... | ... | ... | ... | ... | ... |
|
118
|
-
| B_ZYMMN_POMC | Zymomonas pomaceae | accepted | Bacteria | 10744418 | 3221412 | None | 2.0 |
|
119
|
-
| B_ZYMPH | Zymophilus | synonym | Bacteria | None | 9475166 | None | 2.0 |
|
120
|
-
| B_ZYMPH_PCVR | Zymophilus paucivorans | synonym | Bacteria | None | None | None | 2.0 |
|
121
|
-
| B_ZYMPH_RFFN | Zymophilus raffinosivorans | synonym | Bacteria | None | None | None | 2.0 |
|
122
|
-
| F_ZYZYG | Zyzygomyces | unknown | Fungi | None | 7581 | None | 2.0 |
|
123
|
-
|
124
|
-
```python
|
125
|
-
AMR.antibiotics
|
126
|
-
```
|
127
|
-
|
128
|
-
| ab | cid | name | group | oral_ddd | oral_units | iv_ddd | iv_units |
|
129
|
-
|-----|-------------|----------------------|----------------------------|----------|------------|--------|----------|
|
130
|
-
| AMA | 4649.0 | 4-aminosalicylic acid| Antimycobacterials | 12.00 | g | NaN | None |
|
131
|
-
| ACM | 6450012.0 | Acetylmidecamycin | Macrolides/lincosamides | NaN | None | NaN | None |
|
132
|
-
| ASP | 49787020.0 | Acetylspiramycin | Macrolides/lincosamides | NaN | None | NaN | None |
|
133
|
-
| ALS | 8954.0 | Aldesulfone sodium | Other antibacterials | 0.33 | g | NaN | None |
|
134
|
-
| AMK | 37768.0 | Amikacin | Aminoglycosides | NaN | None | 1.0 | g |
|
135
|
-
| ... | ... | ... | ... | ... | ... | ... | ... |
|
136
|
-
| VIR | 11979535.0 | Virginiamycine | Other antibacterials | NaN | None | NaN | None |
|
137
|
-
| VOR | 71616.0 | Voriconazole | Antifungals/antimycotics | 0.40 | g | 0.4 | g |
|
138
|
-
| XBR | 72144.0 | Xibornol | Other antibacterials | NaN | None | NaN | None |
|
139
|
-
| ZID | 77846445.0 | Zidebactam | Other antibacterials | NaN | None | NaN | None |
|
140
|
-
| ZFD | NaN | Zoliflodacin | None | NaN | None | NaN | None |
|
141
|
-
|
142
|
-
|
143
101
|
## Calculating AMR
|
144
102
|
|
145
103
|
```python
|
@@ -190,6 +148,47 @@ print(result2b)
|
|
190
148
|
|
191
149
|
In this example, we generate an antibiogram by selecting various antibiotics.
|
192
150
|
|
151
|
+
## Taxonomic Data Sets Now in Python!
|
152
|
+
|
153
|
+
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:
|
154
|
+
|
155
|
+
```python
|
156
|
+
AMR.microorganisms
|
157
|
+
```
|
158
|
+
|
159
|
+
| mo | fullname | status | kingdom | gbif | gbif_parent | gbif_renamed_to | prevalence |
|
160
|
+
|--------------|------------------------------------|----------|----------|-----------|-------------|-----------------|------------|
|
161
|
+
| B_GRAMN | (unknown Gram-negatives) | unknown | Bacteria | None | None | None | 2.0 |
|
162
|
+
| B_GRAMP | (unknown Gram-positives) | unknown | Bacteria | None | None | None | 2.0 |
|
163
|
+
| B_ANAER-NEG | (unknown anaerobic Gram-negatives) | unknown | Bacteria | None | None | None | 2.0 |
|
164
|
+
| B_ANAER-POS | (unknown anaerobic Gram-positives) | unknown | Bacteria | None | None | None | 2.0 |
|
165
|
+
| B_ANAER | (unknown anaerobic bacteria) | unknown | Bacteria | None | None | None | 2.0 |
|
166
|
+
| ... | ... | ... | ... | ... | ... | ... | ... |
|
167
|
+
| B_ZYMMN_POMC | Zymomonas pomaceae | accepted | Bacteria | 10744418 | 3221412 | None | 2.0 |
|
168
|
+
| B_ZYMPH | Zymophilus | synonym | Bacteria | None | 9475166 | None | 2.0 |
|
169
|
+
| B_ZYMPH_PCVR | Zymophilus paucivorans | synonym | Bacteria | None | None | None | 2.0 |
|
170
|
+
| B_ZYMPH_RFFN | Zymophilus raffinosivorans | synonym | Bacteria | None | None | None | 2.0 |
|
171
|
+
| F_ZYZYG | Zyzygomyces | unknown | Fungi | None | 7581 | None | 2.0 |
|
172
|
+
|
173
|
+
```python
|
174
|
+
AMR.antibiotics
|
175
|
+
```
|
176
|
+
|
177
|
+
| ab | cid | name | group | oral_ddd | oral_units | iv_ddd | iv_units |
|
178
|
+
|-----|-------------|----------------------|----------------------------|----------|------------|--------|----------|
|
179
|
+
| AMA | 4649.0 | 4-aminosalicylic acid| Antimycobacterials | 12.00 | g | NaN | None |
|
180
|
+
| ACM | 6450012.0 | Acetylmidecamycin | Macrolides/lincosamides | NaN | None | NaN | None |
|
181
|
+
| ASP | 49787020.0 | Acetylspiramycin | Macrolides/lincosamides | NaN | None | NaN | None |
|
182
|
+
| ALS | 8954.0 | Aldesulfone sodium | Other antibacterials | 0.33 | g | NaN | None |
|
183
|
+
| AMK | 37768.0 | Amikacin | Aminoglycosides | NaN | None | 1.0 | g |
|
184
|
+
| ... | ... | ... | ... | ... | ... | ... | ... |
|
185
|
+
| VIR | 11979535.0 | Virginiamycine | Other antibacterials | NaN | None | NaN | None |
|
186
|
+
| VOR | 71616.0 | Voriconazole | Antifungals/antimycotics | 0.40 | g | 0.4 | g |
|
187
|
+
| XBR | 72144.0 | Xibornol | Other antibacterials | NaN | None | NaN | None |
|
188
|
+
| ZID | 77846445.0 | Zidebactam | Other antibacterials | NaN | None | NaN | None |
|
189
|
+
| ZFD | NaN | Zoliflodacin | None | NaN | None | NaN | None |
|
190
|
+
|
191
|
+
|
193
192
|
# Conclusion
|
194
193
|
|
195
194
|
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.
|
@@ -0,0 +1,7 @@
|
|
1
|
+
AMR/__init__.py,sha256=-3zoWVuhybnYkXePzljDrtcxxaAQscPpCPP75EiqLfQ,7540
|
2
|
+
AMR/datasets.py,sha256=tNLt7ERRxR-HYWD_gY6NwkMjdTIkg0bqtdi98U7sCyQ,2673
|
3
|
+
AMR/functions.py,sha256=JSh-0_mfrAj7ajpazlv2KFyEtRAglj7oQV9Iiaux7eo,45557
|
4
|
+
AMR-2.1.1.9127.dist-info/METADATA,sha256=sYrsK-qr05-Yn2pxCyIyna4NKGIBZ_ZCvWI0lHUeVQE,9624
|
5
|
+
AMR-2.1.1.9127.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
6
|
+
AMR-2.1.1.9127.dist-info/top_level.txt,sha256=7K6Mq_X_OHdXOzQM5y06VUadXjYkze6yzufL1d7_6xc,4
|
7
|
+
AMR-2.1.1.9127.dist-info/RECORD,,
|
AMR-2.1.1.9125.dist-info/RECORD
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
AMR/__init__.py,sha256=cSUa6bz_aXEUR5o0D3dh8opo6XdlgS10hoIgYH1r_mY,7467
|
2
|
-
AMR/datasets.py,sha256=IDeqfVGjzvhMhKZRlS6Pc3xIO4HBlRDvPdQjDQ8qVTc,2426
|
3
|
-
AMR/functions.py,sha256=FmEKlH-hCyJBaJIU6dCX6WAKjYhhpGAo4qSwHP_XkzE,44231
|
4
|
-
AMR-2.1.1.9125.dist-info/METADATA,sha256=-djWW_YblmGp77vLBC2SNMUBvzH9h2kciSISdA1s8cE,9625
|
5
|
-
AMR-2.1.1.9125.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
6
|
-
AMR-2.1.1.9125.dist-info/top_level.txt,sha256=7K6Mq_X_OHdXOzQM5y06VUadXjYkze6yzufL1d7_6xc,4
|
7
|
-
AMR-2.1.1.9125.dist-info/RECORD,,
|
File without changes
|
File without changes
|