assoc: Let 'PLINK'/'PLINK2' detect an association for a case/control...

View source: R/assoc.R

assocR Documentation

Let PLINK/PLINK2 detect an association for a case/control or binary trait.

Description

Let PLINK/PLINK2 detect an association for a case/control or binary trait.

Usage

assoc(
  assoc_data,
  assoc_params,
  plink_options = create_plink_options(),
  verbose = FALSE
)

Arguments

assoc_data

data to use for an association analysis for a quantitative trait (i.e. using assoc), as can be created by create_assoc_data

assoc_params

parameters to do an association analysis for a quantitative trait (i.e. using assoc), as can be created by create_assoc_params

plink_options

options to run PLINK, as created by create_plink_options

verbose

the verbosity of a function. Set to TRUE for more output. Use check_verbose to detect if this argument is valid.

Value

a list with the following columns:

  • assoc_table: a tibble with associations found by PLINK. See read_plink_assoc_file for an explanation of the column names.

  • log: the log file as text as created by PLINK

Note

This function is named after the --assoc flag, as used by PLINK

Author(s)

Richèl J.C. Bilderbeek

See Also

Use assoc_qt to do an association on quantitative traits

Examples

if (is_plink_installed()) {
  assoc(
    assoc_data = create_demo_assoc_data(),
    assoc_params = create_test_assoc_params()
  )
}

richelbilderbeek/plinkr documentation built on March 25, 2024, 3:18 p.m.