HyPhy message board | |
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl
Methodology Questions >> How to >> Calculating positive/negative selection http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl?num=1259669865 Message started by davidtb on Dec 1st, 2009 at 4:17am |
Title: Calculating positive/negative selection Post by davidtb on Dec 1st, 2009 at 4:17am
Hi,
I am very new at phylogenies analysis and using HyPhy; so, I apologise in advance for the naivety (and possible non-sense) of my questions. I need to analise if some residues in a set of proteins are evolving under positive/negative selection. I aligned the cDNAs and generated the trees. As I have few sequences per alignment, I am using REL (dBdSRateAnalysis.bf). After that, I saw that I can select positively selected codons using dNdSResultProcessor.bf but I couldn't find any template to determine the negatively selected codons. In addition, I am not sure of understanding correctly the output. Is Log[BF{NS/S>1|s}] the ln of the Bayes Factor? Is this number the same as P[NS/S>1|s]? Could I use P[NS/S<=1|s] to find the negatively selected codons? Many thanks. David |
Title: Re: Calculating positive/negative selection Post by davidtb on Dec 2nd, 2009 at 4:09am
Dear Sergei,
Thanks for your answer. I continue on having problems with understanding the output (probably due to my lack of statistical expertise). I have used the flu example to do some tests. I observed that the Log[BF{NS/S>1|s}] value of the positively selected sites is the same as their P[NS/S>1|s]. As you said that the former is the natural logarithm of the Bayes Factor, whereas the other is the Posterior Probability (used to calculate the BF), shouldn't this values be different? Sorry for the naivety of my questions. Best, David |
Title: Re: Calculating positive/negative selection Post by davidtb on Dec 2nd, 2009 at 7:40am
Dear Sergei,
I included all the options in the attached .bf file. I used the Flu alignment from your website and I inferred the tree using HyPhy. This is a detail of the output when using "Positive Selection": Codon P[NS/S>1|s] P[NS/S<=1|s] 1 0 2.51214 2 0 1.73459 3 1.57905 0 4 0 2.08207 5 0 1.71434 6 0 1.35117 7 0 1.35117 8 5.05474 0 9 0 1.85867 This is a detail of the output when using "Find Positively Selected Sites": Counter Site Index Log[BF{NS/S>1|s}] 1 8 5.05474 2 10 4.40309 3 11 8.00546 4 12 4.29289 5 21 4.75764 6 69 7.70401 7 100 7.58658 8 102 7.84679 9 110 4.54851 When running the same dataset on datamonkey, I got slightly different results in terms of selected positions (I suppose that the options are not the same I used in HyPhy). Looking at the HTML report, I see that all posterior probabilities are <= 1 and that P{dN>dS}+P{dN<dS} = 1. Finally, Bayes Factors are different to posterior probabilities. Many thanks for your help. Cheers, David |
Title: Re: Calculating positive/negative selection Post by Sergei on Dec 2nd, 2009 at 10:01am
Dear David,
The analysis incorrectly labels log(BF) columns with PS[NS>S|s], but it reports the log of BF. I'll fix the problem in the next code update. Thanks for pointing out the error. Best, Sergei |
Title: Re: Calculating positive/negative selection Post by davidtb on Dec 2nd, 2009 at 10:36am
Dear Sergei.
Then, can I assume that the other column (P[NS/S<=1|s]) is the ln(BF) of being negatively selected? Is this right or I am wrong? All the best, David |
Title: Re: Calculating positive/negative selection Post by Sergei on Dec 2nd, 2009 at 11:14am
Dear David,
You are correct - the other column is the Log (BF) for negative selection. Sergei |
HyPhy message board » Powered by YaBB 2.5.2! YaBB Forum Software © 2000-2024. All Rights Reserved. |