Learn R Programming

kinship2 (version 1.3.1)

pedigree.shrink: Trim a pedigree to specified bit size with priority placed on trimming uninformative subjects.

Description

Iteratively remove subjects from the pedigree. 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: 1. Subjects with unknown affected status 2. Subjects with unaffected affected status 3. Affected subjects.

Usage

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

Arguments

ped
A pedigree object with id, dadid, momid, sex, affected
avail
Vector of availability status (genotyped) 0/1 or TRUE/FALSE
affected
Vector of affected status, 0/1 or TRUE/FALSE. If not given, use the first column of the affected matrix of the pedigree object.
seed
An integer or a saved copy of .Random.seed. This allows simulations to be reproduced by using the same initial seed.
maxBits
Target bit size. Pedigree will be trimmed until bit size is

Value

  • An object of class pedigree.shrink which is a list with the following components:
  • pedObjpedigree object for the trimmed pedigree
  • idTrimmedVector of IDs of trimmed individuals
  • idListList of IDs trimmed each of three stages: unavail, noninform, affect
  • bitSizeBit size of the pedigree at each stage of trimming
  • availvector of availability for members of the trimmed pedigree
  • pedSizeOriginalThe number of individuals in the input pedigree
  • pedSizeIntermedThe number of individuals in the pedigree after removing unavailable subjects and before beginning the itertive shrinking.
  • pedSizeFinalThe number of individuals in the final pedigree
  • seedThe random seed used

Details

No further details.

See Also

findUnavailable, findAvailNonInform, plot.pedigree.shrink

Examples

Run this code
data(sample.ped)

fam1 <- sample.ped[sample.ped$ped==1,]
ped1 <- pedigree(fam1$id, fam1$father, fam1$mother, fam1$sex,
                 fam1$affected)

shrink1 <- pedigree.shrink(ped=ped1, avail=fam1$avail, maxBits=25)

print(shrink1)
## plot(ped1)
## plot(shrink1, title="Sample Pedigree 1")


fam2 <- sample.ped[sample.ped$ped==2,]
ped2 <- pedigree(fam2$id, fam2$father, fam2$mother, fam2$sex,
                 fam2$affected)

shrink2 <- pedigree.shrink(ped2, avail=fam2$avail)

## plot(ped2)
## plot(shrink2, title="Sample Pedigree 2")
print(shrink2)

Run the code above in your browser using DataLab