mirror of
https://github.com/msberends/AMR.git
synced 2025-04-19 08:33:49 +02:00
(v2.1.1.9187) WISCA fix
This commit is contained in:
parent
f7938289eb
commit
b67613ce08
@ -1,5 +1,5 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 2.1.1.9186
|
Version: 2.1.1.9187
|
||||||
Date: 2025-03-07
|
Date: 2025-03-07
|
||||||
Title: Antimicrobial Resistance Data Analysis
|
Title: Antimicrobial Resistance Data Analysis
|
||||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||||
|
2
NEWS.md
2
NEWS.md
@ -1,4 +1,4 @@
|
|||||||
# AMR 2.1.1.9186
|
# AMR 2.1.1.9187
|
||||||
|
|
||||||
*(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).)*
|
*(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).)*
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Metadata-Version: 2.2
|
Metadata-Version: 2.2
|
||||||
Name: AMR
|
Name: AMR
|
||||||
Version: 2.1.1.9186
|
Version: 2.1.1.9187
|
||||||
Summary: A Python wrapper for the AMR R package
|
Summary: A Python wrapper for the AMR R package
|
||||||
Home-page: https://github.com/msberends/AMR
|
Home-page: https://github.com/msberends/AMR
|
||||||
Author: Matthijs Berends
|
Author: Matthijs Berends
|
||||||
|
BIN
PythonPackage/AMR/dist/amr-2.1.1.9186.tar.gz
vendored
BIN
PythonPackage/AMR/dist/amr-2.1.1.9186.tar.gz
vendored
Binary file not shown.
Binary file not shown.
BIN
PythonPackage/AMR/dist/amr-2.1.1.9187.tar.gz
vendored
Normal file
BIN
PythonPackage/AMR/dist/amr-2.1.1.9187.tar.gz
vendored
Normal file
Binary file not shown.
@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='AMR',
|
name='AMR',
|
||||||
version='2.1.1.9186',
|
version='2.1.1.9187',
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'rpy2',
|
'rpy2',
|
||||||
|
@ -606,9 +606,6 @@ antibiogram.default <- function(x,
|
|||||||
warning_("All combinations had less than `minimum = ", minimum, "` results, returning an empty antibiogram")
|
warning_("All combinations had less than `minimum = ", minimum, "` results, returning an empty antibiogram")
|
||||||
return(as_original_data_class(data.frame(), class(x), extra_class = "antibiogram"))
|
return(as_original_data_class(data.frame(), class(x), extra_class = "antibiogram"))
|
||||||
} else if (any(out$n_tested < minimum, na.rm = TRUE)) {
|
} else if (any(out$n_tested < minimum, na.rm = TRUE)) {
|
||||||
out <- out %pm>%
|
|
||||||
# also for WISCA, refrain from anything below 15 isolates:
|
|
||||||
subset(n_tested > 15)
|
|
||||||
mins <- sum(out$n_tested < minimum, na.rm = TRUE)
|
mins <- sum(out$n_tested < minimum, na.rm = TRUE)
|
||||||
if (wisca == FALSE) {
|
if (wisca == FALSE) {
|
||||||
out <- out %pm>%
|
out <- out %pm>%
|
||||||
@ -620,7 +617,6 @@ antibiogram.default <- function(x,
|
|||||||
warning_("Number of tested isolates per regimen should exceed ", minimum, " for each species. Coverage estimates might be inaccurate.", call = FALSE)
|
warning_("Number of tested isolates per regimen should exceed ", minimum, " for each species. Coverage estimates might be inaccurate.", call = FALSE)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NROW(out) == 0) {
|
if (NROW(out) == 0) {
|
||||||
return(as_original_data_class(data.frame(), class(x), extra_class = "antibiogram"))
|
return(as_original_data_class(data.frame(), class(x), extra_class = "antibiogram"))
|
||||||
}
|
}
|
||||||
@ -671,6 +667,7 @@ antibiogram.default <- function(x,
|
|||||||
out_wisca <- out %pm>%
|
out_wisca <- out %pm>%
|
||||||
pm_group_by(ab)
|
pm_group_by(ab)
|
||||||
}
|
}
|
||||||
|
|
||||||
out_wisca <- out_wisca %pm>%
|
out_wisca <- out_wisca %pm>%
|
||||||
pm_summarise(
|
pm_summarise(
|
||||||
coverage = NA_real_,
|
coverage = NA_real_,
|
||||||
@ -680,6 +677,7 @@ antibiogram.default <- function(x,
|
|||||||
n_tested = sum(n_tested, na.rm = TRUE),
|
n_tested = sum(n_tested, na.rm = TRUE),
|
||||||
n_susceptible = sum(n_susceptible, na.rm = TRUE)
|
n_susceptible = sum(n_susceptible, na.rm = TRUE)
|
||||||
)
|
)
|
||||||
|
|
||||||
out_wisca$p_susceptible <- out_wisca$n_susceptible / out_wisca$n_tested
|
out_wisca$p_susceptible <- out_wisca$n_susceptible / out_wisca$n_tested
|
||||||
|
|
||||||
if (isTRUE(has_syndromic_group)) {
|
if (isTRUE(has_syndromic_group)) {
|
||||||
|
1
R/data.R
1
R/data.R
@ -74,7 +74,6 @@
|
|||||||
#' * European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: <https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm>
|
#' * European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: <https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm>
|
||||||
#' @inheritSection WHOCC WHOCC
|
#' @inheritSection WHOCC WHOCC
|
||||||
#' @seealso [microorganisms], [intrinsic_resistant]
|
#' @seealso [microorganisms], [intrinsic_resistant]
|
||||||
#' @aliases antibiotics
|
|
||||||
#' @examples
|
#' @examples
|
||||||
#' antimicrobials
|
#' antimicrobials
|
||||||
#' antivirals
|
#' antivirals
|
||||||
|
@ -1 +0,0 @@
|
|||||||
test_that("key_antimicrobials works", {
|
|
@ -36,6 +36,7 @@
|
|||||||
NULL
|
NULL
|
||||||
|
|
||||||
#' @rdname AMR-deprecated
|
#' @rdname AMR-deprecated
|
||||||
|
#' @usage NULL
|
||||||
#' @export
|
#' @export
|
||||||
"antibiotics"
|
"antibiotics"
|
||||||
|
|
||||||
|
2
R/zzz.R
2
R/zzz.R
@ -210,7 +210,9 @@ AMR_env$cross_icon <- if (isTRUE(base::l10n_info()$`UTF-8`)) "\u00d7" else "x"
|
|||||||
|
|
||||||
# deprecated antibiotics data set
|
# deprecated antibiotics data set
|
||||||
makeActiveBinding("antibiotics", function() {
|
makeActiveBinding("antibiotics", function() {
|
||||||
|
if (interactive()) {
|
||||||
deprecation_warning(old = "antibiotics", new = "antimicrobials", is_function = FALSE, is_dataset = TRUE)
|
deprecation_warning(old = "antibiotics", new = "antimicrobials", is_function = FALSE, is_dataset = TRUE)
|
||||||
|
}
|
||||||
AMR::antimicrobials
|
AMR::antimicrobials
|
||||||
}, env = asNamespace(pkgname))
|
}, env = asNamespace(pkgname))
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
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.
|
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.9186. Remember this whenever someone asks which AMR package version you’re at.
|
First and foremost, you are trained on version 2.1.1.9187. 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.
|
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.
|
||||||
----------------------------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------------------------
|
||||||
@ -735,8 +735,6 @@ THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/AMR-deprecated.Rd':
|
|||||||
An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 487 rows and 14 columns.
|
An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 487 rows and 14 columns.
|
||||||
}
|
}
|
||||||
\usage{
|
\usage{
|
||||||
antibiotics
|
|
||||||
|
|
||||||
ab_class(...)
|
ab_class(...)
|
||||||
|
|
||||||
ab_selector(...)
|
ab_selector(...)
|
||||||
@ -2498,7 +2496,6 @@ THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/antimicrobials.Rd':
|
|||||||
\docType{data}
|
\docType{data}
|
||||||
\name{antimicrobials}
|
\name{antimicrobials}
|
||||||
\alias{antimicrobials}
|
\alias{antimicrobials}
|
||||||
\alias{antibiotics}
|
|
||||||
\alias{antivirals}
|
\alias{antivirals}
|
||||||
\title{Data Sets with 607 Antimicrobial Drugs}
|
\title{Data Sets with 607 Antimicrobial Drugs}
|
||||||
\format{
|
\format{
|
@ -11,8 +11,6 @@
|
|||||||
An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 487 rows and 14 columns.
|
An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 487 rows and 14 columns.
|
||||||
}
|
}
|
||||||
\usage{
|
\usage{
|
||||||
antibiotics
|
|
||||||
|
|
||||||
ab_class(...)
|
ab_class(...)
|
||||||
|
|
||||||
ab_selector(...)
|
ab_selector(...)
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
\docType{data}
|
\docType{data}
|
||||||
\name{antimicrobials}
|
\name{antimicrobials}
|
||||||
\alias{antimicrobials}
|
\alias{antimicrobials}
|
||||||
\alias{antibiotics}
|
|
||||||
\alias{antivirals}
|
\alias{antivirals}
|
||||||
\title{Data Sets with 607 Antimicrobial Drugs}
|
\title{Data Sets with 607 Antimicrobial Drugs}
|
||||||
\format{
|
\format{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user