Skip to content

Create textual descriptions of additive genetic relatedness matrices #29

@mhunter1

Description

@mhunter1

This is a proposal for a new function. Here's an option for its structure, but just an option.

Inputs: a data.frame, matrix, or similar
Flat/vectorized relatedness matrix with columns like ID1, ID2, sex1, sex2, gen1, gen2, addRel.
ID1 = ID of person 1
ID2 = ID of person 2
sex1 = sex of person 1 (decide/document what coding of biological sex to use)
sex2 = sex of person 1
gen1 = generation of person 1 (cf. #28 )
gen2 = generation of person 2
addRel = additive relatedness coefficient between person 1 and person 2

Output: a vector or a new data.frame with an additional column that gives a textual description of the relationship.

Examples:
addRel==.5 and gen1==gen2 -> 'siblings'
addRel==.5 and gen1==gen2-1 -> 'parent-child'
addRel==.25 and gen1==gen2-2 -> 'grandparent-grandchild'
And so on.

Aunt-niece, uncle-nephew, etc.
1st cousin, 2nd cousin (nth removed), etc

Should parent-child be different from mother-child and father-child? Maybe.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions