HyPhy message board
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl
Methodology Questions >> How to >> Calculating dN and estimating "negative selection"
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl?num=1366789449

Message started by dagarfield on Apr 24th, 2013 at 12:44am

Title: Calculating dN and estimating "negative selection"
Post by dagarfield on Apr 24th, 2013 at 12:44am
Hey folks,

I've been working with relatively simple models of positive selection (the branch-site model of Zhang et. al 2005 and its non-coding equivalent) to contrast coding and non-coding selection as a follow-up to some earlier work by Ralph Haygood and Olivier Fedrigo. As pointed out elsewhere, I probably should phase out these models in favor of more recent ones, but they work well enough for detecting genome-wide patterns, esp. when many alignments are short.

Now, the questions:

1) Using HyPhy, it is straight-forward to get p-values from the model contrasts as well as site-frequency-weighted Omega values for a specific branch as a measure of the strength of selection on a branch. What is not clear to me is how to derive something more simple like dN. As a measure of selection, dN seems to me a problematic one, but many older papers to which I'd like to compare my results use it rather than a formal test for selection. For coding regions, I could count, but there is no countable dN for non-coding regions.

With output that looks like the following (for coding, alternate model), is there anything you might suggest?


Quote:
REPL 4
log_L:-6160.4643423430889015
global omega0=0.7734953444635891;
omega0:<1;
global f_aux=4.523416980580921e-06;
f_aux:<1;
global f0=0;
f0:<1;
global omega2=3.6887710819289;
omega2:>1;
global kappa=0.2613381403107172;
hyphy_tree.dyak.syn_rate=0.413490713825213;
hyphy_tree.dsec.syn_rate=0.2240437703175933;
hyphy_tree.dmel.syn_rate=0.1560377184859193;
hyphy_tree.dsec.t=0.1195718292552295;
hyphy_tree.dyak.t=0.2779202180703129;
hyphy_tree.dmel.t=0.0801202493786467;
global omega_bgrnd:=((codon_class==0)+(codon_class==2))*omega0+(codon_class==1)+(codon_class==3);
global omega_fgrnd:=(codon_class==0)*omega0+(codon_class==1)+((codon_class==2)+(codon_class==3))*omega2;
hyphy_tree.dmel.nonsyn_rate:=omega_fgrnd*hyphy_tree.dmel.syn_rate;
hyphy_tree.dsec.nonsyn_rate:=omega_bgrnd*hyphy_tree.dsec.syn_rate;
hyphy_tree.dyak.nonsyn_rate:=omega_bgrnd*hyphy_tree.dyak.syn_rate;
Tree hyphy_tree=(dyak:0.0412697,dsec:0.0096207,dmel:0.0128978);


2) Is there a standard (widely accepted) HyPhy-approved approach for quantifying negative selection? It seems as though a non-branch-specific codeml-style estimate should work fine, but this is not my main field, and I'd appreciate suggestions (or .bf files!) pointing the right direction.

Thanks so much!

David

Title: Re: Calculating dN and estimating "negative selection"
Post by Sergei on Apr 30th, 2013 at 9:35am
Hi David,

1). dN is basically a function of the nonsyn_rate, kappa, and base frequencies in these types of models. A better explanation can be found on page 14 of Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login Login.
If you have a model defined in your batch file, you can use the example in Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login Login to see how to compute the number of expected syn and non-syn sites, and the function BranchLength (Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login Login) to extract and calculate the branch length expression for your model. Let me know if you get stuck

2). Generally, if you already have a test where dN>dS (or omega>1) indicates positive selection, then the complementary test (dN < dS or omega < 1) could be used to detect negative selection.

Sergei

HyPhy message board » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2024. All Rights Reserved.