read_plink_ped_file: Read a PLINK '.ped' file

View source: R/read_plink_ped_file.R

read_plink_ped_fileR Documentation

Description

Read a PLINK .ped file

Usage

read_plink_ped_file(ped_filename)

Arguments

ped_filename

name of a PLINK .ped file. Use read_plink_ped_file to read a PLINK .ped file.

Value

a tibble with column names:

  • 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 columns names FID (the family ID) and IID (the within-family ID) is due to following the PLINK naming convention as for the phenotype column names for the same data, as can be read at https://www.cog-genomics.org/plink/1.9/input#pheno.

Author(s)

Richèl J.C. Bilderbeek

Examples

 if (is_plink_installed(create_plink_v1_7_options())) {
   read_plink_ped_file(
     get_plink_example_filename(
       example_filename = "test.ped",
       create_plink_v1_7_options()
     )
   )
 }
 if (is_plink_installed(create_plink_v1_9_options())) {
   read_plink_ped_file(
     get_plink_example_filename(
       example_filename = "toy.ped",
       create_plink_v1_9_options()
     )
   )
 }

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