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("-y20 -l2 --sa 2,2 --sj 2,2")
samples = result$sample_family[[1L]]
as_igraph(samples)
#> $V  tibble [78 × 1] (S3: tbl_df/tbl/data.frame)
#>  $ name: int [1:78] 0 20 19 21 18 23 22 17 26 27 ...
#> # A tibble: 154 × 2
#>     from    to
#>    <int> <int>
#>  1     0    20
#>  2     0    20
#>  3    20    19
#>  4    20    19
#>  5    20    21
#>  6    20    21
#>  7    19    18
#>  8    21    18
#>  9    20    23
#> 10    20    23
#> # ℹ 144 more rows