assign.status: Take a disease status and a genetic variant and determine...

View source: R/encoding.R

assign.statusR Documentation

Take a disease status and a genetic variant and determine which category the combo falls in. A.c = Affected individual with ALT variant A.i = Affected individual without ALT variant U.c = Unaffected individual without ALT variant U.i = Unaffected individual with ALT variant If theoretical.max = TRUE the true variant statuses are ignored and all affected/unaffected are assigned A.c and U.c respectively. These encoding can then be used show what a family's max score would be.

Description

Take a disease status and a genetic variant and determine which category the combo falls in. A.c = Affected individual with ALT variant A.i = Affected individual without ALT variant U.c = Unaffected individual without ALT variant U.i = Unaffected individual with ALT variant If theoretical.max = TRUE the true variant statuses are ignored and all affected/unaffected are assigned A.c and U.c respectively. These encoding can then be used show what a family's max score would be.

Usage

assign.status(status, variant, theoretical.max = FALSE)

Arguments

status

Disease status of an individual. A = affected, U = unaffected.

variant

Variant for individual. genotypes, phased genotypes, or binary encodings accepted.

theoretical.max

Should the theoretical maxima be returned instead of the observed values? When true, the scoring assumes correct variant-status pair for each individual. Default is FALSE.

Value

a string

Examples

assign.status("A", "0/1") == "A.c"
assign.status("A", "0|0") == "A.i"
assign.status("U", 1) == "U.i"
assign.status("U", "0|0") == "U.c"

KinformR documentation built on Feb. 17, 2026, 5:07 p.m.