HyPhy message board
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl
Methodology Questions >> How to >> Constraints on tree
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl?num=1139412151

Message started by ofedrigo on Feb 8th, 2006 at 7:22am

Title: Constraints on tree
Post by ofedrigo on Feb 8th, 2006 at 7:22am
Hi,

If you try to contrain differently one branch and the rest of the tree. I was wondering if there is a required order to specify the constraints. When you apply a contraint, does it automatically clear previously specified constraints?

In other words, is it equivalent to do:

ExecuteCommands ("tree1."+branch+".t:=omega1*tree2."+branch+".t;");
ReplicateConstraint ("this1.?.t:=omega2*this2.?.t",tree1,tree2);
or
ReplicateConstraint ("this1.?.t:=omega2*this2.?.t",tree1,tree2);
ExecuteCommands ("tree1."+branch+".t:=omega1*tree2."+branch+".t;");
?

thanks,

Olivier

Title: Re: Constraints on tree
Post by Sergei on Feb 10th, 2006 at 9:55am
Dear Olivier,


wrote on Feb 8th, 2006 at 7:22am:
If you try to contrain differently one branch and the rest of the tree. I was wondering if there is a required order to specify the constraints. When you apply a contraint, does it automatically clear previously specified constraints?

In other words, is it equivalent to do:

ExecuteCommands ("tree1."+branch+".t:=omega1*tree2."+branch+".t;");
ReplicateConstraint ("this1.?.t:=omega2*this2.?.t",tree1,tree2);
or
ReplicateConstraint ("this1.?.t:=omega2*this2.?.t",tree1,tree2);
ExecuteCommands ("tree1."+branch+".t:=omega1*tree2."+branch+".t;");
?


The order is not important in this case. ReplicateConstraint will scan all the branches, and apply constraints (when appropriate) only if the parameters have niot been previously constained. If you choose order 1 (branch/rest), ReplicateConstraint will not be applied to the branch (you need to use ClearConstraints before calling ReplicateConstraint if you want to override this behavior). In order 2, ReplicateConstraint will apply to all branches of the tree not previously constrained, but ExecuteCommand will override the assignment for the branch you want. messages.log will contain the constraints generated by ReplicateConstraint if you wanted to double-check.

It also is probably a good idea to call ClearConstraints (givenTree) before you impose any new constraints to make sure nothing unwanted carries over from the previous commands.

Cheers,
Sergei

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