create_phe_table_from_data: Create a single-phenotype table from the PLINK data.

View source: R/create_phe_table_from_data.R

create_phe_table_from_dataR Documentation

Create a single-phenotype table from the PLINK data.

Description

Create a single-phenotype table from the PLINK data. The individuals' family and within-family ID's are copied. The case_control_code is copied as well, but renamed to trait and divided by then. In this way, PLINK treats the phenotype table as having quantitative traits.

Usage

create_phe_table_from_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

Value

a single-phenotype tibble, with columns:

  • FID the family ID

  • IID the within-family ID

  • P1 the phenotype

The column names match the PLINK names, see https://www.cog-genomics.org/plink/1.9/input#pheno

Author(s)

Richèl J.C. Bilderbeek

Examples

create_phe_table_from_data(create_test_plink_text_data())
create_phe_table_from_data(create_test_plink_bin_data())
create_phe_table_from_data(create_test_plink2_bin_data())

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