gen.graph {GENLIB}R Documentation

Pedigree graphical tool

Description

Function that plots pedigrees of GLgen objects.

Usage

gen.graph( gen, pro=gen.pro(gen), ancestors=gen.founder(gen), 
       indVarAffected=gen.genout(gen)$ind, varAffected=gen.genout(gen)$ind, cex="1",
       col="0", symbolsize="1", width="1", packed=FALSE, align=TRUE, ...)

Arguments

gen

An object of class GLgen obtained with gen.genealogy, gen.lineages or gen.branching. Required.

pro

Vector of proband id numbers to be included. Default is 'gen.pro(gen)', which will select all individuals without children.

ancestors

Vector of ancestors id numbers to be included. Default is 'gen.founder(gen)', which will select all individuals without parents.

indVarAffected

Vector of individuals id numbers used for labeling. Default is 'gen.genout(gen)$ind', which is all the individuals of the genealogy.

varAffected

Vector of individuals labels. Default is 'gen.genout(gen)$ind', meaning that the individuals labels are their ids.

cex

Controls text size (same as kinship2::plot.pedigree). Default is 1.

col

Color for each id (same as kinship2::plot.pedigree). Default is 0, which assigns the same color to everyone.

symbolsize

Controls symbolsize (same as kinship2::plot.pedigree). Default is 1.

width

For a packed pedigree, the minimum width allowed in the realignment of pedigrees (same as kinship2::plot.pedigree). Default is 1.

packed

If TRUE, uniform distance between all individuals at a given level (same as kinship2::plot.pedigree). Default is FALSE.

align

Controls the extra effort spent trying to align children underneath parents, but without making the pedigree too wide (same as kinship2::plot.pedigree). Default is TRUE.

...

Other arguments that can be passed to the kinship2::plot.pedigree.

Value

Returns the same invisible list as that returned by kinship2::plot.pedigree, which contains the following: plist list containing the information about the pedigree (n, id, pos, fam, spouse) x x-axis position y y-axis position boxw box width boxh box height call the call made to plot.pedigree() (kinship2 package)

See Also

gen.genealogy gen.genout gen.branching

Examples

ind<-c(1,2,3,11:21,101:108,201:202)
father<-c(11,15,15,102,0,102,0,103,103,0,105,105,107,107,0,202,0,202,202,0,202,0,0,0)
mother<-c(12,14,14,101,0,101,0,104,104,0,106,106,108,108,0,201,0,201,201,0,201,0,0,0)
sex<-c(1,2,2,1,2,1,2,1,2,1,2,2,2,1,2,1,1,2,1,2,1,2,2,1)
gen.df<-data.frame(ind, father, mother, sex)  
genEx<-gen.genealogy(gen.df)
gen.graph(genEx)

data(geneaJi) 
geneaJi[1:5,]
genJi<-gen.genealogy(geneaJi)
gen.graph(genJi)

[Package GENLIB version 1.1.10 Index]