Hi Alan,
Alan dQ wrote on Mar 9
th, 2010 at 6:48pm:
Hello Sergei,
I'm analyzing a data set consisting of a bunch of mitochondrial sequences and a single paralogous nuclear-mitochondrial pseudogene. I'd like to estimate branch lengths using a REV model in which all the mt branches have a common rate matrix and the pseudogene branch has a different matrix (with the rate parameter values all estimated from the data). Is it possible to do this in HYPHY and, if so, how?
It is definitely possible. The logic is as follows:
1). Define TWO instances of the REV model with
different sets of global rate parameters (in the code below simply copy and paste the model definition, and (for instance), append _paralog to all global variable names and in the rate matrix for the second model.
Code:SetDialogPrompt("Select a nucleotide data file:");
DataSet myData = ReadDataFile(PROMPT_FOR_FILE);
DataSetFilter myFilter = CreateFilter(myData,1);
HarvestFrequencies(obsFreqs,myFilter,1,1,1);
global AC = 1;
global AT = 1;
global CG = 1;
global CT = 1;
global GT = 1;
REVRateMatrix = {{*,AC*t,t,AT*t}{AC*t,*,CG*t,CT*t}{t,CG*t,*,GT*t}{AT*t,CT*t,GT*t,*}};
Model REV = (REVRateMatrix, obsFreqs);
2). Apply the paralog model to specific branches in the tree as in the following
Code:UseModel (REV); /* default model */
Tree myTree = ((mt1,mt2),mt3,paralog{REV_paralog});
The {model} notation will assign the specified model to the branch you single out. All other branches will be assigned the default model.
If you are interested in learning how to code in HBL, I would recommend the third chapter of Multimedia File Viewing and Clickable Links are available for Registered Members only!! You need to
as a primer.
Sergei