emmax_lmm: Run EMMAX and returns table of association statistics.

View source: R/emmax_lmm.R

emmax_lmmR Documentation

Run EMMAX and returns table of association statistics.

Description

A wrapper for running EMMAX genetic association test followed by reading of the results by read_emmax_ps().

Usage

emmax_lmm(
  name,
  file_kinship,
  name_phen = name,
  name_out = name,
  maf = NULL,
  emmax_bin = "emmax",
  verbose = TRUE
)

Arguments

name

The shared name of the input plink TPED/TFAM files without extensions.

file_kinship

The path to the kinship matrix file.

name_phen

The base name of the phenotype file without .phen extension (default same as input name).

name_out

The base name of the output statistics file (default same as input name), which gets extension ".ps" added automatically.

maf

Optional vector of allele frequencies (misnamed, these cannot be minor allele frequencies or nothing gets corrected), used to correct signs of regression coefficients (EMMAX reports them in terms of the major allele, not the original allele). If missing, no corrections are applied.

emmax_bin

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

verbose

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

Value

The table of genetic association statistics, as a tibble, read with read_emmax_ps() (see that for more info).

See Also

plink1_bed_to_tped() for creating TPED/TFAM files from BED/BIM/FAM files.

require_files_tped() for requiring that the TPED/TFAM files exist (used internally by emmax_lmm).

delete_files_tped() for deleting TPED/TFAM files.

emmax_kin() for estimating the kinship matrix with EMMAX.

read_emmax_ps() for parsing the output of EMMAX.

delete_files_emmax_lmm() and delete_files_log() for deleting the EMMAX output files.

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

Examples

## Not run: 
data <- emmax_lmm( name, file_kinship, name_out )

## End(Not run)


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