Familias2ped | R Documentation |
Familias
objects to ped
formatFamilias
is a widely used software for forensic kinship computations, which
also features an accompanying R package (also called Familias
). The
function documented here converts pedigrees and marker data from the R
version of Familias
to pedtools::ped()
format, used by forrel
. This may
be of interest for specialized computations not implemented in Familias
,
e.g. conditional simulations. Note: For importing ".fam" files created by
(the stand-alone) Familias
, see readFam()
.
Familias2ped(familiasped, datamatrix, loci, matchLoci = FALSE) readFamiliasLoci(loci)
familiasped |
A |
datamatrix |
A data frame with two columns per marker (one for each allele) and one row per individual. |
loci |
A |
matchLoci |
A logical. If TRUE, the column names of |
The Familias
program represents pedigrees and marker data in a way that
differs from the ped
format in several ways, mostly because of the latter's
stricter definition of a pedigree. A ped
object always represent a
connected pedigree, and each member must have either 0 or 2 parents. None of
this is required by FamiliasPedigree
objects. The conversion function
Familias2ped
takes care of all potential differences: It converts each
Familias
pedigree into a list of connected ped
objects, adding missing
parents where needed.
A ped
object, or a list of such.
Magnus Dehli Vigeland, Thore Egeland
Familias is freely available from https://familias.name.
readFam()
famPed = structure( list(id = c('mother', 'daughter', 'AF'), findex = c(0, 3, 0), mindex = c(0, 1, 0), sex = c('female', 'female', 'male')), class = "FamiliasPedigree") datamatrix = data.frame( M1.1 = c(NA, 8, NA), M1.2 = c(NA, 9.3, NA), row.names = famPed$id) famLoc = structure( list(locusname = "M1", alleles = c("8" = 0.2, "9" = 0.5, "9.3" = 0.3)), class = "FamiliasLocus") Familias2ped(famPed, datamatrix, loci = famLoc, matchLoci = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.