Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
Relative Ratio (Read 3621 times)
luli
Guest


Relative Ratio
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.
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: Relative Ratio
Reply #1 - 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);
 



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
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
 
luli
Guest


Re: Relative Ratio
Reply #2 - 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.
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: Relative Ratio
Reply #3 - 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
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