plink_fst: Fst with PLINK

Description Usage Arguments Details Value

View source: R/plink.R

Description

Fst with PLINK

Usage

1
2
3
4
5
plink_fst(bfile, output.prefix, pop.file, all.comb = TRUE,
  with.na = FALSE, 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.

pop.file

[string]
File defining disjoint clusters/strata of samples. FIDs in the first column, IIDs in the second column, and cluster names in the third column.

all.comb

[flag]
Indicate if all population combinations should be considered for Fst calculation.

with.na

[flag]
Indicate if samples with missing population identifier ('NA') should be considered as a valid population.

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 the outlier removal and the final Fst values.


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