Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
branch specific estimates of dN/ds (Read 6373 times)
Steve J
YaBB Newbies
*
Offline


Feed your monkey!

Posts: 15
branch specific estimates of dN/ds
Mar 11th, 2011 at 10:54am
 
Just wondering if anyone can provide some guidance on perhaps using testBranchDNDS.bf to assign estimates for dN/dS for more than two branch sets.  I don't see that you can assign more than two.  I am looking at dN/ds ratios for transposable elements occurring in sexual and asexual organisms.  I would like to test whether this parameter differs in asexual and sexual external branches.  I have attached a paper where I previously estimated one ratio to four ratio models using PAML.  I would much rather use HyPhy!  thanks for any help

Steve J
Back to top
 
Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login Login (151 KB | )
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: branch specific estimates of dN/ds
Reply #1 - Mar 11th, 2011 at 11:26am
 
Hi Steve,

For this you are probably better off using the GUI. Take a look at Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login Login Download both archives and look at LocalModels.pdf in the PDF folder. There is an example there on how to do a 3-ratio test. The idea is to start with a local model and then use ReplicateConstraint on the branches that you want (or just define them one at a time) to constrain sets of branches to have the same dN/dS. I presume you've already looked at Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login Login for a general primer on using the GUI?

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


Feed your monkey!

Posts: 15
Re: branch specific estimates of dN/ds
Reply #2 - Mar 11th, 2011 at 11:29am
 
Sergei
  Yes I have even done the replicateConstraint exercise in the manual.  Thanks
Back to top
 
 
IP Logged
 
Steve J
YaBB Newbies
*
Offline


Feed your monkey!

Posts: 15
Re: branch specific estimates of dN/ds
Reply #3 - Mar 11th, 2011 at 12:22pm
 
with my trees, the asexual and sexual external branches are somewhat scattered without strong clumping. Rather than using text language used in your example, can you assign branches manually say in the constraint boxes.  I couldn't see anyway to do that. Or can you assign on the trees where you can see the nodes and branches
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: branch specific estimates of dN/ds
Reply #4 - Mar 11th, 2011 at 1:56pm
 
Hi Steve,

Yep, you can constrain branches one at a time. Take a peek at Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login Login

Basically you want to set nonSynRate proportional to synRate along one of the lineages (with the appropriate ratio, there is an option in the proportionality button), and then reuse the same ratio for all branches in the same class.

Hope this makes sense. You can save and reuse the likelihood function and constraints after you've defined them once (I hope this is described in one of the book chapters)...

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


Feed your monkey!

Posts: 15
Re: branch specific estimates of dN/ds
Reply #5 - Mar 17th, 2011 at 11:50am
 
Sergei
finally back at this.  Okay my previous approach was to develop a one ratio model, which I assume is what you refer to as a global model.  When I fit this, you only get synonymous rates in likelihood parameter table.  Is this what I call the one-ratio model with all branches having the same dN/dS ratio?
Second, you can only constrain two parameters at a time when using the constrain 2 parameters button and then you have to specify the constant of proportionality - so when I use a value of 1 it equalizes the dN and ds for a particular external haplotype.  I'm not really sure what constant I should be using. 
third, let's say I want to test the one-ratio model with a two-ratio model of dN/ds ratio for internal and external branches.  Would I run the global model, save as the null model, and then select all external branches in the tree and set a value to 1 by using the constrain parameters to be equal button?  Thanks and sorry for all the questions.
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: branch specific estimates of dN/ds
Reply #6 - Mar 17th, 2011 at 12:23pm
 
Hi Steve,

To answer your questions

1). Global is equivalent to 'one-ratio'
2). If you start by defining the local model (where each branch will have it's own synRate and nonSynRate), you would use the 'Constrain 2 parameters to be proportional' button and then select the appropriate option from the pull down (see attached). You would define one omega per group of branches and (i.e. define a new ratio for the first branch in a group and then reuse it for other branches in a group).
3). Once you've defined this model (multi-ratio), save it as the alternative model, and then test restrictions (i.e. setting all omegas equal to one another) as nulls.

HTH,
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
 
Steve J
YaBB Newbies
*
Offline


Feed your monkey!

Posts: 15
Re: branch specific estimates of dN/ds
Reply #7 - Mar 17th, 2011 at 1:06pm
 
Thanks Sergei. When defining an omega for say external branches do you enter an arbitrary value say 1?
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: branch specific estimates of dN/ds
Reply #8 - Mar 17th, 2011 at 1:07pm
 
Hi Steve,

Steve J wrote on Mar 17th, 2011 at 1:06pm:
Thanks Sergei. When defining an omega for say external branches do you enter an arbitrary value say 1?


Enter the variable name that you want to use, e.g. omega1 or omega_External or whatever you'd like. Its value will be set to 1 automatically, and later optimized...

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


Feed your monkey!

Posts: 15
Re: branch specific estimates of dN/ds
Reply #9 - Mar 17th, 2011 at 1:09pm
 
Thanks. I get it now. I'm a little slow!
Back to top
 
 
IP Logged
 
Steve J
YaBB Newbies
*
Offline


Feed your monkey!

Posts: 15
Re: branch specific estimates of dN/ds
Reply #10 - Mar 18th, 2011 at 9:08am
 
Hey Sergei,
  So  I was able to set up the two ratio model with external and internal branches.  I optimized this and saved it as the alternative.  I then went back into the parameter table to set up a one ratio model as the null model.  the first time I didn't clear the constraints, and when I selected the first pair to constrain the parameters, it gave me an error message "Bad Binary Placement Operator" when I used global as the parameter name.  I then cleared the constraints, and when I entered another name like equal I didn't get the error message but no text showed up in the constraints box.
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: branch specific estimates of dN/ds
Reply #11 - Mar 24th, 2011 at 1:10pm
 
Hi Steve,

Your experience revealed that HyPhy was allowing users to enter invalid variable names in some prompt boxes and then did not report the error in a meaningful way. I modified the behavior to automatically check that the name is a valid one, and only allow the OK button to be clicked if that's the case. E.g. if you enter 'global' now, it will be highlighted in red, and you won't be able to click 'OK'. The next code push (probably in a few days) will have this feature.

Sorry for your troubles, and thanks for providing me with valuable user feedback.

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


Feed your monkey!

Posts: 15
Re: branch specific estimates of dN/ds
Reply #12 - Mar 24th, 2011 at 1:29pm
 
I really appreciate all your help. Great program
Back to top
 
 
IP Logged