gcta_reml: Run GCTA REML and return the estimated heritability.

View source: R/gcta_reml.R

gcta_remlR Documentation

Run GCTA REML and return the estimated heritability.

Description

A wrapper for running GCTA variance component estimation followed by reading of the results by read_gcta_hsq().

Usage

gcta_reml(
  name,
  name_grm = name,
  name_phen = name,
  name_out = name,
  gcta_bin = "gcta64",
  threads = 0,
  m_pheno = 1,
  verbose = TRUE
)

Arguments

name

The shared default name of the input and output files without extensions.

name_grm

The shared name of the input binary GRM files without extensions (default same as input name).

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 variance component file (default same as input name), which gets extension ".hsq" added automatically.

gcta_bin

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

m_pheno

The index of the phenotype to analyze. Defaults to the first phenotype in the given phenotype table.

verbose

If TRUE (default), prints the command line before it is executed, followed by the the path of the output file being read (after autocompleting the extensions).

Value

A list containing the estimated heritability, its standard error, and the full table of estimated variance components, as a tibble, read with read_gcta_hsq() (see that for more info).

See Also

gcta_grm() for estimating the kinship (GRM) matrix with GCTA.

read_gcta_hsq() for parsing the output of GCTA MLMA.

delete_files_gcta_hsq() and delete_files_log() for deleting the GCTA output files.

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

Examples

## Not run: 
obj <- gcta_reml( name, name_out )
obj$herit

## End(Not run)


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