Skip to contents

Connections among samples and their ancestors are recorded in sample_family data.frames. as_igraph() converts them to igraphlite objects.

Usage

# S3 method for class 'sample_family'
as_igraph(x, ...)

Arguments

x

A sample_family data.frame in the output of tekka().

...

Additional arguments passed to igraphlite::graph_from_data_frame().

Examples

set.seed(666)
result = tekka("-y25 -l2 --sa 2,2 --sj 2,2")
samples = result$sample_family[[1L]]
as_igraph(samples)
#> $V  tibble [112 × 1] (S3: tbl_df/tbl/data.frame)
#>  $ name: int [1:112] 0 22 21 23 20 25 26 24 19 29 ...
#> # A tibble: 222 × 2
#>     from    to
#>    <int> <int>
#>  1     0    22
#>  2     0    22
#>  3    22    21
#>  4    22    21
#>  5    22    23
#>  6    22    23
#>  7    21    20
#>  8    23    20
#>  9    22    25
#> 10    22    25
#> # ℹ 212 more rows