Analyze kinship within samples
Value
A data.frame with the following columns:
from
,to
: sample IDs in integer.path
: text representation of the path found between samples; ascending with1
and descending with0
; the count of the same paths is indicated by_n
suffix; e.g., "10_1" and "10_2" means half-sibling and full-sibling pairs, respectively.degree
: the number of steps in the path.label
: aliases for the path. See https://github.com/heavywatal/tekkamaki/blob/main/data-raw/kinlabels.R for the available labels.
Examples
set.seed(666)
result = tekka("-y25 -l2 --sa 2,2 --sj 2,2")
samples = result$sample_family[[1L]]
find_kinship(samples, order = 3L)
#> # A tibble: 17 × 5
#> from to path degree label
#> <int> <int> <chr> <int> <fct>
#> 1 2 13 10_1 2 HS
#> 2 2 14 10_1 2 HS
#> 3 2 15 1_1 1 PO
#> 4 3 5 100_1 3 HUN
#> 5 4 7 10_1 2 HS
#> 6 9 10 10_1 2 HS
#> 7 9 11 1_1 1 PO
#> 8 9 14 100_1 3 HUN
#> 9 11 14 00_1 2 GG
#> 10 12 5 00_1 2 GG
#> 11 12 6 00_1 2 GG
#> 12 12 9 100_1 3 HUN
#> 13 12 11 10_1 2 HS
#> 14 13 14 10_1 2 HS
#> 15 13 16 110_1 3 HUN
#> 16 15 13 0_1 1 PO
#> 17 15 14 0_1 1 PO