Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
Model construction (Read 1135 times)
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Model construction
Jun 9th, 2005 at 1:02pm
 
I received this query via e-mail:
Quote:
What is the effect of this code?

Model partModel1 = (partMatrix1,partFreqs1,MULTIPLY_BY_FREQS);

from the manual I couldn't see that the Model definition could have three parameters


The three parameters are as follows:

1). Identifier of an NxN rate matrix (mandatory)
2). Identifier of an Nx1 vector of equilibrium frequencies for the rate matrix (mandatory)
3). Whether or not the entries of the rate matrix should be automatically multiplied by the target character frequency (0/1, option, default = 1).

The effect of step 3 is to reduce the clutter in model defintions.

E.g. HKY85 can be defined (equivalently) in two different ways.

Code:
EFV = {{P_A}{P_C}{P_G}{P_T}};

global kappa = 1;

RateMatrix1 =
{{		*,	t	,	kappa*t,	t}
{		t,	*	,	t,		kappa*t}
{kappa*t	,	t	,	*,		t}
{		t, kappa*t	,	t,		*}};

RateMatrix2 =
{{		*	,	t*P_C	,	kappa*t*P_G,	t*P_T}
{	t*P_A	,	*		,	t*P_G,		kappa*t*P_T}
{kappa*t*P_A	,	t*P_C	,	*,			t*P_T}
{t*P_A		,kappa*t*P_C	,	t*P_G,		*}};

Model HKY_v1 = (RateMatrix1, EFV,1);
Model HKY_v2 = (RateMatrix2, EFV,0);
 



Some prominent models which use the '0' option are MG94-derived codon models.

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