Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
Multiple data sets (Read 2098 times)
Nick1979
YaBB Newbies
*
Offline


Curious HyPhy user

Posts: 6
Houston
Gender: male
Multiple data sets
Jun 13th, 2013 at 8:36am
 
Hi,

I am now using the hyphy windows version and I was wondering how to apply the same models and tests to many sets of alignments.


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


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: Multiple data sets
Reply #1 - Jun 13th, 2013 at 2:31pm
 
Hi Nicolas,

Generally, you would want to write a wrapper to have HyPhy execute the same analysis on different inputs. Assuming that you have a standard analysis (or wrote one yourself), you could do something along the lines of Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login Login

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


Curious HyPhy user

Posts: 6
Houston
Gender: male
Re: Likelihood function constraints
Reply #2 - Jun 17th, 2013 at 9:16am
 
Hi Sergei,

I have two aligned sequences and i want to test whether the three codon sites evolve at equal rates.

So far I have the code below. Now I want to put a constraint in which sites 2 and 3 have the same branch length as site 1 and then compare the two optimized likelihood functions with an LRT. I will greatly appreciate if you help me with the coding ?  Thank you




DataSet myData = ReadDataFile ("C:/Users/bio/Desktop/example");


/* Create 3 filters: one for each of the
   three codon positions */

DataSetFilter myFilter1 = CreateFilter (myData,1,"<100>","0,1,3");
DataSetFilter myFilter2 = CreateFilter (myData,1,"<010>","0,1,3");
DataSetFilter myFilter3 = CreateFilter (myData,1,"<001>","0,1,3");


HarvestFrequencies (obsFreqs1, myFilter1, 1, 1, 1);
HarvestFrequencies (obsFreqs2, myFilter2, 1, 1, 1);
HarvestFrequencies (obsFreqs3, myFilter3, 1, 1, 1);


/* Define an HKY85 model using each of the 4 frequency sets */
/* Let R be the ts/tv ratio, which we will eventually allow to be shared by all three of the positions */
global R;

HKY85RateMatrix = {{*,b,R*b,b}{b,*,b,R*b}{R*b,b,*,b}{b,R*b,b,*}};
Model HKY851 = (HKY85RateMatrix, obsFreqs1);
Tree myTree1 = (a,b);
Model HKY852 = (HKY85RateMatrix, obsFreqs2);
Tree myTree2 = (a,b);
Model HKY853 = (HKY85RateMatrix, obsFreqs3);
Tree myTree3 = (a,b);



/* Analyze data using 3 partitions: each partition has separate rates and base frequencies, but the ts/tv ratio (R) is shared by all three. Also, each branch has the same ts/tv ratio. */


LikelihoodFunction theSplitLikFun = (myFilter1,myTree1,myFilter2,myTree2,myFilter3,myTree3);


Optimize (paramValues, theSplitLikFun);
lnLik1 = paramValues[1][0];
npar1 = paramValues[1][1]+9;
Back to top
 
 
IP Logged