read_nhx {aphylo} | R Documentation |
Read New Hampshire eXtended format for trees
Description
Read New Hampshire eXtended format for trees
Usage
read_nhx(fn, txt)
Arguments
fn |
Full path to the tree file. |
txt |
If no file is specified, trees can also be passed as a character scalar (see examples). |
Value
A list with the following elements:
tree An object of class
ape
edge Edge annotations (length and other annotations)
nhx A list of annotations NHX
References
"NHX - New Hampshire eXtended [version 2.0]", https://en.wikipedia.org/wiki/Newick_format#New_Hampshire_X_format
See Also
Other reading:
panther-tree
,
read_pli()
Examples
# Example directly extracted from
# https://sites.google.com/site/cmzmasek/home/software/forester/nhx
read_nhx(
txt = "(((ADH2:0.1[&&NHX:S=human], ADH1:0.11[&&NHX:S=human]):0.05[&&NHX:S=primates:D=Y:B=100],
ADHY:0.1[&&NHX:S=nematode],ADHX:0.12[&&NHX:S=insect]):0.1[&&NHX:S=metazoa:D=N],
(ADH4:0.09[&&NHX:S=yeast],ADH3:0.13[&&NHX:S=yeast], ADH2:0.12[&&NHX:S=yeast],
ADH1:0.11[&&NHX:S=yeast]):0.1 [&&NHX:S=Fungi])[&&NHX:D=N];"
)
[Package aphylo version 0.3-3 Index]