pcadapt is an algorithm that detects genetic markers under selection. It is based on the principal component analysis (PCA) of the genotypes of the individuals. The method is described in Luu et al. (2017), See the R package pcadapt, which provides extensive documentation and examples.

gt_pcadapt(x, pca, k, n_cores = 1)

Arguments

x

A gen_tibble object.

pca

a gt_pca object, as returned by gt_pca_partialSVD() or gt_pca_randomSVD().

k

Number of principal components to use in the analysis.

n_cores

Number of cores to use.

Value

An object of subclass gt_pcadapt, a subclass of mhtest.

Details

Internally, this function uses the snp_pcadapt function from the bigsnpr package.