Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
Test for acceleration in one branch, with 2 data p (Read 3234 times)
eliot
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 9
Test for acceleration in one branch, with 2 data p
Dec 7th, 2006 at 3:24pm
 
hi,

You guys have built some very nice tools, thanks.

I have a particular problem I'm writing a batch file for, and I'd like to check if I'm doing what I intend to be doing.

I have two corresponding datasets from noncoding sequence. One is putatively neutral, and the other putatively functional. (for example they could be an ancestral repeat, and a putative regulatory element which are nearby each other). I want to test if the substitution rate for a particular branch (branch A) in the functional is higher than expected relative to the neutral. I define "expected" based on information external to this data--say the ratio of subsitution rates genome wide.

For a 3 species tree ((A,B)C), I put each type of sequence in its own partition, and set up a joint likelyhood function.

LikelihoodFunction  theLnLik = (neutFilt, neutTree, consFilt, consTree);

Then to do a likelyhood ratio test, I get the likelyhood under a constrained model. (I'm using HKY85 by the way).

global ss=0;
consTree.A.trst:=ss*0.26*neutTree.A.trst;
consTree.A.trvs:=ss*0.24*neutTree.A.trvs;
consTree.B.trst:=ss*0.68*neutTree.B.trst;
consTree.B.trvs:=ss*0.69*neutTree.B.trvs;
consTree.C.trst:=ss*0.36*neutTree.C.trst;
consTree.C.trvs:=ss*0.35*neutTree.C.trvs;

In the second statement, the number 0.26 is a branch specific scaling factor (obtained externally to this data) giving the average ratio between neutral and conserved for branch A transitions. ss is a scaling factor for the level of constraint of this particular element in all branches of the tree.

I then compare the likelihood for this model with that for a model with one additional parameter. This parameter allows branch A to go more quickly.

global ss=0;
global RR=1;
RR>1;
consTree.A.trst:=ss*RR*0.26*neutTree.A.trst;
consTree.A.trvs:=ss*RR*0.24*neutTree.A.trvs;
consTree.B.trst:=ss*0.68*neutTree.B.trst;
consTree.B.trvs:=ss*0.69*neutTree.B.trvs;
consTree.C.trst:=ss*0.36*neutTree.C.trst;
consTree.C.trvs:=ss*0.35*neutTree.C.trvs;

Is there some problem with my setting RR>1 like this? Are there other problems with how I have written it?

What I want to be testing is whether there has been a relaxation of contraint in branch A.

thanks much,
Eliot

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


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: Test for acceleration in one branch, with 2 da
Reply #1 - Dec 7th, 2006 at 4:37pm
 
Dear Eliot,

Everything looks OK except that the one sided constraint on 'R' should read:
Code:
global R:>1;
 


Also, you you should then test the hypothesis that R!=1 by using a mixture 0.5(chi^2_1+chi^2_0), i.e. you if you have the likelihood ratio statistic LR=(2*(LogL_alt - LogL_null)), the p-value will be

Code:
pValue = 0.5(1-CChi2(LR,1));
 



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


I love YaBB 1G - SP1!

Posts: 9
Re: Test for acceleration in one branch, with 2 da
Reply #2 - Dec 8th, 2006 at 1:46pm
 
thanks a lot for the help!
Back to top
 
 
IP Logged