Provides an integrated suite of tools for handling single nucleotide polymorphism (SNP) genotype data in large-scale genetic studies. Supports importing and merging genotype files, performing quality control on SNP markers and samples, and preparing data for downstream analyses using popular software such as 'FImpute' and 'PLINK'. Offers S4 classes and methods to efficiently encapsulate SNP data, along with utilities for generating genotype summary statistics and visualization. Additional functionalities include anticlustering approaches for batch effect control, automated script generation for external software, and streamlined workflows for large datasets commonly encountered in animal and plant breeding programs. Designed to facilitate reproducible and scalable SNP data analyses in quantitative and statistical genetics.
SNPkit is an R package designed for manipulation, organization, and analysis of genotypic data, with a strong focus on integration with tools such as FImpute and PLINK.
It provides robust S4-based data structures for storing genotypes and marker maps, along with functions to combine different genotype panels, summarize data, and prepare files for imputation and selection pipelines.
Key capabilities:
FinalReport.txt files (any panel density) and merge multiple genotype panels into a single object.runPCA()) and anticlustering (runAnticlusteringPCA()) utilities for exploring structure and building balanced groups (e.g. batch design).SNPkit depends on snpStats, which is distributed through Bioconductor. Install it first:
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager")
BiocManager::install("snpStats")
Then install the stable release from CRAN:
install.packages("SNPkit")
Or install the development version (latest features) from GitHub:
# install.packages("remotes")
remotes::install_github("viniciusjunqueira/SNPkit")
runPCA() and runAnticlusteringPCA() can use RSpectra for a much faster, low-memory truncated PCA on wide genotype data. It is optional — install it to enable the fast path:
install.packages("RSpectra")
The full package website with detailed function reference and vignettes is available at:
Key pages:
SNPkit is licensed under the GPL-3 license.