Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
irreversible models (Read 2191 times)
konrad
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 53
irreversible models
Aug 31st, 2006 at 8:38am
 
Hi Sergei,

The documentation states that one can use HyPhy with irreversible models, and indeed such a model is easy to specify in HyPhy. However, they only make sense if used with rooted trees - the likelihood very much depends on the position of the root.

From GettingStarted.pdf: "however, for most purposes rooted trees are automatically unrooted by HyPhy because likelihood values for unrooted trees are the same as those for rooted trees."

Is it possible to force HyPhy to use rooted trees? Or implement irreversible models?

If a general solution is not available, there may still be one for my particular case: I want to use one specific taxon as the root of the tree. With a rooted tree this could be achieved by constraining the appropriate branch length to zero. With an unrooted tree it may still be possible: if HyPhy starts its likelihood calculation at a specific node, then that node is effectively the root of the tree and all one needs is to know how HyPhy chooses the starting node.

cheers,
Konrad
Back to top
 
WWW WWW  
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: irreversible models
Reply #1 - Aug 31st, 2006 at 8:57am
 
Dear Konrad,

If you set the flag
[code]
ACCEPT_ROOTED_TREES = 1;
[/code]
HyPhy will NOT reroot the tree, and you can use irreversible models. Take a look at the NRV.bf model in TemplateBatchFiles/TemplateModels which is an example of how to specify a general nucleotide non-reversible model, subject to the constraint that its equilibrium frequencies match those from the data.

Cheers,
Sergei
Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged
 
konrad
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 53
Re: irreversible models
Reply #2 - Sep 1st, 2006 at 4:57am
 
Thanks Sergei,

I found NRM.mdl but not NRV.bf

Setting the flag changes the tree data structure, but I am uncertain how it works. For instance, using the following tree from my data file:

(tax1:0.1,tax2:0.1);

Directly outputting the tree data structure using fprintf gives:

(tax1:0,(tax2:0)Node2:0);

(Why is it ignoring the specified branch lengths?)

On changing the second branch length using givenTree.tax2.t := 10;  this changes to:

(tax1:0 (tax2:0.120039)Node2:0);

Could you explain how the .t parameter relates to the branch length? Also, is the root of the tree at Node2, or at the point where the branch from Node2 joins with the branch from tax1?
Back to top
 
WWW WWW  
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: irreversible models
Reply #3 - Sep 1st, 2006 at 10:22am
 
Dear Konrad,

I don't think HyPhy is correctly handling the case of a rooted 2-sequence tree (it does for 3 or more sequnces though).

I am going to look into it in about 10 days - I am going out of the country until Sep 13th.

Re: branch lengths. Generally speaking, branch lengths are a function of model parameters (like 't', rates etc), and base frequencies. The 0.1 you feed in is assigned to the 't' parameter of the NRM model, but the branch length is also a function of pi_A,..,pi_T and R_... - hence the non-linear mapping. If you want the branch length to be fixed, you need to constrain the 't' parameter appropriately.

Cheers,
Sergei
Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged