Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (16.8%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
MIC R package
Basic Info
- Host: GitHub
- Owner: agerada
- License: gpl-3.0
- Language: R
- Default Branch: main
- Size: 2.93 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
- Releases: 1
Created over 1 year ago
· Last pushed about 1 year ago
Metadata Files
Readme
Changelog
License
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# MIC
[](https://github.com/agerada/MIC/actions/workflows/R-CMD-check.yaml)
## Introduction
`MIC` is an R package for the analysis of minimum inhibitory concentration (MIC)
data. The package was designed to be compatible with the [`AMR`](https://amr-for-r.org/), in
particular most of the functions in `MIC` are designed to accept and return
`AMR` objects, such as `mic` and `sir`. The primary functions in `MIC` are
designed towards validation studies of minimum inhibitory concentrations, however
it also can (optionally) be used to support the construction of machine learning
models that predict MIC values from genomic data.
## Features
- Validation metrics (such as essential agreement) for MIC experiments or
predictions allow comparison against a gold standard, in line with
ISO 20776-2:2021.
- Plots and tables can be generated from validation experiments.
- Quality control analysis of MIC experiments.
- Functions to deal with censoring in MIC data.
- Helper functions to download whole genome sequencing data and susceptibility
metadata from the [PATRIC](https://www.bv-brc.org/docs/system_documentation/data.html)
database at BV-BRC.
- Conversion of whole genome sequence data (assembled .fna files) to k-mer based
features for machine learning models.
- Fast k-mer counting using C++ and `Rcpp`.
- K-mer features stored in `XGBoost`-compatible `libsvm` format.
## Installation
### CRAN
```r
install.packages("MIC")
```
### GitHub
```r
# install.packages("remotes")
remotes::install_github("agerada/MIC")
```
## Example
Load the `MIC` package -- it is highly recommended that `AMR` is also loaded.
Where possible, `MIC` functions maintain compatibility with `AMR` objects, in
particular the `mic` and `sir` classes.
```{r val-example}
library(MIC)
library(AMR)
```
To compare two `mic` vectors (e.g., one from a gold standard and one from a
prediction or investigational assay), the `compare_mic` function can be used.
An example dataset of MIC values is provided with the package, which will be
used here.
```{r}
data("example_mics")
head(example_mics)
```
The dataset contains MIC values (in `mic` format) for a "test" assay, and a
"gold standard" (`gs`) assay. We will use `compare_mic` to compare the MICs and
validate the "test" assay:
```{r}
val <- compare_mic(gold_standard = example_mics$gs, test = example_mics$test)
val
```
Calling `summary` provides the essential agreement (EA) rates and assay bias:
```{r}
summary(val)
```
If organisms and antimicrobials are provided, `compare_mic` will also calculate
and return the categorical agreement (CA) rates, in the form of minor, major,
and very major errors:
```{r message=FALSE}
val <- compare_mic(gold_standard = example_mics$gs, test = example_mics$test,
mo = example_mics$mo, ab = example_mics$ab)
val
```
This time, calling `summary` will provide a breakdown of the categorical
agreement rates in addition to the EA rates:
```{r}
summary(val)
```
Using `as.data.frame` allows us to continue working with the summarised results:
```{r}
head(as.data.frame(val))
```
The results of an `mic_validation` can be plotted in a confusion matrix
(failed essential agreements are in red):
```{r fig-val-ea, dpi=300}
plot(val)
```
The plot can also be faceted by antimicrobial:
```{r dpi=300, fig.height=14}
plot(val, facet_wrap_ncol = 1)
```
The `table` function can be used to generate a table of the results:
```{r message=FALSE}
# generate table for MEM
mem_dat <- subset(example_mics, ab == "MEM")
mem_val <- compare_mic(gold_standard = mem_dat$gs, test = mem_dat$test)
table(mem_val)
```
Owner
- Name: Alessandro Gerada
- Login: agerada
- Kind: user
- Repositories: 2
- Profile: https://github.com/agerada
GitHub Events
Total
- Create event: 2
- Release event: 1
- Issues event: 5
- Watch event: 1
- Delete event: 1
- Issue comment event: 3
- Push event: 26
- Public event: 1
- Pull request event: 2
Last Year
- Create event: 2
- Release event: 1
- Issues event: 5
- Watch event: 1
- Delete event: 1
- Issue comment event: 3
- Push event: 26
- Public event: 1
- Pull request event: 2
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 4
- Total pull requests: 2
- Average time to close issues: 8 days
- Average time to close pull requests: 2 days
- Total issue authors: 2
- Total pull request authors: 1
- Average comments per issue: 1.0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 4
- Pull requests: 2
- Average time to close issues: 8 days
- Average time to close pull requests: 2 days
- Issue authors: 2
- Pull request authors: 1
- Average comments per issue: 1.0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- agerada (3)
- msberends (1)
Pull Request Authors
- agerada (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 230 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
cran.r-project.org: MIC
Analysis of Antimicrobial Minimum Inhibitory Concentration Data
- Homepage: https://github.com/agerada/MIC
- Documentation: http://cran.r-project.org/web/packages/MIC/MIC.pdf
- License: GPL (≥ 3)
-
Latest release: 1.1.0
published about 1 year ago
Rankings
Dependent packages count: 27.2%
Forks count: 28.9%
Dependent repos count: 33.5%
Stargazers count: 37.0%
Average: 42.7%
Downloads: 86.8%
Maintainers (1)
Last synced:
10 months ago
Dependencies
.github/workflows/R-CMD-check.yaml
actions
- actions/checkout v4 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION
cran
- R >= 4.1.0 depends
- AMR * imports
- Biostrings * imports
- Rcpp * imports
- data.table * imports
- dplyr * imports
- forcats * imports
- future.apply * imports
- ggplot2 * imports
- glue * imports
- lemon * imports
- progressr * imports
- purrr * imports
- readr * imports
- rlang * imports
- stringr * imports
- tibble * imports
- tidyr * imports
- caret * suggests
- flextable * suggests
- lifecycle * suggests
- testthat >= 3.0.0 suggests
- xgboost * suggests