HyPhy message board
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl
HYPHY Package >> HyPhy feedback >> scripting slac/rel/fel analyses
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl?num=1113279131

Message started by dmerl on Apr 11th, 2005 at 9:12pm

Title: scripting slac/rel/fel analyses
Post by dmerl on 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

Title: Re: scripting slac/rel/fel analyses
Post by Sergei on Apr 12th, 2005 at 12:21am
Dear Dan,


wrote on Apr 11th, 2005 at 9:12pm:
very slick software.  couple questions:


Thanks :)


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

Title: Re: scripting slac/rel/fel analyses
Post by dmerl on 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

Title: Re: scripting slac/rel/fel analyses
Post by Sergei on Apr 12th, 2005 at 10:49am
Dear Dan,


wrote on 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 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

Title: Re: scripting slac/rel/fel analyses
Post by dmerl on 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 :)

best,
Dan

Title: Re: scripting slac/rel/fel analyses
Post by dmerl on Apr 13th, 2005 at 8:19am

wrote on Apr 12th, 2005 at 10:49am:
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

Title: Re: scripting slac/rel/fel analyses
Post by Sergei on Apr 13th, 2005 at 10:28am
Dear Dan,


wrote on Apr 13th, 2005 at 8:19am:
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

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