kgori / treeCl

Clustering phylogenetic trees with python
MIT License
25 stars 12 forks source link

Running TreeCl with pre-computed trees #8

Closed mossmatters closed 6 years ago

mossmatters commented 8 years ago

I would like to use TreeCl to cluster gene trees that I have computed separately. From the example, it appears that the only type of data that treecl.Collection can accept are alignments.

Alternatively, trees computed in the example are loaded from the cache, stored in .json format. Is there something within the package that could read in a .tre format and translate it to the .json format? If not, what are the requirements for the .json file if I were to write my own parser?

alexweisberg commented 7 years ago

I would also love to see this feature added if it is not already (documentation?). I have many trees that I have calculated using RAxML already and it is very time consuming. Avoiding re-doing that would be nice.

alexweisberg commented 7 years ago

After looking into the code it looks like reading in trees are supported using the trees_dir argument of the collections function. The trees have to be named the same as your input alignments and use the suffix ".nwk". So dataset1.fas would need a tree file called dataset1.nwk (it parses up to the ".", so don't use those in filenames).

Using this flag works on my dataset.