gemma_kin: Estimate kinship with GEMMA

View source: R/gemma_kin.R

gemma_kinR Documentation

Estimate kinship with GEMMA

Description

Uses gemma with -gk and default option to estimate the kinship matrix. The output file will be named name_out.cXX.txt using the output name below.

Usage

gemma_kin(
  name,
  name_out = name,
  gemma_bin = "gemma",
  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 kinship file (default same as input name), which gets extension ".cXX.txt" added automatically.

gemma_bin

The path to the binary executable. Default assumes gemma 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

Nothing (the kinship matrix is not read in; see example below for reading with a different function).

See Also

genio::read_matrix() for reading plain-text matrices.

gemma_lmm() for running GWAS with GEMMA.

delete_files_logtxt() for deleting the GEMMA log file.

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

Examples

## Not run: 
# create kinship matrix estimate (on file)
gemma_kin( name )

# read file with genio
kinship <- genio::read_matrix( name, ext = 'cXX.txt' )

## End(Not run)


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