Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

connectedComponents

Connected pedigree components


Description

Compute the connected parts of a pedigree. This is an important step when converting pedigree data from other formats (where disconnected pedigrees may be allowed) to pedtools (which requires pedigrees to be connected).

Usage

connectedComponents(id, fid = NULL, mid = NULL, fidx = NULL, midx = NULL)

Arguments

id

A vector of ID labels (character or numeric).

fid

The ID labels of the fathers (or "0" if missing).

mid

The ID labels of the mothers (or "0" if missing).

fidx, midx

(For internal use mostly.) Integer vectors with paternal (resp. maternal) indices. These may be given instead of id, fid, mid.

Value

A list, where each element is a subset of id constituting a connected pedigree.

Examples

# A trio (1-3) and a singleton (4)
x = data.frame(id = 1:4, fid = c(2,0,0,0), mid = c(3,0,0,0))
connectedComponents(x$id, x$fid, x$mid)

pedtools

Creating and Working with Pedigrees and Marker Data

v0.9.7
GPL-3
Authors
Magnus Dehli Vigeland [aut, cre] (<https://orcid.org/0000-0002-9134-4962>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.