library(knitr) opts_chunk$set(fig.align = "center", out.width = "90%", fig.width = 6, fig.height = 5.5, dev.args=list(pointsize=10), par = TRUE, # needed for setting hook collapse = TRUE, # collapse input & ouput code in chunks warning = FALSE) knit_hooks$set(par = function(before, options, envir) { if(before && options$fig.show != "none") par(family = "sans", mar=c(4.1,4.1,1.1,1.1), mgp=c(3,1,0), tcl=-0.5) }) set.seed(1) # for exact reproducibility
MDRClassifier
is an R package developed to analyze and classify multidrug resistance (MDR) of protein sequences. The package is targeted for bioinformatics exploring mutidrug resistance of species. Three categories define by European Centre for Disease Prevention and Control: MDR, XDR, PDR, are used for classifying the MDR of protein sequences. The main function classifyAllMDR classify the multi-drug resistance level of isolates. The function classifyMDR classify the multi-drug resistance level of specific isolate given the Sample ID. The function MDRPlot (under construction) plot the isolates by their categories of multidrug resistances. Function classifyMDRfromRSI* generates the MDR category of specific sample from RSI table, which is commonly used in antibiotic resistance analysis. Function classifyallMDRfromRSI
produces a dataframe with sample ID and their corresponding MDR categories from RSI table. For more information, see details below. This document gives a tour of MDRClassifer (version 0.1.0). It was written in R Markdown, using the knitr package for production. See help(package = "MDRClassifier")
for further details.
See help(package = "MDRClassifier")
for further details and references provided by citation("MDRClassifier")
.To download MDRClassifier, use the following commands:
require("devtools") install_github("Cloris2000/MDRClassifier", build_vignettes = TRUE) library("MDRClassifier")
To list all sample functions available in the package:
ls("package:MDRClassifier")
To list all sample datasets available in the package:
data(package = "MDRClassifier")
There are three datasets and seven functions in this package.
1. DrugResistance is the dataset for classifying multi-drug resistance category.
There are 117,967 rows and 4 columns in total. Each row represents the sample ID of isolates. Columns are predicted antibiotic resistance genes, Drug class, Antimicrobial agents, and resistance mechanism from RGI package.
2. pca_data is the dataset for Principle Component Analysis (PCA) to cluster the samples and predict antimicrobial resistance. There are 500 rows and 53 columns. Each row represents one sample, and each column stands for one feature of clinical trails.
3. RSI_table is the dataset for classifying multi-drug resistance category from the table describing the intensity of antibiotic resistance. Susceptible, Intermediate, and Resistant are three categories for minimum inhibition concentration test.
1.classifyMDR When user provide specific sample ID of isolate, this function classify the multi-drug resistance by finding the corresponding antimicrobial category and use the number of category to classify the multi-drug resistance level: MDR, XDR, PDR. See example with
#require("MDRClassifier") #Using DrugResistance dataset available with package data <- MDRClassifier::DrugResistance category <- MDRClassifier::classifyMDR(drug_resistance = data, sample_ID = "GFBCEDDN_00939", antimicrobial_agents = "Antimicrobial.Agent") # To obtain value from results category
2.classifyAllMDR This function classifies the multi-drug resistances of all samples in the dataframe given the all drug resistances information from RGI prediction. A sample can be generated by:
require(MDRClassifier) #Using DrugResistance dataset available with package data <- MDRClassifier::DrugResistance category_result <- MDRClassifier::classifyAllMDR(drug_resistance = DrugResistance, antimicrobial_agents = 'Antimicrobial.Agent') #To obtain value from results category_result
3.MDRPlot This function takes in a list of dataframes and convert the antimicrobial resistance level to three categories: MDR, XDR, and PDR. The barplot indicates the percentage of MDR, XDR, and PDR isolates in the data. A sample barplot can be produced by:
require("MDRClassifier") x <- data.frame(Sample_ID = c("1","2","3","4","5","6"), Category = c("MDR", "PDR", "NULL", "XDR", "PDR", "NULL")) #Obtain plot by MDRClassifier::MDRPlot(x)
The x-axis represents the number of samples in each category, and the y-axis
represents three multi-drug resistance category: MDR, XDR, PDR.
4.predictAMR This function calculates new samples's PCA value.
#Using pca_data available with package pca_value <- MDRClassifier::predictAMR(pca_data[c(1:17), c(2,9,16)], pca_data[c(18:20),c(2,9,16)]) #to get result pca_value
5.classifyMDRfromRSI This function generates the MDR category of specific sample from RSI table, which is commonly used in antibiotic resistance analysis.
#Using RSI_table dataset available with package #require("MDRClassifier") category <- classifyMDRfromRSI(RSI_table = RSI_table, sample_ID = "PA1381", total_cat = 8) # To obtain value from results category ``` __6.classifyallMDRfromRSI__ This function produces a dataframe with sample ID and their corresponding MDR categories from RSI table. ```r #require("MDRClassifier") # Using RSI_table dataset available with package #classify the category of all samples' multi-drug resistance df <- classifyAllMDRfromRSI(RSI_table = RSI_table, total_cat = 8) # To obtain value from results df ``` __7.plotPCA__ This function cluster and predicts multi-drug resistance by principle component analysis (PCA) to show the new sample's in the original cluster. ```r #Using pca_data available with package #to obtain predicted result with new samples plot_result1 <- MDRClassifier::plotPCA(pca_data[c(1:17), c(2,9,16)], pca_data[c(18:20), c(2,9,16)],"predict") plot_result1 #to obtain individual PCA result plot_result2 <- MDRClassifier::plotPCA(pca_data[c(1:17), c(2,9,16)], pca_data[c(18:20), c(2,9,16)],"individual") plot_result2 #to obtain variable PCA result plot_result3 <- MDRClassifier::plotPCA(pca_data[c(1:17), c(2,9,16)], pca_data[c(18:20), c(2,9,16)],"variables") plot_result3
European Centre for Disease Prevention and Control (ECDC) criteria to define
antimicrobial resistance into the following categories (Magiorakos et al., 2021):
1. MDR: non-susceptibility to at least one agent in three or more antimicrobial
categories.
2. XDR: non-susceptibility to at least one agent in all but less than or equal to
2antimicrobial categories.
3. PDR: non-susceptibility to all agents in all antimicrobial categories.
Antimicrobial categories are available from:
http://www.ecdc.europa.eu/en/activities/diseaseprogrammes/ARHAI/Pages/public_consu
ltation_clinical_microbiology_infection_article.aspx.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.