Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
ML basefreqs for each partition (Read 1738 times)
Jose_Patane
YaBB Newbies
*
Offline



Posts: 26
Brazil
Gender: male
ML basefreqs for each partition
Aug 29th, 2006 at 7:25pm
 
Dear guys,

How can I estimate base frequencies by ML for each partition separately?


Jose_Patane
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: ML basefreqs for each partition
Reply #1 - Aug 30th, 2006 at 10:45am
 
Dear Jose,

You need to define a separate model for each partition, and endow each with the set of estimated frequencies. Using the example for a single model:

Code:
/* the following is simply a way to parameterize
    base frequencies so that they are all in [0,1]
    and add up to 1, i.e. with 3 free parameters */

global P_1_1 = 0.5; P_1_1 :< 1;
global P_2_1 = 1/3; P_2_1 :< 1;
global P_3_1 = 1/4; P_3_1 :< 1;

global pi_A_1 := P_1_1;
global pi_C_1 := (1-P_1_1) * P_2_1;
global pi_G_1 := (1-P_1_1) * (1-P_2_1) * P_3_1;
global pi_T_1 := (1-P_1_1) * (1-P_2_1) * (1-P_3_1);

estimatedFreqs_1 = {{pi_A_1}{pi_C_1}{pi_G_1}{pi_T_1}}; /* the vector of frequencies */

global P_1_2 = 0.5; P_1_2 :< 1;
global P_2_2 = 1/3; P_2_2 :< 1;
global P_3_2 = 1/4; P_3_2 :< 1;

global pi_A_2 := P_1_2;
global pi_C_2 := (1-P_1_2) * P_2_2;
global pi_G_2 := (1-P_1_2) * (1-P_2_2) * P_3_2;
global pi_T_2 := (1-P_1_2) * (1-P_2_2) * (1-P_3_2);

estimatedFreqs_2 = {{pi_A_2}{pi_C_2}{pi_G_2}{pi_T_2}}; /* the vector of frequencies */

define the rate matrix here...

Model myModel_1 = (myRateMatrix, estimatedFreqs_1);
Model myModel_2 = (myRateMatrix, estimatedFreqs_2);

UseModel (myModel_1);
Tree t1 = ..

UseModel (myModel_2);
Tree t2 = ..

LikelihoodFunction ....
 



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
 
Jose_Patane
YaBB Newbies
*
Offline



Posts: 26
Brazil
Gender: male
Re: ML basefreqs for each partition
Reply #2 - Aug 30th, 2006 at 11:01am
 
Thanks again, Sergei!

Jose_Patane
Back to top
 
 
IP Logged