Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
more on dnds treees (Read 6892 times)
Antonio
Ex Member


more on dnds treees
Nov 15th, 2005 at 11:13am
 
Hello Sergei:

In your code in postdNdS you get syn substitutions per codon or per nucleotide site and similarly for non-syn. But, how can I get syn substitutions per syn-site and non-syn subs per non-syn site? is this possible? How? Is this information just present in the matrices synM  and nonsynM and can I use it in some easy way  ????.

Thank you very much  Cheesy

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


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: more on dnds treees
Reply #1 - Nov 16th, 2005 at 2:08am
 
Dear Antonio,

Give me a definition of synonymous and non-synonymous sites that you want computed, and I can show you how.

It is my personal view that the notion of synonymous and non-synonymous sites is ill defined (e.g. doesn't take into account the evolutionary history of the sample, fails to account for the fact that site classification depends on the context etc) Tongue

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
 
Antonio
Ex Member


Re: more on dnds treees
Reply #2 - Nov 16th, 2005 at 6:30am
 
Dear Sergei:
We just want to compute the standard dN/dS (omega - sensu Nei or Yang) to make inferences about selection. żDo you recommend a different version of
this statistic? What is exactly then the dN/dS reported in DataMonkey?
,
Antonio
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: more on dnds treees
Reply #3 - Nov 16th, 2005 at 6:52am
 
Dear Antonio,

Datamonkey reports one of the two things:

1). For SLAC: dN and dS (and their ratio) computed relative to the neutral expectation. This is done by reconstructing the evolutionary history of the sample (using an ML method)

2). For FEL and REL it effectively reports the omega (in Nielsen Yang terms) value, i.e. the ratio of non-synonymous to synonymous substitution rates.

For likelihood models, in my opinion, one should use the dN/dS rate ratio to estimate selective pressure. Codon models already report either a global dN/dS (if there is not site-to-site variation), or site-by-site values.

If I recall, the Nei-Gojobori distance measure is only properly defined for two sequences anyway. Take a peek at an old paper by Spencer Muse about some of the issues involved with the classic dN and dS estimators: Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login Login. Also, take a look at Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login Login.

Effectively, you can now estimate E[syn subs] and E[non-syn subs] PER CODON, but you want to normalize it by the expected substitution counts if your sequences were evolving neutrally (thus the synonymous and non-synonymous sites), i.e. all substitutions out of a codon were equiprobable. There are many ways do this (some are worse than others), but I am not sure which one you had in mind Smiley 

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
 
Antonio
Ex Member


Re: more on dnds treees
Reply #4 - Nov 16th, 2005 at 9:40am
 
dear Sergei:

Thank you very much for the references. Yes you are right I want in some way normalize E[syn subs] and E[nonsyn subs] in order to, for example, be able of graphically represent an average non-syn subs per site curve along time. And now I am wondering if this could be done using the E[subs] i.e. the expected substitutions using both syn and non-syn sites as is computed by Hyphy?. Make this any sense? or maybe I am (once again) absolutely lost? Embarrassed

Thus, my question should be, how can I get the E[non-syn subs] by branch normalized by E[tot subs] by branch?.

,
Thank you very much Sergei for all this,
Smiley
Antonio
Back to top
 
 
IP Logged
 
David
YaBB Newbies
*
Offline


viva hyphy

Posts: 7
Vigo, Spain
Gender: male
Re: more on dnds treees
Reply #5 - Dec 1st, 2005 at 9:56am
 
Hi Sergei and Simon,

To normalize E[syn subs] and E[nonsyn subs] we could use BL estimates under a pure HKY. But you seem to suggest there might be better options in HYPHY?

All the best,

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


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: more on dnds treees
Reply #6 - Dec 1st, 2005 at 1:19pm
 
Dear David,

Quote:
To normalize E[syn subs] and E[nonsyn subs] we could use BL estimates under a pure HKY. But you seem to suggest there might be better options in HYPHY?



We could indeed; this would make estimates directly comparable among trees. Alternatively, one can fit a forced neutral model (e.g. MG with dN=dS=1) and the normalize the substitutions relative to the 'neutral case'. The latter case seems cleaner. Let me know if you or Antonio need help with the implementation.

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
 
