tskit-dev / tsconvert

Utilities for converting tree sequences to and from other formats
MIT License
7 stars 6 forks source link

From sequence of newick trees? #35

Open swamidass opened 2 years ago

swamidass commented 2 years ago

Is there a way to create a TreeSequence object from a sequence of newick trees, each one corresponding to a SNP genome coordinate?

jeromekelleher commented 2 years ago

This is what the from_ms function does @swamidass, but the assumptions it makes won't hold for an arbitrary sequence of input trees. In particular, we assume that nodes in the newick trees with exactly the same time are the same tree sequence nodes.

It may work if the input trees are time-resolved and have high-precision branch lenghts.