Skip to content

Algebraic trees #242

@dschrempf

Description

@dschrempf

Hi,

I am a molecular phylogeneticist, and as such I work a lot with tree-like objects (mostly binary trees). I was following the development of alga for some time now and I am keen on using it in my projects. However, I have some conceptional questions. Maybe one of you can answer them.

Basically, I am interested in the following two data types:

  1. A rooted tree with labeled branches.

Degree one vertices are leaves; degree two vertices are nodes that divide a branch into two sub-branches; other vertices with degree greater than two are, for example, speciations. The root vertex is special in that no branch is pointing towards it.

At the moment, I use the Tree data type from Data.Tree, and since I can associate each node with the attached branch pointing towards it, I can add the edge label data type to the node label data type. This works quite well. A direct solution with branch labels would be advantageous though.

Can I use Alga for this purpose (without the need to first produce a Data.Tree.Tree and then use using the function tree).

Also, is there a possibility to extend the rooted, tree-like object to a phylogenetic network (a directed, acyclic graph)?

  1. An unrooted tree with labeled branches.

In contrast to rooted trees, unrooted trees do not have a root vertex. They have undirected edges with labels. They are very important for reversible phylogenetic methods that are insensitive to the direction of time, so to speak. At the moment, I do not know any way of representing such as object in an algebraic way. I tried to define a Graph-like data type of such an object but failed. Do you know if and how I could use alga to work with unrooted trees?

Finally, I wrote a short blog entry about your library. I want to expand it and explain how to use your library with (phylogenetic) trees. If you want, you can have a short look and tell me if there are any errors.

Thank you,
Dominik

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions