readFam {pedFamilias}R Documentation

Read Familias .fam files

Description

Parses the content of a .fam file exported from Familias, and converts it into suitable ped objects. This function does not depend on the Familias R package.

Usage

readFam(
  famfile,
  useDVI = NA,
  Xchrom = FALSE,
  prefixAdded = "added_",
  fallbackModel = c("equal", "proportional"),
  simplify1 = TRUE,
  deduplicate = TRUE,
  includeParams = FALSE,
  verbose = TRUE
)

Arguments

famfile

Path to a .fam file.

useDVI

A logical, indicating if the DVI section of the .fam file should be identified and parsed. If NA (the default), the DVI section is included if it is present in the input file.

Xchrom

A logical. If TRUE, the chrom attribute of all markers will be set to "X". Default = FALSE.

prefixAdded

A string used as prefix when adding missing parents.

fallbackModel

Either "equal" or "proportional"; the mutation model to be applied (with the same overall rate) when a specified model fails for some reason. Default: "equal".

simplify1

A logical indicating if the outer list layer should be removed in the output if the file contains only a single pedigree.

deduplicate

A logical, only relevant for DVI. If TRUE (default), redundant copies of the reference pedigrees are removed.

includeParams

A logical indicating if various parameters should be read and returned in a separate list. See Value for details. Default: FALSE.

verbose

A logical. If TRUE, various information is written to the screen during the parsing process.

Value

The output of readFam() depends on the contents of the input file, and the argument includeParams. This is FALSE by default, giving the following possible outcomes:

If includeParams = TRUE, the output is a list with elements main (the main output, as described above) and params, a list with some or all of the following entries:

References

Egeland et al. (2000). Beyond traditional paternity and identification cases. Selecting the most probable pedigree. Forensic Sci Int 110(1): 47-59.

See Also

writeFam().

Examples

# Using example file "paternity.fam" included in the package
fam = system.file("extdata", "paternity.fam", package = "pedFamilias")

# Read and plot
peds = readFam(fam)
plotPedList(peds, hatched = typedMembers, marker = 1)

# Store parameters
x = readFam(fam, includeParams = TRUE)
x$params

stopifnot(identical(x$main, peds))


[Package pedFamilias version 0.2.2 Index]