ArtPoon / kamphir

Phylogenetic inference using a tree-shape kernel in an Approximate Bayesian Computation framework
BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

Reimplement tree shape kernel as C shared library #51

Open ArtPoon opened 8 years ago

ArtPoon commented 8 years ago

Rosemary's written an implementation in C, so it should just be matter of writing the hooks from this code into Python as a shared library.

rmcclosk commented 8 years ago

It might not be that simple: the C version represents the trees as igraph_t objects from the igraph library, but the python version uses the BioPython Phylo objects. It's probably easiest to just call the treekernel binary using Popen.

ArtPoon commented 8 years ago

A shared library would be more elegant. Can't we just pass the trees as serialized representations, i.e., Newick strings?

On Oct 13, 2015, at 11:38 AM, Rosemary McCloskey notifications@github.com wrote:

It might not be that simple: the C version represents the trees as igraph_t objects from the igraph library, but the python version uses the BioPython Phylo objects. It's probably easiest to just call the treekernel binary using Popen.

� Reply to this email directly or view it on GitHub.

rmcclosk commented 8 years ago

Okay, I can write a wrapper around the kernel function which operates on two Newick strings. I'll add it to my todo list.