Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reimplement tree shape kernel as C shared library #51

Open
ArtPoon opened this issue Oct 13, 2015 · 3 comments
Open

Reimplement tree shape kernel as C shared library #51

ArtPoon opened this issue Oct 13, 2015 · 3 comments

Comments

@ArtPoon
Copy link
Owner

ArtPoon commented Oct 13, 2015

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
Copy link
Collaborator

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
Copy link
Owner Author

ArtPoon commented Oct 13, 2015

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 [email protected] 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
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants