Example: Phylogenetic tree (Float64)

Profiles: OSCAR v1.0, OSCAR v1.1, OSCAR v1.2, OSCAR v1.3, OSCAR v1.4, OSCAR v1.5, OSCAR v1.6, OSCAR v1.7, OSCAR v1.8

Construct a phylogenetic tree with floating branch lengths.

Systems

Oscar.jl

Generate code (generate.jl) [ edit ]

using Oscar

obj = phylogenetic_tree(Float64, "((H:3,(C:1,B:1):2):1,G:4);")

save("data.mrdi", obj)

Data outputs

Profiles: OSCAR v1.0, OSCAR v1.1, OSCAR v1.2, OSCAR v1.3, OSCAR v1.4, OSCAR v1.5

Data file: data.mrdi

{
  "_ns": {"Oscar": ["https://github.com/oscar-system/Oscar.jl", "1.5.1"]},
  "_type": "PhylogeneticTree",
  "data": {
    "LEAVES": {"B": 5, "C": 4, "G": 6, "H": 2},
    "_ns": {"polymake": ["https://polymake.org", "4.15"]},
    "EDGE_LENGTHS": [1, 3, 2, 1, 1, 4],
    "_type": "graph::PhylogeneticTree<Float>",
    "LABELS": ["", "", "H", "", "C", "B", "G"],
    "NEWICK": "((H:3,(C:1,B:1):2):1,G:4);",
    "ADJACENCY": [[1, 6], [0, 2, 3], [1], [1, 4, 5], [3], [3], [0]]
  }
}

This serialized output is equivalent for these profiles up to UUID renaming and recorded namespace version strings.

Profiles: OSCAR v1.6, OSCAR v1.7

Data file: data.mrdi

{
  "_ns": {"Oscar": ["https://github.com/oscar-system/Oscar.jl", "1.7.0"]},
  "_type": {"name": "PhylogeneticTree", "params": {"_type": "Floats"}},
  "data": {
    "pm_tree": {
      "LEAVES": {"B": 5, "C": 4, "G": 6, "H": 2},
      "_type": "graph::PhylogeneticTree<Float>",
      "_ns": {"polymake": ["https://polymake.org", "4.15"]},
      "NEWICK": "((H:3,(C:1,B:1):2):1,G:4);",
      "N_NODES": 7,
      "LABELS": ["", "", "H", "", "C", "B", "G"],
      "ADJACENCY": [[1, 6], [0, 2, 3], [1], [1, 4, 5], [3], [3], [0]],
      "EDGE_LENGTHS": [1, 3, 2, 1, 1, 4]
    },
    "vertex_perm": ["1", "2", "3", "4", "5", "6", "7"]
  }
}

This serialized output is equivalent for these profiles up to UUID renaming and recorded namespace version strings.