is_ped_table: Determine if a '.ped' table is valid.

View source: R/is_ped_table.R

is_ped_tableR Documentation

Determine if a .ped table is valid.

Description

Determine if a .ped table is valid.

Usage

is_ped_table(ped_table, verbose = FALSE)

Arguments

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.

verbose

the verbosity of a function. Set to TRUE for more output. Use check_verbose to detect if this argument is valid.

Value

TRUE if the table is a valid .ped table

Author(s)

Richèl J.C. Bilderbeek

See Also

use check_ped_table to check if a table is a valid .ped table (i.e. stop if it is not)

Examples

is_ped_table(get_test_ped_table())
is_ped_table(read_plink_ped_file(get_plinkr_filename("toy_v1_9.ped")))

is_ped_table("nonsense")

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