HyPhy message board | |
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl
HYPHY Package >> HyPhy feedback >> Getting dS and dN out of NielsenYang.bf http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl?num=1337133739 Message started by Dan Fulop on May 15th, 2012 at 7:02pm |
Title: Getting dS and dN out of NielsenYang.bf Post by Dan Fulop on May 15th, 2012 at 7:02pm
Hi HyPhy community,
I am trying to hack NielsenYang.bf to return certain parameters. Specifically, I want to not only get out the dN/dS rate, but also the dN and dS separately. I think specifying certain elements in distrInfo[][] will get me these two rates, but I don't know which numbers to put into each square bracket. By the way, I am running NielsenYang.bf only with model 0, i.e. single rate. Thanks in advance for your help! Dan Fulop. |
Title: Re: Getting dS and dN out of NielsenYang.bf Post by Dan Fulop on May 16th, 2012 at 3:56pm
So, I was able to get several numbers out of res[][]. res[0][0] and res[0][2] seem like they're rates. Are they dS1 and dS2? And, for genes that only have evidence of a single dS only res[0][0] has a value different than zero?
|
Title: Re: Getting dS and dN out of NielsenYang.bf Post by Dan Fulop on May 26th, 2012 at 2:56pm
Hi Sergei,
In the end I got dS from a script that does essentially the same thing as dSdN.bf I got the dN/dS single rate estimate for each gene with model M0 of NielsenYang.bf. This estimate proved to be more conservative than that of the simpler method akin to dSdN.bf. This is important because many of my alignments have very few substitutions and I thus get some genes with wildly high dN/dS estimates. In the end I'm filtering out any gene with less than a given number of synonymous substitutions. Finally, I calculated dN from the above two estimates. Cheers, Dan. |
Title: Re: Getting dS and dN out of NielsenYang.bf Post by Dan Fulop on Jun 4th, 2012 at 7:09am
Hi Sergei,
Thank you so much for the feedback. I see, one is a distance method and the other a ML method. So, I'll use the dN and dS estimates from the WrapDNDS.bf script (code copied below) and the dN/dS estimates from NielsenYang.bf . I will make sure to mention that difference in these estimates. Is there, though, a fully ML way to get single rate dN and dS? Thanks, Dan. WrapDNDS.bf code: LoadFunctionLibrary ("AnalyzeCodonData", dOptions2); LoadFunctionLibrary ("post_dNdS", {"00":"Display"}); GLOBAL_FPRINTF_REDIRECT = ""; sum = 0; synSubsAVL ["addValues"][""]; dS = sum; sum = 0; nsSubsAVL ["addValues"][""]; dN = sum; // Enter values in associative array RatesRetVal["dS"] = dS; RatesRetVal["dN"] = dN; |
Title: Re: Getting dS and dN out of NielsenYang.bf Post by Dan Fulop on Jun 4th, 2012 at 7:22am
By the way, the associative array of options that is input into WrapDNDS.bf is:
dOptions2 = {}; dOptions2["00"] = "Universal"; dOptions2["01"] = inputFilePath; dOptions2["02"] = "MG94CUSTOMCF3X4"; dOptions2["03"] = "Global"; dOptions2["04"] = modelString; dOptions2["05"] = PATH_TO_CURRENT_BF + "6sppTree.tre"; dOptions2["06"] = "Estimate"; Thanks, Dan. |
HyPhy message board » Powered by YaBB 2.5.2! YaBB Forum Software © 2000-2024. All Rights Reserved. |