read_bolt_lmm: Read BOLT-LMM statistics table

View source: R/read_bolt_lmm.R

read_bolt_lmmR Documentation

Read BOLT-LMM statistics table

Description

Parses the output generated by BOLT-LMM with option --lmm (genetic assocation test) and specified with the option ⁠--statsFile <file>⁠. Returned table has column names standardized for convenience. Validated with BOLT-LMM version 2.3.5.

Usage

read_bolt_lmm(file, ext = "bolt.txt", verbose = TRUE)

Arguments

file

The file path to read, possibly missing the extension.

ext

The expected file extension. Set to NA to prevent adding any extension to file. BOLT-LMM does not create an output with a standard extension, so I chose the default extension to match what is generated by bolt_lmm().

verbose

If TRUE (default) function reports the path of the file being loaded (after autocompleting the extensions).

Value

The table as a tibble. Original names (as they appear in the header line of the file) are modified by lowercasing all, followed by these specific mappings to ensure that columns shared by BIM table have the same names as those returned by genio::read_bim(), the association p-value is "p", and the regression coefficient is "beta" ("orig" -> "new"):

  • "snp" -> "id"

  • "bp" -> "pos"

  • "genpos" -> "posg"

  • "allele1" -> "alt"

  • "allele0" -> "ref"

  • "p_bolt_lmm_inf" -> "p_inf"

  • "p_bolt_lmm" -> "p"

See Also

bolt_lmm() wrapper for executing BOLT-LMM and reading the results.

Examples

## Not run: 
data <- read_bolt_lmm( file )

## End(Not run)


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