HyPhy message board
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl
HYPHY Package >> Feature Additions >> something a la Branch-site (or better)
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl?num=1149614774

Message started by Leon on Jun 6th, 2006 at 10:26am

Title: something a la Branch-site (or better)
Post by Leon on Jun 6th, 2006 at 10:26am


 Hi Sergei,

 A few months ago you suggested that if an analysis along the lines of PAMLīs "branch-site" analysis was needed you could perhaps code it. Iīve been using the subtree-selection batch file and the genetic algorithm for allocation of dn/ds to each branch but i think it would be neat to also have the branch-site, at least for comparison. Would it be too much of an imposition to ask for it? If you donīt have the time I could do it but iīm an absolute hyphy batch language newbie, so i would need some very serious pointers (but it would be a good way to learn!).

  Thanks a lot.

  Leon

Title: Re: something a la Branch-site (or better)
Post by Sergei on Jun 6th, 2006 at 11:59am
Dear Leon,

I did implement the Yang Nielsen (2005 version) branch-site models in the following batch file:

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

I checked it on one of the example files in the paper, and the results agreed.
The analysis doesn't do BEB or doesn't directly identify sites under selection, although it does output posterior probabilities of each site's belonging to a given rate class.

Give it a try and let me know what happens.

Cheers,
Sergei


Title: Re: something a la Branch-site (or better)
Post by Leon on Jun 13th, 2006 at 6:11pm

  Ok, the first resultas are just in:

  I ran the YangNielsenBranchSite.bf file on a 49 sequences alignment thatīs 576 sites long. Ichose option (1) for model choice ("Fit Model A with 4 rate classes. Class 1: Negative selection in FG and BG. Class 2: Neutral evolution in FG and BG. Class 3: Negative selection in BG, Positive in FG. Class 4: Neutral evolution in BG, Positive in FG") and after awhile got the following message:

Error:
Memory Full Exiting...
Current BL Command:Choice List for Choose the foreground branch with choice list:NO_SKIP. Store result
in stOption

This happened on a redhat7.1/pentium 4 system, with the single processor version of HyPhy (I probably should have tried a mpi version but I havenīt quite set that up yet).

 I tried a similar analysis (but with a bigger dataset) on a 800MHz/PowerPC G4/ 256 MB SDRAM/ eMac running Mac Os X 10.4.6 and itīs been three days since the progress bar announces "LF Optimization. Value=27640.9" and "99%" (this one I ran under the GUI). Maybe itīs time I put that process out of its misery?

 is there something I can tweak to get to the end of the analysis? It looks like itīs running out of memory, right?

 I can send you the data files if thatīll help.

  Thanks a lot!

  Leon


Title: Re: something a la Branch-site (or better)
Post by Sergei on Jun 13th, 2006 at 8:49pm
Dear Leon,

Not sure why the RedHat system dies with that error message; let me take a look at the file and get back to you.

Some of the Branch-site models take a really long time to converge, so  the G4 is probably still chugging away - try to let it finish.

Cheers,
Sergei

Title: Re: something a la Branch-site (or better)
Post by Leon on Jul 10th, 2006 at 2:31pm

 Hi Sergei,

 Preliminary results for YangNielsenBranchSite2005.bf look good but now I donīt know how to produce the tables with the selective categories each position belongs to. I seem to remember that on the GUI version I'd simply choose "analysis:results: variance estimates" once the first results were displayed (the ones with the likelihood of a given hypothesis), but I'm not sure how to do that with command-line version . Also, can I perform the post analyses (the variance estimation or whichever one needs to be performed in order to get the tables for the sites and their categories) from results stored a while ago (i.e., can hyphy read the likelihood results and compute the post analyses without having to repeat the whole analysis? ) :-[

  Thanks!

  Leon

Title: Re: something a la Branch-site (or better)
Post by Sergei on Jul 10th, 2006 at 3:05pm
Dear Leon,

If you start up the command line version with the -p flag, you'll see a list of post-processing options at the end of an analysis. You may also be able to process previously saved results, if those results are the likelihood function state (complete state, not just an analysis output). Those will be NEXUS files with long HYPHY blocks at the end and are typically written by a 'Save Likelihood Function State' option in the post-processing modules for 'Save Results' or directly by some analyses (e.g. NielsenYang.bf). You can save any likelihood function to a file using the following code in your batch files:


Code (]

LIKELIHOOD_FUNCTION_OUTPUT = 7;
fprintf ("file_to_save_to", CLEAR_FILE, likelihood_function_id);

[/code):




In that case you can call
[code]
$HYPHYMP -p savedfile

and then use post-processing modules.

YangNielsenBranchSite2005.bf computes posterior probabilities of each site's belonging to a given class, but doesn't save it to a file (instead, a GUI table is opened). You can modify the analysis to write out the matrix 'posteriorMatrix' at the end of the file (or a comma separated version there of), or work on it directly. Alternatively, you can save the likelihood function from YangNielsenBranchSite2005.bf as described above, open it in a GUI version of HyPhy and then use the likelihood parameter table to perform empirical Bayes analyses.

Let me know if this makes sense/helps in any way.

Best,
Sergei



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