Skip to content

parseNewick

function parseNewick(text): Tree;

Defined in: packages/components/src/components/PhyloTree/utils/newick.ts:10

Parses a Newick string into a Tree. Internal-node labels (typically bootstrap support) become the node’s name; :length suffixes become length (0 when absent). Quoted labels ('a b', with '' as an escaped quote) are unquoted, so names containing Newick’s special characters — spaces, pipes and commas in FASTA headers — round-trip through toNewick.

Parameter Type
text string

Tree