50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


⚠️There's a newer version (1.1.2) of this package.Take me there.

randPedPCA (version 1.0.1)

Fast PCA for Large Pedigrees

Description

Carry out principal component analysis (PCA) of very large pedigrees such as found in breeding populations! This package, 'randPedPCA', exploits sparse matrices and randomised linear algebra to deliver a gazillion-times speed-up compared to naive singular value decoposition (SVD) (and eigen decomposition).

Copy Link

Version

Install

install.packages('randPedPCA')

Monthly Downloads

222

Version

1.0.1

License

MIT + file LICENSE

Maintainer

Hannes Becher

Last Published

April 24th, 2025

Functions in randPedPCA (1.0.1)

randRangeFinder

Generate range matrix for SVD
randSVD

Singular value decomposition in sparse triangular matrix
plot3D

3D plot using rgl
rppca

Fast pedigree PCA using sparse matrices and randomised linear algebra
pedLInv

Example pedigree L inverse matrix
importLinv

Generate spam object from L inverse file
dspc

Add downsampling index to rppca object
hutchpp

Hutch++ trace estimation
getNumVectorsHutchinson

Compute the number of vectors to use for Hutchinson trace estimation
sparse2spam

Convert generic sparse matrix to spam format
randTraceHutchinson

Trace estimation for sparse L inverse matrices
plot3DWithProj

3D plot of PC scores with projections on coordinate planes
pedMeta2

#' Example genotype data #' #' An genotype matrix (0/1/2) generated from an AlphaSimR simulation of 20 generations. #' An original population splits into sub-populations A and B. After a number of #' generations, crossbreeding starts. #' #' #' @format ## `pedGeno` #' Matrix of 2650 rows (inidividuals) and 11000 columns (SNPs) #' @source Simulation "pedGeno" Metadata associated with the 2nd example pedigree
pedLInv4

Example pedigree L inverse matrix
pedMeta

Metadata associated with the example pedigree
pedLInv2

Example pedigree L inverse matrix
pedMeta4

#' Example genotype data 2 #' #' An genotype matrix (0/1/2) generated from an AlphaSimR simulation of 20 generations. #' Two diverged populations A and B. After a number of #' generations, crossbreeding starts. #' #' #' @format ## `pedGeno2` #' Matrix of 2650 rows (inidividuals) and 11000 columns (SNPs) #' @source Simulation "pedGeno2" Metadata associated with the 2nd example pedigree