MVP.PCA: Principal Component Analysis

View source: R/MVP.PCA.r

MVP.PCAR Documentation

Principal Component Analysis

Description

Principal Component Analysis

Usage

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

Arguments

M

genotype, either m by n or n by m is supportable, 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

mrk_idx

the index of effective markers used in analysis

mrk_bycol

whether the markers are stored by columns in genotype (i.e. M is a n by m matrix)

pcs.keep

maximum number of PCs for output

cpu

the number of cpu

verbose

whether to print detail.

Value

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

Examples


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)



XiaoleiLiuBio/MVP documentation built on Jan. 3, 2025, 5:59 a.m.