David Posada
Guest


Re: more on dnds treees
Reply #7 - Dec 1st, 2005 at 11:40pm
 
Sergei,

Right, we talked about constraining omega=1, but we were not sure of how to force it really. If you give us a hint that will make things easier for us. Indeed, many thanks for your fantastic efforts helping users!!!

Best,


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


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: more on dnds treees
Reply #8 - Jan 4th, 2006 at 10:17pm
 
Dear Antonio (and David),

I have finally added a simple computation of dS and dN trees (following the Muse paper) to a post processor (syn and non-syn trees). This should do the trick for most cases (constraining dN=dS might be a bit too fasitdious). The file can be downloaded from here (it should be dropped inside TemplateBatchFiles): Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login Login

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
 
Antonio
Ex Member


Re: more on dnds treees
Reply #9 - Jan 17th, 2006 at 3:07am
 
Dear Sergei I still have a couple of questions regarding the computation of dN and dS trees in hyphy. If I compute the Branch Lenghts of a topology using a codon MG94REV model with dNdSRates analysis script and afterwards use the following batch file:

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login Login

to get dN and dS trees and compute the mean path to the tree root from the distinct serial times, I get always dS values greater than dN ones (dS>dN) however if use
Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login Login
choosing  the appropriate .fit file written out by the dNdSRates analysis and do the same computation as above I get always the opposite pattern dN > dS. This happens with all patients though I know by other method (whcih is not based on BLenghts  from a topology) that the patients have some of them dN>dS and others the opposite. What is suspicious to me is the switch of the patterns between the hyphy methods. Am I missing something?  Could be a problem with the methods? any idea?.

Thank you verymuch in advance,

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


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: more on dnds treees
Reply #10 - Jan 17th, 2006 at 9:02am
 
Dear Antonio,

The post_sns.bf file does not handle models with site-to-site rate variation correctly. It's easy enough to fix, I am not quite sure why I didn't do it previously. I'll post a note when the updated version is ready.

Also the Print Trees file does not report dS and dN trees, only expected synonymous subs and expected non-synonymous subs per codon site (not per hypothetical syn. or non-syn. position).

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
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: more on dnds treees
Reply #11 - Jan 23rd, 2006 at 11:15am
 
Dear Antonio,

post_sns.bf does actually handle models with rate variation (disregard my previous comment).

I modified the Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login Login file to spool out a .csv files with E[s.subs/codon], E[ns.suns/codon], dS and dN stratified by branch. Let me know if this makes better sense now.

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


I love YaBB 1G - SP1!

Posts: 7
Re: more on dnds treees
Reply #12 - Apr 26th, 2007 at 2:41pm
 
Hello again - What is the difference between nsClass1 and dN/dS? I thought they were the same, but they don't seem to be.

If I print out nsClass1 I get 0.0721754.

Using the dNdS batch file you mentioned in the previous message, for branch 1
I got dN of 0.000539828 and dS or 0.00798629, which gives a dN/dS of  0.06759434.

Is this a result of ncClass using the rates from the matrix, and dN and dS being in units of substitution/site? If so, which one do I report as dN/dS? Also, the testbranchdNdS.bf file outputs the nsClass1 value and I had been treating this as dN/dS, but I guess that isn't correct?

thanks,
Scott
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: more on dnds treees
Reply #13 - Apr 26th, 2007 at 8:00pm
 
Dear Scott,

Use the nsRate for dN/dS. Taking the ratio of dN and dS reported from the sequence is an approximation (since we must approximate the numbers of syn and non-syn sites). Codon models directly take care of syn and non-syn mutability of codons, uncertain ancestral states etc.

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


I love YaBB 1G - SP1!

Posts: 7
Re: more on dnds treees
Reply #14 - Apr 26th, 2007 at 8:48pm
 
Thanks for your help. I probably should have read the Muse MBE paper before asking the question...

HYPHY is great! You guys have done an amazing job with this software. I'm now using it for about 10 different analyses, all of which would be impossible without it.

Scott
Back to top
 
 
IP Logged