create_demo_phe_table_rhs: Internal function

View source: R/create_demo_phenotype_table_rhs.R

create_demo_phe_table_rhsR Documentation

Internal function

Description

Internal function to create the right-hand side of a phenotype table

Usage

create_demo_phe_table_rhs(
  traits = create_demo_traits(),
  ped_table = create_demo_ped_table(traits = traits)
)

Arguments

traits

one or more traits with a clear genetic architecture and a known minor allele frequency, as, for example, created by create_demo_traits.

ped_table

a 'pedigree' table.

A ped_table is a tibble with these columns:

  • FID The family ID

  • IID Within-family ID (cannot be zero)

  • within_family_id_father Within-family ID of father (0 if father isn't in dataset)

  • within_family_id_mother Within-family ID of mother (0 if mother isn't in dataset)

  • sex_code Sex code (1 = male, 2 = female, 0 = unknown)

  • case_control_code Case control code (1 = control, 2 = case, 9/0/non-numeric = missing data if case/control)

  • snv_[x][y] Nucleotide for the xth variant for haplotype y (y is either a or b) in the .map file (0 = no call)

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

Use read_plink_ped_file to read a PLINK .ped file. Use check_ped_table to test if a pedigree table is valid.

Author(s)

Richèl J.C. Bilderbeek

Examples

create_demo_phe_table_rhs()
create_demo_phe_table_rhs(create_random_trait())
create_demo_phe_table_rhs(create_additive_trait())
create_demo_phe_table_rhs(create_epistatic_trait())

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