read nhx tree file

read.nhx(file)

Arguments

file

nhx file

Value

nhx object

Author

Guangchuang Yu https://guangchuangyu.github.io

Examples

nhxfile <- system.file("extdata/NHX", "ADH.nhx", package="treeio")
read.nhx(nhxfile)
#> 'treedata' S4 object that stored information of
#> 	'/usr/local/lib/R/site-library/treeio/extdata/NHX/ADH.nhx'.
#> 
#> [email protected] phylo:
#> 
#> Phylogenetic tree with 8 tips and 4 internal nodes.
#> 
#> Tip labels:
#>   ADH2, ADH1, ADHY, ADHX, ADH4, ADH3, ...
#> 
#> Rooted; includes branch lengths.
#> 
#> with the following features available:
#> 	'B',	'D',	'S'.
#> 
#> # The associated data tibble abstraction: 12 × 6
#> # The 'node', 'label' and 'isTip' are from the phylo tree.
#>     node label isTip     B D     S       
#>    <int> <chr> <lgl> <dbl> <chr> <chr>   
#>  1     1 ADH2  TRUE     NA NA    human   
#>  2     2 ADH1  TRUE     NA NA    human   
#>  3     3 ADHY  TRUE     NA NA    nematode
#>  4     4 ADHX  TRUE     NA NA    insect  
#>  5     5 ADH4  TRUE     NA NA    yeast   
#>  6     6 ADH3  TRUE     NA NA    yeast   
#>  7     7 ADH2  TRUE     NA NA    yeast   
#>  8     8 ADH1  TRUE     NA NA    yeast   
#>  9     9 NA    FALSE    NA N     NA      
#> 10    10 NA    FALSE    NA N     metazoa 
#> 11    11 NA    FALSE   100 Y     primates
#> 12    12 NA    FALSE    NA NA    Fungi