Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
saving site-by-site likelihoods (Read 2197 times)
Ellen Cocquyt
YaBB Newbies
*
Offline


Feed your monkey!

Posts: 2
saving site-by-site likelihoods
Sep 1st, 2008 at 2:09am
 
Dear,
I would like to save site-by-site likelihoods when running an analysis in the batch file mode. I followed an example called siteLikelihoods.nex which I found on the forum but this only works without rate heterogeneity. Sergei mentioned in the original mail on the forum: “This gets a little trickier if there are category (rate variation variables) involved, because the command outputs a vector of marginals for each site.”
Is it possible to get site-by-site likelihoods when rate heterogeneity is used and if so which command should be used?
Thanks,
Ellen.
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: saving site-by-site likelihoods
Reply #1 - Sep 2nd, 2008 at 11:44am
 
Dear Ellen,

Use the code in the attached .bf file. It defines a function called constructSiteLikelihoods that takes the name of the likelihood function you want to process (passes as a string, e.g. constructSiteLikelihoods ("lf")) and returns a vector of site-by-site log likelihoods, including for models with rate variation.

HTH,
Sergei
Back to top
 
Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login Login (1 KB | )

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged
 
Ellen Cocquyt
YaBB Newbies
*
Offline


Feed your monkey!

Posts: 2
Re: saving site-by-site likelihoods
Reply #2 - Sep 8th, 2008 at 12:44am
 
Dear Sergei,
Thanks a lot for the batch file. But there is still a problem. For each analysis I use three partition. In a first analysis I used a codon model for two partitions with Global parameter estimates and REV with Rate Heterogeneity for the third partition, then your batch file is working. But when I do an analysis whit the same three partitions but with Rate Heterogeneity for all three partitions then the batch file doesn’t want to give output.
I changed your batch file a bit to get the output nicely aligned, as you can see in the attachment.
Is it because I use Rate Heterogeneity for several partitions that the batch file doesn’t work anymore? What should be added to get it working?
Thanks a lot for the help,
Ellen.
Back to top
 
Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login Login (1 KB | )
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: saving site-by-site likelihoods
Reply #3 - Sep 8th, 2008 at 1:54pm
 
Dear Ellen,

Try the attached file. It takes two arguments: the name of the LF and the file to write the results to.

Cheers,
Sergei
Back to top
 
Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login Login (1 KB | )

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged