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

Binary Sequence Alignement #245

Open
adrienlemeur opened this issue Jun 8, 2023 · 3 comments
Open

Binary Sequence Alignement #245

adrienlemeur opened this issue Jun 8, 2023 · 3 comments

Comments

@adrienlemeur
Copy link

Hello,
Do you consider adding binary alignement / models ?
Thanks,

Adrien

@rneher
Copy link
Member

rneher commented Jun 16, 2023

this is possible in a script when using TreeTime as a library. But it is currently not exposed to the command line. If this is an option for you, I can give you a few pointers.

@adrienlemeur
Copy link
Author

Oh thank you ! I was afraid that treetime was a C library but I should be fine with Python ! Is is straightforward ?

@rneher
Copy link
Member

rneher commented Jul 7, 2023

when you use TreeTime as a library, you set it up like this (for ancestral sequence reconstruction, time trees follow a similar pattern with with TreeTime instead of TreeAnc):

https://github.com/neherlab/treetime_examples/blob/master/scripts/ancestral_sequence_inference.py#L15

Instead of Jukes-Cantor, you can feed the gtr argument a GTR model. to make a binary model, you should be able to do

from treetime import GTR

myGTR = GTR.custom(alphabet=['a', 'b'])

see the constructor here:

https://github.com/neherlab/treetime/blob/master/treetime/gtr.py#L278

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

No branches or pull requests

2 participants