Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
CodonModelCompare.bf editing (Read 2781 times)
Rob
YaBB Newbies
*
Offline


Feed your monkey!

Posts: 4
CodonModelCompare.bf editing
Mar 11th, 2010 at 5:31pm
 
Hi,

I was wondering if anyone could help me create a slightly different version of CodonModelCompare.bf for HyPhy 2.0. As far as I understand it, the current CodonModelCompare.bf fits all 203 models mated with MG94, with a global dN/dS ratio on the tree.

What I'm trying to do is is fit all 203 nucleotide models mated with MG94_3x4, with local dN and dS parameters across the tree. Although this is computationally a bit expensive, the MPI version speeds things up enough to make it realistic for my dataset.

Apologies if this is a dumb question - I am almost entirely new to HyPhy.

Cheers,

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


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: CodonModelCompare.bf editing
Reply #1 - Mar 11th, 2010 at 10:20pm
 
Hi Rob,

Try doing a global search and replace of 'R*synRate' with 'nonSynRate' in the file. That ought to do the trick. This will break the option of using nucleotide branch lengths to estimate codon branch lengths, so do not select the "Once" option when prompted.

Sergei

PS The file is rather old and not particularly well written (my fault!) If you run into issues, let me know and I will try to set them straight.
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
 
Rob
YaBB Newbies
*
Offline


Feed your monkey!

Posts: 4
Re: CodonModelCompare.bf editing
Reply #2 - Mar 11th, 2010 at 11:25pm
 
Hi Sergei,

Thanks for the reply. I've tried it on a test dataset and it seems to work perfectly.

One further (unimportant) question - the "Model Options" prompt  still wants me to choose from  "Global" "Global w/rate var"  and "Non-syn variation only". As far as I understand I just have to choose "Global" (which now actually specifies a local model).

Just for completeness (and so I don't get confused when I try to use this in future), I tried to re-code this bit to skip that prompt and just go ahead and fit the local models (which presumably can't include rate-var. anyway).

I did this by deleteing this line:

#include "TemplateModels/modelParameters5.mdl";

and replacing it with

modelType = 0;

That seems to work - just wanted to check that it seems OK to you.

If that's OK, i'll post the bf to the appropriate list on the forum, in case anyone else would find it useful.

Thanks for your help,

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


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: CodonModelCompare.bf editing
Reply #3 - Mar 12th, 2010 at 12:18am
 
Hi Rob,

Your code alterations should work fine.

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


Feed your monkey!

Posts: 4
Re: CodonModelCompare.bf editing
Reply #4 - Mar 12th, 2010 at 1:06am
 
Hi Sergei,

Thanks for the help. I have one observation which I don't understand.

If I use the new batch file, the output from the full GTR model is this:

(012345) Full Model ln-lik =  -67084.5. Parameter Count=271 AIC = 134711

As I understand it, this model should be MG94_3x4 mated with 012345 (it does at least have the correct number of 271 parameters). However, if I implement this model on the same data, with the same tree, using AnalyseCodonData.bf, I get a much better likelihood of -67002.5. I've had a look at both files, and can't see any difference in how they build the models. Also, I've tried running all the models in AnalyseCodonData.bf, and can't get a likelihood of -67084.5 with any of them.

This is not a particularly important problem for my purposes, but I'd be interested to know if there was something obvious which gives rise to this difference.

Either way, the new bf will be very useful.

Thanks for your help.

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


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: CodonModelCompare.bf editing
Reply #5 - Mar 12th, 2010 at 2:05am
 
Hi Rob,

No worries. I'll try running the modified file on a test data set to see if I observe the same behavior and tell you what I find.

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