Learn R Programming

SNPRelate: Parallel computing toolset for relatedness and principal component analysis of SNP data

GNU General Public License, GPLv3

Features

Genome-wide association studies are widely used to investigate the genetic basis of diseases and traits, but they pose many computational challenges. We developed SNPRelate (R package for multi-core symmetric multiprocessing computer architectures) to accelerate two key computations on SNP data: principal component analysis (PCA) and relatedness analysis using identity-by-descent measures. The kernels of our algorithms are written in C/C++ and highly optimized.

The GDS format offers the efficient operations specifically designed for integers with two bits, since a SNP could occupy only two bits. The SNP GDS format in this package is also used by the GWASTools package with the support of S4 classes and generic functions. The extended GDS format is implemented in the SeqArray package to support the storage of single nucleotide variation (SNV), insertion/deletion polymorphism (indel) and structural variation calls.

Bioconductor:

Release Version: v1.6.4

http://www.bioconductor.org/packages/release/bioc/html/SNPRelate.html

Development Version: v1.7.2

http://www.bioconductor.org/packages/devel/bioc/html/SNPRelate.html

News

Tutorials

http://corearray.sourceforge.net/tutorials/SNPRelate

http://www.bioconductor.org/packages/devel/bioc/vignettes/SNPRelate/inst/doc/SNPRelateTutorial.html

Citation

Zheng X, Levine D, Shen J, Gogarten SM, Laurie C, Weir BS (2012). A High-performance Computing Toolset for Relatedness and Principal Component Analysis of SNP Data. Bioinformatics. DOI: 10.1093/bioinformatics/bts606.

Installation

  • Bioconductor repository:
source("http://bioconductor.org/biocLite.R")
biocLite("SNPRelate")
  • Development version from Github:
library("devtools")
install_github("zhengxwen/gdsfmt")
install_github("zhengxwen/SNPRelate")

The install_github() approach requires that you build from source, i.e. make and compilers must be installed on your system -- see the R FAQ for your operating system; you may also need to install dependencies manually.

  • Install the package from the source code:

gdsfmt, SNPRelate

wget --no-check-certificate https://github.com/zhengxwen/gdsfmt/tarball/master -O gdsfmt_latest.tar.gz
wget --no-check-certificate https://github.com/zhengxwen/SNPRelate/tarball/master -O SNPRelate_latest.tar.gz
R CMD INSTALL gdsfmt_latest.tar.gz
R CMD INSTALL SNPRelate_latest.tar.gz

## Or
curl -L https://github.com/zhengxwen/gdsfmt/tarball/master/ -o gdsfmt_latest.tar.gz
curl -L https://github.com/zhengxwen/SNPRelate/tarball/master/ -o SNPRelate_latest.tar.gz
R CMD INSTALL gdsfmt_latest.tar.gz
R CMD INSTALL SNPRelate_latest.tar.gz
  • Old version (<= v0.9.19) from R-Forge repository:
install.packages("gdsfmt", repos="http://R-Forge.R-project.org")
install.packages("SNPRelate", repos="http://R-Forge.R-project.org")

Copy Link

Version

Monthly Downloads

236

Version

1.6.4

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

February 15th, 2017

Functions in SNPRelate (1.6.4)

snpgdsClose

Close the SNP GDS File
snpgdsApartSelection

Select SNPs with a basepair distance
hapmap_geno

SNP genotypes of HapMap samples
snpgdsCombineGeno

Merge SNP datasets
snpgdsCreateGenoSet

Create a SNP genotype dataset from a GDS file
snpgdsBED2GDS

Conversion from PLINK BED to GDS
snpgdsAdmixProp

Estimate ancestral proportions from the eigen-analysis
snpgdsCreateGeno

Create a SNP genotype dataset from a matrix
snpgdsCutTree

Determine clusters of individuals
snpgdsAlleleSwitch

Allele-switching
snpgdsEIGMIX

Eigen-analysis on SNP genotype data
snpgdsGDS2Eigen

Conversion from GDS to Eigen (EIGENSTRAT)
snpgdsErrMsg

Get the last error information
snpgdsGDS2BED

Conversion from GDS to PLINK BED
snpgdsExampleFileName

Example GDS file
snpgdsDiss

Individual dissimilarity analysis
snpgdsGDS2PED

Conversion from GDS to PED
snpgdsDrawTree

Draw a dendrogram
snpgdsFst

F-statistics (fixation indices)
SNPGDSFileClass

SNPGDSFileClass
snpgdsHWE

Statistical test of Hardy-Weinberg Equilibrium
snpgdsLDMat

Linkage Disequilibrium (LD) analysis
snpgdsLDpair

Linkage Disequilibrium (LD)
snpgdsIBDKING

KING method of moment for the identity-by-descent (IBD) analysis
snpgdsSelectSNP

SNP selection
snpgdsSlidingWindow

Sliding window
snpgdsSNPListIntersect

Get a common SNP list between two SNP list objects
snpgdsIBS

Identity-By-State (IBS) proportion
snpgdsIBSNum

Identity-By-State (IBS)
snpgdsPCA

Principal Component Analysis (PCA) on SNP genotype data
snpgdsPCACorr

PC-correlated SNPs in principal component analysis
snpgdsIBDMLE

Maximum likelihood estimation (MLE) for the Identity-By-Descent (IBD) Analysis
snpgdsIndInb

Individual Inbreeding Coefficients
snpgdsIBDMLELogLik

Log likelihood for MLE method in the Identity-By-Descent (IBD) Analysis
snpgdsPED2GDS

Conversion from PLINK PED to GDS
snpgdsIndInbCoef

Individual Inbreeding Coefficient
snpgdsSampMissRate

Missing Rate of Samples
snpgdsVCF2GDS

Reformat VCF file(s)
snpgdsGEN2GDS

Conversion from Oxford GEN format to GDS
SNPRelate-package

Parallel Computing Toolset for Genome-Wide Association Studies
snpgdsGetGeno

To get a genotype matrix
snpgdsOption

Option settings: chromosome coding, etc
snpgdsSummary

Summary of GDS genotype file
snpgdsPairIBD

Calculate Identity-By-Descent (IBD) Coefficients
snpgdsIBDSelection

Get a table of IBD coefficients
snpgdsIBDMoM

PLINK method of moment (MoM) for the Identity-By-Descent (IBD) Analysis
snpgdsSNPListStrand

Switch allele strand.
snpgdsPairIBDMLELogLik

Log likelihood for MLE method in the Identity-By-Descent (IBD) Analysis
snpgdsTranspose

Transpose genotypic matrix
snpgdsPairScore

Genotype Score for Pairs of Individuals
snpgdsVCF2GDS_R

Reformat a VCF file (R implementation)
snpgdsSNPRateFreq

Allele Frequency, Minor Allele Frequency, Missing Rate of SNPs
snpgdsGRM

Genetic Relationship Matrix (GRM) for SNP genotype data
snpgdsHCluster

Hierarchical cluster analysis
snpgdsLDpruning

Linkage Disequilibrium (LD) based SNP pruning
snpgdsOpen

Open a SNP GDS File
snpgdsPCASampLoading

Project individuals onto existing principal component axes
snpgdsPCASNPLoading

SNP loadings in principal component analysis
snpgdsSNPList

Create a SNP list object
snpgdsSNPListClass

the class of a SNP list