amnh / PCG

𝙋𝙝𝙮𝙡𝙤𝙜𝙚𝙣𝙚𝙩𝙞𝙘 𝘾𝙤𝙢𝙥𝙤𝙣𝙚𝙣𝙩 𝙂𝙧𝙖𝙥𝙝 ⸺ Haskell program and libraries for general phylogenetic graph search
28 stars 1 forks source link

Standardize newick string serialization #134

Open recursion-ninja opened 5 years ago

recursion-ninja commented 5 years ago

There is currently a Newick serialization type-class in pcg-serialize.

We should require that newick serialization place the larger subtree on the right. Additionally, if two subtrees are of equal size, the "lesser" tree should be placed on the left according to the lexicographic ordering of it's leaf labels.

This the convention in phylogenetics. The added benefit is that serialized Newick trees will have a canonical representation, allowing for equality checking of Newick strings.

Some though can be given to expanding this serialization standarization to eNeiwck strings.