plink_pca: PCA with PLINK

Description Usage Arguments Details Value

Description

PCA with PLINK

Usage

1
2
3
4
plink_pca(bfile, output.prefix, num.evec, outlier.removal = FALSE,
  outlier.sigma, num.outlier.evec, num.outlier.iter, ld.pruning.params,
  bed.file = NULL, bim.file = NULL, fam.file = NULL,
  exec = "plink2", tmp.dir = NULL, num.threads, memory)

Arguments

bfile

[string]
The basename of the binary PLINK files.

output.prefix

[string]
The basename of the new binary PLINK files.

num.evec

[int]
Number of principal componentns to calculate.

outlier.removal

[flag]
Indicate if outliers shall be removed before final PCA computation.

outlier.sigma

[int]
How many standard deviations from the mean of a single PC is not an outlier?

num.outlier.evec

[int]
How many PCs shall be used for outlier detection?

num.outlier.iter

[int]
Number of outlier iterations.

ld.pruning.params

[list]
List with function arguments passed to plink_ld_pruning.

bed.file

[string]
Alternative to bfile interface. Specify bed, bim and fam files individually.

bim.file

[string]
Alternative to bfile interface. Specify bed, bim and fam files individually.

fam.file

[string]
Alternative to bfile interface. Specify bed, bim and fam files individually.

exec

[string]
Path of PLINK executable.

tmp.dir

[string]
Path where to save temporary files. If not set by user, defaults to tempdir().

num.threads

[int]
Number of CPUs usable by PLINK. Default is determined by SLURM environment variables and at least 1.

memory

[int]
Memory for PLINK in Mb. Default is determined by minimum of SLURM environment variables SLURM_MEM_PER_CPU and num.threads * SLURM_MEM_PER_NODE and at least 5000.

Details

First independent SNPs are extracted using PLINK LD pruning (plink_ld_pruning). If requested, outliers are detected and removed by calculating a PCA, calculating the mean (\hat{μ}_{j}) and standard deviation (\hat{σ}_{j}) of each principal component, and excluding those samples who's PC value v_{j} exceeds \hat{μ}_{j}\pmν\,\hat{σ}_{j} for at least one j, where ν is outlier.sigma.

Value

A list of logs, Eigenvectors and Eigenvalues of both the outlier removal and the final PCA.


imbs-hl/imbs documentation built on Sept. 6, 2019, 11:05 p.m.