pedigree.shrink: Shrink pedigree object

View source: R/pedigree.shrink.R

pedigree.shrinkR Documentation

Shrink pedigree object

Description

Shrink pedigree object to specified bit size with priority placed on trimming uninformative subjects. The algorithm is useful for getting a pedigree condensed to a minimally informative size for algorithms or testing that are limited by size of the pedigree.

Usage

pedigree.shrink(ped, avail, affected = NULL, maxBits = 16)

## S3 method for class 'pedigree.shrink'
print(x, ...)

Arguments

ped

Pedigree object created by the pedigree function,

avail

vector of binary availability status (0/1), i.e. having data, or sample available

affected

vector of binary affected status (0/1/NA). If NULL, uses first column of the pedigree object affected matrix.

maxBits

Optional, the bit size for which to shrink the pedigree

x

pedigree.shrink object used in method functions

...

optional arguments passed to internal functions

Details

Iteratively remove subjects from the pedigree. The random removal of members was previously controlled by a seed argument, but we remove this, forcing users to control randomness outside the function. First remove uninformative subjects, i.e., unavailable (not genotyped) with no available descendants. Next, available terminal subjects with unknown phenotype if both parents available. Last, iteratively shrinks pedigrees by preferentially removing individuals (chosen at random if there are multiple of the same status): 1. Subjects with unknown affected status, 2. Subjects with unaffected affected status 3. Affected subjects.

Author(s)

Original by Dan Schaid, updated to kinship2 by Jason Sinnwell

See Also

pedigree, plot.pedigree.shrink

Examples

data(sample.ped)
pedAll <- pedigree(sample.ped$id, sample.ped$father, sample.ped$mother,
  sample.ped$sex, affected=cbind(sample.ped$affected, sample.ped$avail),
  famid=sample.ped$ped)
ped1 <- pedAll['1']
pedigree.shrink(ped1, maxBits=12, avail=ped1$affected[,2])


kinship2 documentation built on Oct. 5, 2022, 5:05 p.m.