signaturescience / skater

SKATE R Utilities
https://signaturescience.github.io/skater/
Other
9 stars 4 forks source link

Ped2kinpairs interesting situation #36

Closed genignored closed 3 years ago

genignored commented 3 years ago

There are 2 separate issues that I need help addressing: 1) When I run ped2kinpairs, I get Subjects must have both a father and mother, or have neither which appears to be directly from kinship2::pedigree(). The only solution I can find is to code any dadid/momid<-0/NA if the other is 0, but I am almost certain we are going to lose resolution from this.

2) fids and ped2kinpairs: The function ped2kinpairs generates tibbles of kinpairs by fid. This means that in a large sample pool (say 599 individuals) with multiple families, instead of all comparisons which are being calculated by kinship tools (\~179,000), it only returns individual tibbles per fid (\~ 9000 comparisons). I am not certain, but I believe there are cases where the families have shared ancestors in the tree, but identify as separate. The short term solution is to recode all fid <- "1" or similar, but that doesn't seem ideal either.

I am not sure there is a code based solution to either of these, but I wanted to put them both up here.

stephenturner commented 3 years ago

@genignored help me help you: https://reprex.tidyverse.org/

stephenturner commented 3 years ago

@genignored please reopen with an example if this is still causing you issues!