plink_hardy: Calculate Hard-Weinberg equilibrium (HWE) p-values and other...

View source: R/plink_hardy.R

plink_hardyR Documentation

Description

A wrapper for plink2's hardy option. In addition to the arguments listed below, the executable is run with --silent and --nonfounders (to use all individuals whether they are labeled as founders or not).

Usage

plink_hardy(
  name,
  name_out = name,
  midp = FALSE,
  plink_bin = "plink2",
  threads = 0,
  verbose = TRUE
)

Arguments

name

The shared name of the input plink BED/BIM/FAM files without extensions.

name_out

The base name of the output hardy file (default same as input name), which gets extensions added automatically.

midp

If TRUE, uses mid p-value method. Default doesn't use it.

plink_bin

The path to the binary executable. Default assumes plink2 is in the PATH.

threads

The number of threads to use. The values 0 (default), NA, or NULL use all threads available (the output of parallel::detectCores()).

verbose

If TRUE (default), prints the command line before it is executed.

Value

The table of HWE statistics, as a tibble, read with read_plink_hardy() (see that for more info).

See Also

read_plink_hardy() for reading hardy files.

delete_files_plink_hardy() for deleting the hardy outputs.

delete_files_log() for deleting plink log files.

system3(), used (with ret = FALSE) for executing plink2 and error handling.

Examples

## Not run: 
# calculate desired statistics
data <- plink_hardy( name )

## End(Not run)


OchoaLab/genbin documentation built on Nov. 14, 2024, 7:33 p.m.