GenepiK is an open-source R package designed to analyse Klebsiella genomics surveys. It provides tools to generate plots for AST data, clinical data and genomics data generated by Kleborate.
This package is developed by members of the CGPS team and the GHRU units in Colombia, Nigeria, India and The Philippines.
- Import Merged Epidemiological, Microbiological and Genomics Data: Import from a template file
- Top 20 ST and Proportion of CARBA-R/S: Plots the top 20 STs and which proportion of each is CARBA-R/S.
- AST results based on Isolate type, Carbapenems susceptibility and Carbapenemase gene presence/absence: Plot susceptibility testing data based on 3 criteria.
- UpSet plots for resistance and virulence: Generate powerful UpSet plots to identify intersections of AMR/virulence gene presence and Kleborate scores.
Planned for development:
- Transmission analysis: Uses a pairwise SNP matrix to build a network.
- Serotyping analysis: Plots the KL and OL distribution and performs a cumulative analysis.
To install and explore the package, follow the instructions below:
Install the latest version of this package with:
install.packages("remotes") # if you haven't already
#install specific version of ggplot2 needed
remotes::install_version("ggplot2", version = "3.5.2")
#install the GenepiK package
remotes::install_github("cgps-group/GenepiK")All required packages will be installed automatically.
Do not update any of the packages if it asks. Selection option 3 to skip the updates.

It might be best to restart R before running the installation to prevent issues with running the examples below.
library(GenepiK)# Example Klebsiella data
# Import data
import <- import_data("~/git_repos/GenepiK/test_input/rapid_report_dummy_data.csv", "~/git_repos/GenepiK/test_output/")
# Analyse top 10 STs
topN_ST_counts_csv(masterdata, "~/git_repos/GenepiK/test_output/", 10)
create_ST_barplot(masterdata, "~/git_repos/GenepiK/test_output/")
# Do upset plot of AMR/virulence scores and genes
create_resistance_upset_plots(masterdata, "~/git_repos/GenepiK/test_output/")
create_virulence_upset_plots(masterdata, "~/git_repos/GenepiK/test_output/")
# Plot AST data based on 3 criteria
create_ast_barplot(masterdata, "~/git_repos/GenepiK/test_output/")
create_ast_barplots_gene(masterdata, "~/git_repos/GenepiK/test_output/")
For more see the Vignettes.
Contributions are welcome! If you encounter issues or wish to suggest new features, please open an issue or submit a pull request.
This package is distributed under the GNU GPL-3.0 Licence. See LICENSE for details.