S4 Tools for Reading and Organizing Genetic Data

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

R-CMD-check CRAN status CRAN downloads pkgdown GitHub issues

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:

  • Import Illumina FinalReport.txt files (any panel density) and merge multiple genotype panels into a single object.
  • Quality control on SNPs and samples (call rate, MAF, HWE, monomorphic, duplicated positions, chromosome filters).
  • Prepare and run FImpute imputation and export to PLINK.
  • PCA (runPCA()) and anticlustering (runAnticlusteringPCA()) utilities for exploring structure and building balanced groups (e.g. batch design).

📦 Installation

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")

Optional: faster PCA

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")

📖 Documentation

The full package website with detailed function reference and vignettes is available at:

Key pages:


📄 License

SNPkit is licensed under the GPL-3 license.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("SNPkit")

0.1.2 by Vinícius Junqueira, 3 months ago


https://viniciusjunqueira.github.io/SNPkit/, https://github.com/viniciusjunqueira/SNPkit


Report a bug at https://github.com/viniciusjunqueira/SNPkit/issues


Browse source code at https://github.com/cran/SNPkit


Authors: Vinícius Junqueira [aut, cre] , Roberto Higa [aut] , Fernando Flores Cardoso [aut] , Marcos Jun Iti Yokoo [aut]


Documentation:   PDF Manual  


GPL-3 license


Imports methods, ggplot2, dplyr, data.table, Rcpp, stringi, anticlust, grDevices, graphics, stats, utils, MASS, snpStats, magrittr, reshape2

Suggests knitr, rmarkdown, RSpectra, testthat

Linking to Rcpp


See at CRAN