Easy way to calculate tree likelihood given alignment and substitution model?

22 views
Skip to first unread message

Alexander Platt

unread,
Feb 25, 2016, 10:24:55 PM2/25/16
to DendroPy Users
I'm looking for a quick and programmatic way of taking a small tree and a sequence alignment, assuming a substitution model, and calculating a likelihood.  (No need for searching or maximizing or aligning or fitting).  Does DendroPy have an easy way to do that?

Jeet Sukumaran

unread,
Feb 25, 2016, 10:35:21 PM2/25/16
to dendrop...@googlegroups.com
Currently, not natively.

However, if you have PAUP* installed, the ``dendropy.intero.paup``
module makes it convenient to get PAUP to do all the business of
likelihood heavy lifting for you. Use ``dendropy.interop.estimate_tree``
to get PAUP to estimate a tree given an alignment, and
``dendropy.interop.estimate_model`` to get PAUP to estimate model
parameters given a tree and an alignment. With the existing function of
the latter, you can suppress optimization of branch length. If you just
want a score, then you will have to derive a function based on the
latter that takes a set of model parameters and just scores the tree.
Straightforward to do. If you don't want or are not sure how to go about
working this up, submit an issue request and I'll try and get one going.

-- jeet
> --
> You received this message because you are subscribed to the Google
> Groups "DendroPy Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to dendropy-user...@googlegroups.com
> <mailto:dendropy-user...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

--



--------------------------------------
Jeet Sukumaran
--------------------------------------
jeetsu...@gmail.com
--------------------------------------
Blog/Personal Pages:
http://jeetworks.org/
GitHub Repositories:
http://github.com/jeetsukumaran
Photographs (as stream):
http://www.flickr.com/photos/jeetsukumaran/
Photographs (by galleries):
http://www.flickr.com/photos/jeetsukumaran/sets/
--------------------------------------

Alexander Platt

unread,
Feb 26, 2016, 10:04:22 AM2/26/16
to DendroPy Users
Yeah, I already have the model, the tree with branch lengths, and the alignment, and all I need is the likelihood of the alignment given the tree and model.  


On Thursday, February 25, 2016 at 10:35:21 PM UTC-5, Jeet Sukumaran wrote:
Currently, not natively.

However, if you have PAUP* installed, the ``dendropy.intero.paup``
module makes it convenient to get PAUP to do all the business of
likelihood heavy lifting for you. Use ``dendropy.interop.estimate_tree``
to get PAUP to estimate a tree given an alignment, and
``dendropy.interop.estimate_model`` to get PAUP to estimate model
parameters given a tree and an alignment. With the existing function of
the latter, you can suppress optimization of branch length. If you just
want a score, then you will have to derive a function based on the
latter that takes a set of model parameters and just scores the tree.
Straightforward to do. If you don't want or are not sure how to go about
working this up, submit an issue request and I'll try and get one going.

-- jeet


On 2/25/16 10:24 PM, Alexander Platt wrote:
> I'm looking for a quick and programmatic way of taking a small tree and
> a sequence alignment, assuming a substitution model, and calculating a
> likelihood.  (No need for searching or maximizing or aligning or
> fitting).  Does DendroPy have an easy way to do that?
>
> --
> You received this message because you are subscribed to the Google
> Groups "DendroPy Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to dendropy-user...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages