create_test_assoc_qt_covar_data: Create a dataset for the assoc_qt function to be used in...

View source: R/create_test_assoc_qt_covar_data.R

create_test_assoc_qt_covar_dataR Documentation

Create a dataset for the assoc_qt function to be used in testing.

Description

Create a dataset (as created by create_assoc_qt_params) to detect associations with quantitative traits (using assoc_qt) used for testing.

Usage

create_test_assoc_qt_covar_data(
  data = create_test_plink_text_data(),
  phenotype_data = plinkr::create_phenotype_data_table_from_data(data = data),
  cov_table = plinkr::create_cov_table_from_data(data = data)
)

Arguments

data

the data source, which can be:

  • PLINK text data, as created by create_plink_text_data.

  • PLINK binary data, as created by create_plink_bin_data.

  • PLINK2 binary data, as created by create_plink2_bin_data.

  • PLINK text filenames, as created by create_plink_text_filenames.

  • PLINK binary filenames, as created by create_plink_bin_filenames.

  • PLINK2 binary filenames, as created by create_plink2_bin_filenames.

  • data to be used by assoc, as created by create_assoc_data

  • data to be used by assoc_qt, as created by create_assoc_qt_data

phenotype_data

phenotype data in the form of either a filename to a phenotype file (phenotype_data_filename) or a list with a phenotype table (phenotype_data_table)

cov_table

a table of covariates.

A cov_table is a tibble with these columns:

  • FID The family ID

  • IID Within-family ID (cannot be zero)

  • One or more columns of covariate values, columns can have any name

These names match the PLINK column names (https://www.cog-genomics.org/plink/1.9/input#pheno). Use read_plink_cov_file to read a covariates file. Use check_cov_table to test if a covariates table is valid.

Note

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

Author(s)

Richèl J.C. Bilderbeek


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