MinSNPs: an R package for derivation of resolution-optimised SNP sets from microbial genomic data
Authors: Hoon Kian Soon , Holt Deborah C , Auburn Sarah , Shaw Peter , Giffard Philip M. 
Published: July 2022

2.AbstractHere we present the R package - MinSNPs. This is designed to assemble resolution optimised sets of single nucleotide polymorphisms (SNPs) from alignments such as genome wide orthologous SNP matrices. We also demonstrate a pipeline for assembling such matrices from multiple bio-projects, so as to facilitate SNP set derivation from globally representative data sets. MinSNPs can derive sets of SNPs optimised for discriminating any user-defined combination of sequences from all others. Alternatively, SNP sets may be optimised to discriminate all from all, i.e., to maximise diversity. MinSNPs encompasses functions that facilitate rapid and flexible SNP mining, and clear and comprehensive presentation of the results. The MinSNPs running time scales in a linear fashion with input data volume, and the numbers of SNPs and SNPs sets specified in the output. MinSNPs was tested using a previously reported orthologous SNP matrix of Staphylococcus aureus. and an orthologous SNP matrix of 3,279 genomes with 164,335 SNPs assembled from four S. aureus short read genomic data sets. MinSNPs demonstrated efficacy in deriving discriminatory SNP sets for potential surveillance targets and in identifying SNP sets optimised to discriminate isolates from different clonal complexes (CC). MinSNPs was also tested with a large Plasmodium vivax orthologous SNP matrix. A set of five SNPs was derived that reliably indicated the country of origin within 3 south-east Asian countries. In summary, we report the capacity to assemble comprehensive SNP matrices that effectively capture microbial genomic diversity, and to rapidly and flexibly mine these entities for optimised surveillance marker sets.3.Impact statementWe present the R package “MinSNPs”. This derives resolution optimised SNP sets from datasets of genome sequence variation. Such SNP sets can underpin targeted genetic analysis for high throughput surveillance of microbial variants of public health concern. MinSNPs supports considerable flexibility in search methods. The package allows non-specialist bioinformaticians to easily and quickly convert global scale data of intra-specific genomic variation into SNP sets precisely and efficiently directed towards many microbial genetic analysis tasks.4.Data summaryThe source code for minSNPs is available from GitHub under MIT Licence (URLs – https://github.com/ludwigHoon/minSNPs and mirrored in https://cran.r-project.org/package=minSNPs)Staphylococcus aureus (STARRS data set) Orthologous SNP Matrix; (URL - https://doi.org/10.1371/journal.pone.0245790.s005)Plasmodium vivax data set (VCF file); (URL - https://www.malariagen.net/resource/24)Staphylococcus aureus short read sequences (fastq) from bioprojects: PRJEB40888 (or STARRS)(https://www.ncbi.nlm.nih.gov/bioproject/PRJEB40888), PRJEB3174 (https://www.ncbi.nlm.nih.gov/bioproject/PRJEB3174), PRJEB32286 (https://www.ncbi.nlm.nih.gov/bioproject/PRJEB32286), and PRJNA400143 (https://www.ncbi.nlm.nih.gov/bioproject/PRJNA400143)