Learn R Programming

forrel (version 1.6.0)

readFam: Read Familias .fam files

Description

This function parses the content of a Familias-formatted ".fam" file, 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"),
  verbose = TRUE
)

Value

If the .fam file only contains a database, the output is a list of information (name, alleles, frequencies) about each locus. This list can be used as locusAttributes in e.g. setMarkers().

If the .fam file describes pedigree data, the output is a ped object or a list of such.

If useDVI = TRUE, then the families described under Reference Families

are parsed and converted to ped objects. Each family generally describes multiple pedigrees, so the output gets another layer in this case.

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".

verbose

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