Convert 'Familias' output to linkdat objects
Familias is a widely used program for computations in forensic genetics. The
function documented here facilitates the use of paramlink for
specialized computations which are not implemented in Familias, e.g.
conditional simulations.
Familias2linkdat(familiasped, datamatrix, loci) readFamiliasLoci(loci) connectedComponents(ID, FID, MID)
familiasped |
A |
datamatrix |
A data frame with two columns per marker (one for each allele) and one row per individual. |
loci |
A |
ID |
An integer vector: Individual ID. |
FID |
An integer vector: ID of father. |
MID |
An integer vector: ID of mother. |
The Familias program represents pedigrees and marker data in a way that
differs from paramlink in several ways, mostly because of
paramlink's stricter definition of a 'pedigree'. In paramlink,
a pedigree must be connected, have numerical IDs, and each member must have
either 0 or 2 parents present in the pedigree. None of this is required by
FamiliasPedigree objects. The conversion function
Familias2linkdat takes care of all of these potential differences: It
converts each FamiliasPedigree into a list of connected linkdat objects,
additional parents are added where needed, and non-numerical ID labels are
stored in the plot.labels slot of the linkdat object(s).
A linkdat object, or a list of such.
Magnus Dehli Vigeland, Thore Egeland
Windows Familias is freely availabe from http://familias.name.
See Familias and linkdat.
# Example
## Not run:
library(Familias)
data(NorwegianFrequencies)
locus1 = FamiliasLocus(NorwegianFrequencies$TH01)
persons = c('mother', 'daughter', 'AF')
ped1 = FamiliasPedigree(id=persons, dadid=c(NA, 'AF', NA), momid=c(NA, 'mother', NA),
sex=c('female', 'female', 'male'))
datamatrix = data.frame(THO1.1=c(NA, 8, NA), THO1.2=c(NA,9.3, NA))
rownames(datamatrix) = persons
x = Familias2linkdat(ped1, datamatrix, locus1)
plotPedList(list(x), new=TRUE, frametitles=c('H1'), available='shaded', marker = 1)
# Example
library(fam2r)
data(F21)
pedigrees = F21$pedigrees
datamatrix = F21$datamatrix
loci = F21$loci
x = Familias2linkdat(pedigrees, datamatrix, loci)
plotPedList(x, new=TRUE, frametitles=c('H1', 'H2'), available='shaded')
# Give dev.width explicitly to allow for long names
plotPedList(x, new=TRUE, frametitles=c('H1', 'H2'), available='shaded',
dev.width=17)
# Numerical labels work better
plotPedList(x, new=TRUE, id.labels='num', frametitles=c('H1', 'H2'),
available='shaded')
## End(Not run)Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.