Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
scripting slac/rel/fel analyses (Read 4977 times)
dmerl
YaBB Newbies
*
Offline



Posts: 15
scripting slac/rel/fel analyses
Apr 11th, 2005 at 9:12pm
 
very slick software.  couple questions:

is there a way to write a batch file to automate the analyses provided in QuickSelectionDetection.bf?

Also, what is interpretation of the dn/ds bias parameter? is this described somewhere?

many thanks,
dan
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: scripting slac/rel/fel analyses
Reply #1 - Apr 12th, 2005 at 12:21am
 
Dear Dan,

Quote:
very slick software.  couple questions:


Thanks Smiley

Quote:
is there a way to write a batch file to automate the analyses provided in QuickSelectionDetection.bf?


Yes; but it involves either writing shell scripts (to pipe input into the text-based version of HyPhy), or doing a bit of scripting in the HyPhy batch language. I have quite a few scripts from the time Simon and I were doing simulations for Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login Login, which may or may not be useful to you. I will be able to give a more helpful answer if you describe the specific workflow you need to automate.

Quote:
Also, what is interpretation of the dn/ds bias parameter? is this described somewhere?


I am pretty sure it is just the standard dN/dS ratio; where is this parameter reported? If it's not in the paper I linked above, it should have been:)

Cheers,
Sergei
Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged
 
dmerl
YaBB Newbies
*
Offline



Posts: 15
Re: scripting slac/rel/fel analyses
Reply #2 - Apr 12th, 2005 at 10:13am
 
the type of workflow I have in mind involves setting up, for example, SLAC/REL/FEL analyses for several different alignments.  I anticipate the FEL analyses will take a while, so I would like to be able to queue everything using some sort of script, rather than dealing with each alignment, one at a time, with the GUI.   a unix shell script would be fine, I just didn't know how to provide parameter values to the QuickSelectionDetection.bf script that way.

The dN/dS bias parameter I'm asking about is requested after specifying the file in which to save the nucleotide model fit.  The options are "neutral" "user" "estimate" "estimate+CI" "estimate dN/dS only".  After rereading the paper, I think that this must be some sort of average dN/dS ratio for the whole alignment, estimated when fitting a single-w MG94*HKY85 (as described on pages 6-7 of "not so different...").  Is that right?

best,
dan
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: scripting slac/rel/fel analyses
Reply #3 - Apr 12th, 2005 at 10:49am
 
Dear Dan,

Quote:
the type of workflow I have in mind involves setting up, for example, SLAC/REL/FEL analyses for several different alignments.  I anticipate the FEL analyses will take a while, so I would like to be able to queue everything using some sort of script, rather than dealing with each alignment, one at a time, with the GUI.   a unix shell script would be fine, I just didn't know how to provide parameter values to the QuickSelectionDetection.bf script that way.


The easiest way to do it is to simply make a text file with all a separate line for each analysis option and the pipe it into HyPhy.

For example include this command in the script presuming that there is a file called "myinfile" with a series of responses to all the prompts that an analysis makes.

`./HYPHYMP CPU=2 < myinfile > /dev/null`

You can make an infile by running HyPhy from the console, and recording the inputs you make. When processing multiple files you could then have a shell script scan the directory for files and substitute input (and output) file names in automatically generates myinfiles. This is klugdy but fast and straightforward.

Quote:
The dN/dS bias parameter I'm asking about is requested after specifying the file in which to save the nucleotide model fit.  The options are "neutral" "user" "estimate" "estimate+CI" "estimate dN/dS only".  After rereading the paper, I think that this must be some sort of average dN/dS ratio for the whole alignment, estimated when fitting a single-w MG94*HKY85 (as described on pages 6-7 of "not so different...").  Is that right?


Essentially it is indeed an "average" dN/dS estimated using MG94 x whatever model. This parameter is only really meaningful for counting methods, because FEL estimates dN/dS independently for each site, and REL is a separate analysis altogether and estimates the distribution of dN/dS from the data. FEL analyses still estimate average dN/dS but it is merely for reference purposes and not used for inference of selection. User options mean the following:

  • Neutral Do not estimate dN/dS, but set it to 1
  • User Do not estimate dN/dS, use the value entered by the user
  • Estimate dN/dS is estimated from the data along with the tree expansion/contraction factor (as discusses in the paper)
  • Estimate+CI Same as previous, PLUS 95% profile likelihood confidence interval is computed for dN/dS
  • Estimate dN/dS only dN/dS is estimated from the data along and branch lengths are taken verbatim from an appropriate nucleotide fit. This option is best for FEL, because FEL will compute branch adjustment factors for each site automatically.


HTH,
Sergei
Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged
 
dmerl
YaBB Newbies
*
Offline



Posts: 15
Re: scripting slac/rel/fel analyses
Reply #4 - Apr 12th, 2005 at 11:01am
 
Got it - I was confused because HYPHY asks how to estimate this dN/dS parameter before asking which type of analysis you want to use, and I didn't understand why the REL or FEL methods needed an average dN/dS ratio.

also thanks for the tips on the shell scripting.  kludgy and straightforward is just my style Smiley

best,
Dan
Back to top
 
 
IP Logged
 
dmerl
YaBB Newbies
*
Offline



Posts: 15
Re: scripting slac/rel/fel analyses
Reply #5 - Apr 13th, 2005 at 8:19am
 
Quote:
Dear Dan,

`./HYPHYMP CPU=2 < myinfile > /dev/null`



one more question - does the CPU=2 argument tell HYPHYMP to make use of 2 processors?   Can you set the CPU argument to something less than the total number of processors on a multi-processor machine?

thanks again,
Dan
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: scripting slac/rel/fel analyses
Reply #6 - Apr 13th, 2005 at 10:28am
 
Dear Dan,

Quote:
one more question - does the CPU=2 argument tell HYPHYMP to make use of 2 processors?   Can you set the CPU argument to something less than the total number of processors on a multi-processor machine?



CPU=x tells HyPhy to spawn x threads for likelihood evalutations (when it can). If you have x processors, then kernel schedulers will usually put a thread on its own processor.

Hence, you can indeed specify less (or more) threads on the command line than there are physical CPUs.

Also, this flag only works with the MP (or MP2) build of HyPhy.

Cheers,
Sergei
Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged