Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
observed frequencies (Read 2803 times)
jxn
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 10
observed frequencies
Apr 10th, 2007 at 11:05am
 
hi, I am just starting Hyphy to define a model

for the vector obsFreqs, how can i define it?

here is my code

REVRateMatrix = {{*,a,b,c}{a,*,d,e}{b,d,*,f}{c,e,f,*}};
Model REV = (REVRateMatrix, obsFreq);

Thanks a lot.
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: observed frequencies
Reply #1 - Apr 10th, 2007 at 11:28am
 
Dear jxn,

You can use HarvestFrequencies to compute frequencies from the data (take a look at Examples/SimpleAnalyses/F81.bf in the HyPhy directory for a very basic example), or you can define it by hand, e.g.

Code:
obsFreq = {{0.4}{0.2}{0.2}{0.2}}
 



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


I love YaBB 1G - SP1!

Posts: 10
Re: observed frequencies
Reply #2 - Apr 10th, 2007 at 11:40am
 
Sergei, thank you for your reply.

I did put HarvestFrequencies in my code before. but it didn't work


Error:obsFreq has not been defined prior to the call to Model = ...
Current BL Command:Define the model REV using transition matrix REVRateMatrix and equilibrium frequencies.obsFreq

my code
-------------------------------------
DataSet myData = ReadDataFile ("/home/cmei/HyPhy/Hominoid.txt");
DataSetFilter myFilter = CreateFilter (myData,1);
HarvestFrequencies (obsFreqs, myFilter, 1, 1, 1);

REVRateMatrix = {{*,a,b,c}{a,*,d,e}{b,d,*,f}{c,e,f,*}};
Model REV = (REVRateMatrix, obsFreq);

Tree myTree = (Or((Mc,Gb)(Hm(Gr(Ch,Bo)))));

LikelihoodFunction theLikFun = (myFilter, myTree, obsFreqs);
Optimize (paramValues, theLikFun);
fprintf (stdout, theLikFun);
-------------------------------
Maybe i had other problems.

any specific struture of the sequence data in the data file?can it be .txt? and should the species name start with #?

Thank you so much
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: observed frequencies
Reply #3 - Apr 10th, 2007 at 12:19pm
 
Dear jxn,

You have a typo in Code:
Model REV = (REVRateMatrix, obsFreq);  

- the second argument should read obsFreqs

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