HyPhy message board
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl
Methodology Questions >> How to >> Grouping branches in Batch File
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl?num=1355878363

Message started by nicola de maio on Dec 18th, 2012 at 4:52pm

Title: Grouping branches in Batch File
Post by nicola de maio on Dec 18th, 2012 at 4:52pm
Dear all,

I have a simple problem with my batch file:
Let's say I define the following tree

Code (]Tree MyTree = ((b1,b2)b3,(b4,b5)b6);[/code):
And I define all parameters as global in my model, except for two of them, t for the branch lengths, and another parameter sc.
Now, I want b1, b2 and b3 to share the same value of sc, and similarly for b4, b5 and b6.
I tried:
[code]MyTree.b2.sc := MyTree.b1.sc;

etc., but it does not seem to work.




Similarly, I also tried to define two models, M1 and M2, where M1 uses sc, while M2 uses sc2. Both sc and sc2 are in this case defined as global variables.
Then I set:
[code]Tree MyTree = ((b1{M1},b2{M1})b3{M1},(b4{M2},b5{M2})b6{M2});[/code]
But this also does not seem to work. I get different values for MyTree.b1.sc and MyTree.b2.sc. Also, convergence gets almost always stuck in non-optimal values.




Do you know what I am doing wrong (or could you suggest me some example to look at)?


Thanks, and Best Regards,
Nicola De Maio


Title: Re: Grouping branches in Batch File
Post by Sergei on Dec 18th, 2012 at 4:54pm
Hi Nicola,

Can you attach the complete batch file?

Sergei

Title: Re: Grouping branches in Batch File
Post by nicola de maio on Dec 20th, 2012 at 2:12am
Hi Sergei,

Thanks for the reply, I attached a summary of the batch file without some of the details, on one hand to keep the file short, on the other hand because we don't feel too safe (the work is not yet published, but I can email you the working batch file and the data if you have time to look at the details and you think it is needed).

Anyway, I think the problem is very simple and has to do with the way I defined the constraints on parameter "s" for branches of the same clade. This approach converges to a meaningful likelihood maximum, but when I plot MyTree1.b1.s and MyTree.b3.s I see different values, although I set
[code]MyTree1.b1.s := MyTree1.b3.s;[/code]
in the file.

I don't want to spam, but in case you want to see the second approach I was using, I can post it too.

Thanks again,

Nicola De Maio
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl?action=downloadfile;file=Batch_file_clade-specific_example1.txt (3 KB | 2 )

Title: Re: Grouping branches in Batch File
Post by Sergei on Dec 20th, 2012 at 8:07am
Hi Nicola,

Can you e-mail me the complete example (I promise, of course, to keep it confidential); I don't see anything wrong with the snippet you sent me, which makes me suspect that either the error is more subtle (e.g. model parameterization), or a bug in HyPhy which I have not encountered before.

S.

HyPhy message board » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2024. All Rights Reserved.