Newick - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Newick (.newick) Format

Newick file format

 

Description

Examples

References

Description

• 

Newick is a simple text-based format for describing a tree with edge lengths using parentheses and commas.

• 

The GraphTheory[Newick] can convert a Graph representing a tree to its Newick encoding as a string, and vice versa.

• 

The GraphTheory[ImportGraph] and GraphTheory[ExportGraph] commands can read from and write to this format.

• 

The general-purpose commands Import and Export also support this format.

Examples

Return the Newick encoding of a tree.

TGraphTheory:-Graph1,11,1,12,2,10,2,12,3,10,4,5,4,9,4,11,5,7,6,12,8,11

TGraph 1: an undirected graph with 12 vertices and 11 edge(s)

(1)

GraphTheory:-NewickT

((((7)5,9)4,8)11,(((3)10)2,6)12)1;

(2)

Export this to a file in the home directory of the current user.

Exportmytree.newick,DG,base=homedir

35

(3)

References

  

"Newick file format", Wikipedia, https://en.wikipedia.org/wiki/Newick_format.

See Also

Formats

GraphTheory