Learn R Programming

rMVP (version 1.1.1)

MVP.PCA: Principal Component Analysis

Description

Build date: Dec 14, 2016 Last update: Oct 29, 2018

Usage

MVP.PCA(
  M = NULL,
  K = NULL,
  maxLine = 10000,
  ind_idx = NULL,
  pcs.keep = 5,
  cpu = 1,
  verbose = TRUE
)

Value

Output: PCs - a n * npc matrix of top number of PCs, n is population size and npc is @param pcs.keep

Arguments

M

Genotype in numeric format, pure 0, 1, 2 matrix; m * n, m is marker size, n is population size

K

kinship matrix

maxLine

the number of markers handled at a time, smaller value would reduce the memory cost

ind_idx

the index of effective genotyped individuals used in analysis

pcs.keep

maximum number of PCs for output

cpu

the number of cpu

verbose

whether to print detail.

Author

Xiaolei Liu, Lilin Yin and Haohao Zhang

Examples

Run this code
# \donttest{
genoPath <- system.file("extdata", "06_mvp-impute", "mvp.imp.geno.desc", package = "rMVP")
genotype <- attach.big.matrix(genoPath)
print(dim(genotype))

pca <- MVP.PCA(M=genotype, cpu=1)
str(pca)
# }

Run the code above in your browser using DataLab