Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create textual descriptions of additive genetic relatedness matrices #29

Open
mhunter1 opened this issue May 11, 2024 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@mhunter1
Copy link
Collaborator

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.

@mhunter1 mhunter1 added the enhancement New feature or request label May 11, 2024
@mhunter1 mhunter1 self-assigned this May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant