assoc_qt_on_plink_text_data: Let PLINK detect an association with one or more quantitative...

View source: R/assoc_qt_on_plink_text_data.R

assoc_qt_on_plink_text_dataR Documentation

Description

Let PLINK detect an association with one or more quantitative traits. with data in PLINK text format.

Usage

assoc_qt_on_plink_text_data(
  assoc_qt_data,
  assoc_qt_params,
  plink_options = create_plink_options(),
  verbose = FALSE
)

Arguments

assoc_qt_data

data use to used by assoc_qt (as created by create_assoc_qt_data), which equals 'regular' data (see check_data) and a phenotype table/file

assoc_qt_params

parameters to do an association analysis for a quantitative trait (i.e. using assoc_qt), as can be created by create_assoc_qt_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 tibble with the detected associations. The table with have as much rows as the number of SNPs multiplied by the number of traits.

If the assoc_qt_params used PLINK1 text or PLINK1 binary data, the tibble has the following columns:

  • trait_name: name of the quantitive trait, taken from the phenotype table column name

  • CHR: Chromosome number

  • SNP: SNP identifier

  • BP: Physical position (base-pair)

  • NMISS: Number of non-missing genotypes

  • BETA: Regression coefficient

  • SE: Standard error

  • R2: Regression r-squared

  • T: Wald test (based on t-distribution)

  • P: Wald test asymptotic p-value

Note that parameters in uppercase are named as such by PLINK.

Note

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

Author(s)

Richèl J.C. Bilderbeek

Examples

if (is_plink_installed()) {
  assoc_qt(
    assoc_qt_data = create_demo_assoc_qt_data(),
    assoc_qt_params = create_test_assoc_qt_params()
  )
}

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