Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
BranchLength between terminals (Read 1709 times)
wayne
Global Moderator
*****
Offline


I love YaBB 1G - SP1!

Posts: 57
San Diego, CA
Gender: male
BranchLength between terminals
Feb 20th, 2007 at 7:12am
 
Hi Sergei, I'm trying to get a branch length between two terminals using

Code:
brLength = BranchLength ( FixTree, "CHB104EN, CHB104" ); 


where CHB104EN and CHB104 are terminal nodes in a topology. However, brLength returns -1. Actually, the code I'm using is

Code:
ExecuteCommands ( "brLength = BranchLength ( FixTree, \"" + PairData[ j ][ 0 ] + "; " + PairData[ j ][ 1 ] + "\" );"); 


where PairData is defined as

Code:
PairData = { { "CHB1EN", "CHB1"}{ "CHB104EN", "CHB104"}{ "CHB106EN", "CHB106"}{ "CHB107EN", "CHB107"}{ "CHB108EN", "CHB108"} } 

I've tried both "," and ";" separated taxa, yet both return -1. Any help/suggestions would be much appreciated. thanks ./w
Back to top
 

Assistant Project Scientist&&Antiviral Research Center&&Department of Pathology&&University of California, San Diego
WWW WWW  
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: BranchLength between terminals
Reply #1 - Feb 20th, 2007 at 7:45am
 
Dear Wayne,

The correct syntax is

Code:
BranchLength(tree,"taxon 1;taxon 2")
 



Make sure there are no extra spaces between ';' and the second taxon and keep in mind that the names are case sensitive.

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
 
wayne
Global Moderator
*****
Offline


I love YaBB 1G - SP1!

Posts: 57
San Diego, CA
Gender: male
Re: BranchLength between terminals
Reply #2 - Feb 20th, 2007 at 9:40am
 
Hi Sergei, thanks, a space was the problem. regards ./w
Back to top
 

Assistant Project Scientist&&Antiviral Research Center&&Department of Pathology&&University of California, San Diego
WWW WWW  
IP Logged