HyPhy message board
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl
HYPHY Package >> HyPhy feedback >> Relative Ratio
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl?num=1152654962

Message started by luli on Jul 11th, 2006 at 2:56pm

Title: Relative Ratio
Post by luli on Jul 11th, 2006 at 2:56pm
Hi,

I'd like to implement a Relative Ratio Test using the RelativeRatio.bf but I want to leave one branch free.
Is it possible to do that?

Thanks,
L.

Title: Re: Relative Ratio
Post by Sergei on Jul 11th, 2006 at 3:24pm
Dear Luli,

Yes; but you need to modify the source code of RelativeRatio.bf. Paste this code:

Code (]
mxTreeSpec = {5,1};
mxTreeSpec [0):

= "tr2c";
mxTreeSpec [1] = "8240";
mxTreeSpec [2] = "10,40,-10,-175,1";
mxTreeSpec [3] = "";
mxTreeSpec [4] = "";
OpenWindow (TREEWINDOW, mxTreeSpec);                                          
internalNodes = BranchCount(tr2c);
leafNodes        = TipCount (tr2c);
choiceMatrix = {leafNodes+internalNodes,2};
for (bc=0; bc<leafNodes; bc=bc+1)
{
     choiceMatrix[bc][0] = TipName(tr2c,bc);
     choiceMatrix[bc][1] = "Taxon " + choiceMatrix[bc][0];
}
for (bc=0; bc<internalNodes; bc=bc+1)
{
     choiceMatrix[bc+leafNodes][0] = BranchName(tr2c,bc);
     choiceMatrix[bc+leafNodes][1] = "Internal Branch Rooting " + tr2c[bc];
}
ChoiceList  (stOption,"Do not constrain:",0,NO_SKIP,choiceMatrix);

if (stOption[0] >= 0)
{
     for (k=0; k<Columns (stOption) * Rows (stOption); k=k+1)
     {
           ExecuteCommands ("ClearConstraints (tr2c."+choiceMatrix[(stOption[k])][0]+");");
     }
}

into the RelativeRatio.bf file immediately after  
[code]
ReplicateConstraint (constraintString,tr2c,tr1c);
[/code]

The code will prompt you to select one or more branches which you do not wish to constrain with the Relative Ratio test.

Cheers,
Sergei

Title: Re: Relative Ratio
Post by luli on Jul 11th, 2006 at 4:11pm
Hi Sergei,

Thanks a lot for your promptly  response!

I modified the bf file adding the piece of code that you sent me.
Everything was going perfect until I received the following message:
[...] must be preceded by a matrix variable: "ClearConstraints(trc."+choice Matrix[(s+Option[k])][?0]+");"
Current BL Command: ExecuteCommands in string("ClearConstraints (tr2c."+choiceMatrix[(stOption[k])][0]+");");

Could you help me with this error message?
Thanks a lot,
L.

Title: Re: Relative Ratio
Post by Sergei on Jul 11th, 2006 at 5:04pm
Dear Luli,

This error occurs because I used a coding shortcut not understood by HyPhy versions which are over 3 months old. It will go away if you download a newer (April 2006 or later) version.

Cheers,
Sergei

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