pedigree.shrink {kinship2} | R Documentation |
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.
pedigree.shrink(ped, avail, affected=NULL, seed=NULL, maxBits=16)
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 <= maxBits. |
No further details.
An object of class pedigree.shrink which is a list with the following components:
pedObj |
pedigree object for the trimmed pedigree |
idTrimmed |
Vector of IDs of trimmed individuals |
idList |
List of IDs trimmed each of three stages: unavail, noninform, affect |
bitSize |
Bit size of the pedigree at each stage of trimming |
avail |
vector of availability for members of the trimmed pedigree |
pedSizeOriginal |
The number of individuals in the input pedigree |
pedSizeIntermed |
The number of individuals in the pedigree after removing unavailable subjects and before beginning the itertive shrinking. |
pedSizeFinal |
The number of individuals in the final pedigree |
seed |
The random seed used |
findUnavailable
,
findAvailNonInform
,
plot.pedigree.shrink
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)