CF matrix is conflict-free matrix, tree data is a data table contains `from`, `to` and `label` columns at least.

cf2treedata(CFmatrix_file)

Arguments

CFmatrix_file

a file path to CFMatrix file.

Value

a dataframe

Examples

CFmatrix_file = system.file("extdata", "ground_truth_tree.CFMatrix", package = "converTree")
cf2treedata(CFmatrix_file)
#> Tree data bone seems ok
#>    parent node                                               label
#> 1      23   23                                                <NA>
#> 2      23   24                                             M16|M17
#> 3      23   45 M29|M30|M31|M32|M33|M34|M35|M36|M37|M38|M39|M40|M41
#> 4      23   46                                               M4|M5
#> 5      23   27                                            M1|M2|M3
#> 6      26    1                                                 sc1
#> 7      29    3                                              sc10_1
#> 8      30    5                                                sc11
#> 9      33    6                                                sc12
#> 10     34    7                                                sc13
#> 11     36    8                                                sc14
#> 12     37    9                                                sc15
#> 13     40   10                                              sc16_1
#> 14     39   12                                                sc17
#> 15     41   13                                                sc18
#> 16     42   14                                                sc19
#> 17     43   16                                                 sc3
#> 18     44   17                                                 sc4
#> 19     45   18                                                 sc5
#> 20     48   19                                                 sc6
#> 21     49   20                                                 sc7
#> 22     50   21                                                 sc8
#> 23     51   22                                                 sc9
#> 24     24   25                                                 M18
#> 25     25   26                                 M19|M20|M21|M22|M23
#> 26     27   28                                                 M73
#> 27     28   29                             M74|M75|M76|M77|M78|M79
#> 28     28   30                                         M80|M81|M82
#> 29     27   31                                                 M42
#> 30     31   32                                         M43|M44|M45
#> 31     32   33                                                 M46
#> 32     32   34                                         M47|M48|M49
#> 33     31   35                                             M50|M51
#> 34     35   36                                                 M52
#> 35     35   37                                                 M53
#> 36     35   38                                         M54|M55|M56
#> 37     38   39                                                 M57
#> 38     39   40                             M58|M59|M60|M61|M62|M63
#> 39     38   41                                 M64|M65|M66|M67|M68
#> 40     41   42                                     M69|M70|M71|M72
#> 41     25   43                                         M24|M25|M26
#> 42     24   44                                             M27|M28
#> 43     46   47                                                  M6
#> 44     47   48                                               M7|M8
#> 45     48   49                                                  M9
#> 46     47   50                                 M10|M11|M12|M13|M14
#> 47     46   51                                                 M15
#> 48     26    2                                                 sc2
#> 49     29    4                                              sc10_2
#> 50     40   11                                              sc16_2
#> 51     42   15                                                sc20