check_phe_table_ok_for_qt: Check if a phenotype table is valid for use in a quantitative...

View source: R/check_phe_table_ok_for_qt.R

check_phe_table_ok_for_qtR Documentation

Check if a phenotype table is valid for use in a quantitative trait analysis

Description

Check if a phenotype table is valid for use in a quantitative trait analysis. Will stop if not

Usage

check_phe_table_ok_for_qt(phe_table)

Arguments

phe_table

a table of phenotypes.

A phe_table is a tibble with these columns:

  • FID The family ID

  • IID Within-family ID (cannot be zero)

  • One or more columns of phenotype 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_phe_file to read a phenotype file. Use check_phe_table to test if a phenotype table is valid.

Details

For a phenotype table to be valid for use in a quantitative trait analysis, in each column, at least 1 value must differ from 0, 1, and 2. This is because PLINK will assume a case-control analysis when all values in a column are 0, 1 and 2.

Value

Nothing. Will stop if the phe_table is invalid for use in a quantitative trait analysis

Author(s)

Richèl J.C. Bilderbeek

See Also

use check_phe_table to check if the phe_table is valid in general.

Use check_phe_file_ok_for_qt to check if a .phe file holds a phenotype table that is valid for use in a quantitative trait analysis

Examples

check_phe_table_ok_for_qt(get_test_phe_table())

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