Learn R Programming

plinkQC (version 0.2.2)

run_check_heterozygosity: Run PLINK heterozygosity rate calculation

Description

Run plink --het to calculate heterozygosity rates per individual.

Usage

run_check_heterozygosity(indir, name, qcdir = indir, verbose = FALSE,
  path2plink = NULL, showPlinkOutput = TRUE)

Arguments

indir

[character] /path/to/directory containing the basic PLINK data files name.bim, name.bed, name.fam files.

name

[character] Prefix of PLINK files, i.e. name.bed, name.bim, name.fam.

qcdir

[character] /path/to/directory to save name.het as returned by plink --het. 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 exec_wait('plink').

showPlinkOutput

[logical] If TRUE, plink log and error messages are printed to standard out.

Details

All, run_check_heterozygosity, run_check_missingness and their evaluation by evaluate_check_het_and_miss can simply be invoked by check_het_and_miss.

Examples

Run this code
# NOT RUN {
indir <- system.file("extdata", package="plinkQC")
name <- 'data'
qcdir <- tempdir()
# the following code is not run on package build, as the path2plink on the
# user system is not known.
# }
# NOT RUN {
run <- run_check_heterozygosity(indir=indir, qcdir=qcdir, name=name)
# }

Run the code above in your browser using DataLab