create_phe_table_from_fam_table: Create a single-phenotype table from pedigree ('.fam') table

View source: R/create_phe_table_from_fam_table.R

create_phe_table_from_fam_tableR Documentation

Create a single-phenotype table from pedigree (.fam) table

Description

Create a single-phenotype table from pedigree (.fam) table. The individuals' family and within-family ID's are copied. The pheno is copied as well, but renamed to P1 and divided by ten. In this way, PLINK treats the phenotype table as having quantitative traits.

Usage

create_phe_table_from_fam_table(fam_table)

Arguments

fam_table

a tibble of the genetic mapping, with as many rows as SNPs.

Each row contains:

  • fam: the family ID

  • id: the individual's ID

  • pat: ID of father

  • mat: ID of mother

  • sex: the gender

  • pheno: a phenotype

Use get_test_fam_table to get a .fam table as used in testing. Use read_plink_fam_file to read a PLINK .fam file. Use check_fam_table to test if a .fam table is valid.

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_fam_table(get_test_fam_table())

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