Run plink --pca to calculate the principal components on merged genotypes of the study and reference dataset.
run_check_ancestry(indir, prefixMergedDataset, qcdir = indir, verbose = FALSE, path2plink = NULL, showPlinkOutput = TRUE)
indir | [character] /path/to/directory containing the basic PLINK data files prefixMergedDataset.bim,prefixMergedDataset.fam and prefixMergedDataset.bed. |
---|---|
prefixMergedDataset | [character] Prefix of merged study and reference data files, i.e. prefixMergedDataset.bed, prefixMergedDataset.bim, prefixMergedDataset.fam. |
qcdir | [character] /path/to/directory to save prefixMergedDataset.eigenvec as returned by plink --pca. User needs writing permission to qcdir. Per default qcdir=indir. |
verbose | [logical] If TRUE, progress info is printed to standard out. |
path2plink | [character] Absolute path to PLINK executable
(https://www.cog-genomics.org/plink/1.9/) i.e.
plink should be accesible as path2plink -h. The full name of the executable
should be specified: for windows OS, this means path/plink.exe, for unix
platforms this is path/plink. If not provided, assumed that PATH set-up works
and PLINK will be found by |
showPlinkOutput | [logical] If TRUE, plink log and error messages are printed to standard out. |
Both, run_check_ancestry
and its evaluation by
evaluate_check_ancestry
can simply be invoked by
check_ancestry
.
indir <- system.file("extdata", package="plinkQC") qcdir <- tempdir() prefixMergedDataset <- 'data.HapMapIII' # the following code is not run on package build, as the path2plink on the # user system is not known.# NOT RUN { run <- run_check_ancestry(indir=indir, qcdir=qcdir, prefixMergedDataset) # }