Read phyloXML files
read_phyloxml(x) # S3 method for character read_phyloxml(x) # S3 method for default read_phyloxml(x)
x | Character scalar. Path to a phyloXML file. |
---|
A list of class phyloxml
in which each element represents a
tree:
A data.frame
with the following elements:
Integer, the id of the node.
Character, the name of the node (can be NA
).
Numeric, the length of the branch (can be NA
).
Logical, whether it is leaf (tip) or not.
Integer, the id of the parent node.
phyloxml
objects can be coerced as ape::multiphylo using the
phyloxml2phylo function.
#> $`A phylogenetic tree` #> $`A phylogenetic tree`$.Data #> id name branch_length isleaf parent confidence width taxonomy sequence #> 11 11 <NA> NA FALSE NA NA NA NA NA #> 12 12 <NA> 0.71761851 FALSE 11 NA NA NA NA #> 1 1 t10 0.99190609 TRUE 12 NA NA NA NA #> 13 13 <NA> 0.38003518 FALSE 12 NA NA NA NA #> 2 2 t6 0.77744522 TRUE 13 NA NA NA NA #> 3 3 t9 0.93470523 TRUE 13 NA NA NA NA #> 14 14 <NA> 0.21214252 FALSE 11 NA NA NA NA #> 15 15 <NA> 0.65167377 FALSE 14 NA NA NA NA #> 16 16 <NA> 0.12555510 FALSE 15 NA NA NA NA #> 4 4 t1 0.26722067 TRUE 16 NA NA NA NA #> 17 17 <NA> 0.38611409 FALSE 16 NA NA NA NA #> 5 5 t2 0.01339033 TRUE 17 NA NA NA NA #> 6 6 t7 0.38238796 TRUE 17 NA NA NA NA #> 7 7 t3 0.86969085 TRUE 15 NA NA NA NA #> 18 18 <NA> 0.34034900 FALSE 14 NA NA NA NA #> 19 19 <NA> 0.48208012 FALSE 18 NA NA NA NA #> 8 8 t8 0.59956583 TRUE 19 NA NA NA NA #> 9 9 t4 0.49354131 TRUE 19 NA NA NA NA #> 10 10 t5 0.18621760 TRUE 18 NA NA NA NA #> events #> 11 NA #> 12 NA #> 1 NA #> 13 NA #> 2 NA #> 3 NA #> 14 NA #> 15 NA #> 16 NA #> 4 NA #> 17 NA #> 5 NA #> 6 NA #> 7 NA #> 18 NA #> 19 NA #> 8 NA #> 9 NA #> 10 NA #> #> $`A phylogenetic tree`$rooted #> [1] "true" #> #> #> attr(,"class") #> [1] "phyloxml"