cat_dom_relat: Categorize the dominant relationship from an ancestry match...

View source: R/cat_dom_relat.R

cat_dom_relatR Documentation

Categorize the dominant relationship from an ancestry match matrix

Description

This function takes an ancestry match matrix (AMM) and it returns what the "dominant" relationship is. It doesn't try to capture all the nuances that might be present in the AMM. For example, it does not note inbreeding and other such things. However this is useful for categorizing what type of relationship is the "closest" relationship type amongst all the ways a pair is related. Currently for num_generations == 2, the function goes through in this order, to identify relationships:

  • Se: self. This is as far as it goes with num_generations = 0

  • PO: parent-offspring

  • Si: sibling. This is as far as it goes with num_generations = 1

  • GP: grandparental

  • A : avuncular (aunt-niece)

  • FC: first cousin.

Usage

cat_dom_relat(AMM)

Arguments

AMM

The ancestry match matrix to categorize

Details

And so forth. This has been implemented out to 3 generations using the relationship zones in package data object relationship_zone_names.

Value

This returns a list with two components:

  • type: a string saying what type of relationship (i.e., "Si", or "A").

  • hits: a two vector of the number of TRUEs in each "relationship zone" on the upper or the lower diagonal of the AMM.

Examples

cat_dom_relat(half_first_cousin_amm)

eriqande/CKMRpop documentation built on Jan. 25, 2024, 2:10 p.m.