Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
Automating dN and dS branch length estimates (Read 2671 times)
sloan
YaBB Newbies
*
Offline


Curious HyPhy user

Posts: 2
Automating dN and dS branch length estimates
Mar 20th, 2012 at 1:53pm
 
Hi,

I am interested in using HyPhy to estimate dN and dS branch length across a relatively large number of genes (hundreds to thousands).

By using the GUI, I am able to get the type of estimate I would want in the following fashion for a single gene alignment.

>> Analysis > Standard Analyses… > Basic Analysis > AnalyzeCodonData.bf

>> Respond to the command prompts to provide input files and specify options [Universal Genetic Code, MG94CUSTOMCF3X4, Global, HKY85, Estimate branch lengths]

>> Analysis > Results > Syn and non-syn trees


I would like to automate this analysis so it could run from the command line on many alignments with a predefined set of options. I have made an attempt to cobble together some of the relevant code (e.g., from AnalyzeCodonData.bf, MG94xHKY85x3_4.mdl, post_sns.bf, etc.), but unfortunately I am new to HyPhy and find that I am struggling with the batch language and some of the variables/functions that connect these scripts.

I was wondering if there might be an easier or already-established way to automate the "basic" analyses. I would greatly appreciate any advice.

I am running HyPhy v2.10 on Mac OS 10.6. I have the GUI version as well as the command line version compiled from source.

Thanks!
Dan
Back to top
 
 
IP Logged
 
Joel
YaBB Newbies
*
Offline


Feed your monkey!

Posts: 4
Re: Automating dN and dS branch length estimates
Reply #1 - Mar 20th, 2012 at 4:57pm
 
Hi Dan,

The easiest way to automate basic analyses in HyPhy is use an input redirect batch file. You can write a short script to produce and run the batch file. You just need to determine which commands to give HYPHY, and in which order, once by using the interactive command-line interface. Here is an example of the format for an input redirect file:

inputRedirect = {};

inputRedirect["00"]="Universal";
inputRedirect["01"]="INPUTFILE";
inputRedirect["02"]="Y";
inputRedirect["03"]="All Branches";
inputRedirect["04"]="";
inputRedirect["05"]="OUTPUT_FILE";

ExecuteAFile ("TEMPLATEBATCHFILE.bf", inputRedirect);

Now that the easy stuff is out of the way, I am wondering what do you mean by dN and dS branch lengths? Are you interested in estimating dN and dS along the branches in your phylogeny? Are you looking for evidence of selection along branches? Or, are you interested in estimating branch lengths under a model that accounts for variation in dN and dS? I can offer advice on each, I just need to know what you'd like to do.

Cheers,
Joel
Back to top
 
 
IP Logged
 
sloan
YaBB Newbies
*
Offline


Curious HyPhy user

Posts: 2
Re: Automating dN and dS branch length estimates
Reply #2 - Mar 21st, 2012 at 3:07pm
 
Thanks Joel. That was easy and just what I was looking for. Much appreciated!

In response to your question, right now I am simply interested in getting an estimate of dN and dS for each branch (or a simple pairwise estimate of dN and dS in some 2-taxa cases). I am looking at sequence divergence in bacterial genomes with extreme nucleotide composition bias (GC < 15%). I wanted to try out HyPhy, because the low GC content seemed to be having weird effects on dN and dS estimates in PAML. I figured the greater flexibility for specifying models of evolution would help me get a sense of what's going on. At the very least, your advice gets me started. Thanks again.

cheers,
Dan
Back to top
 
 
IP Logged