HyPhy message board
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl
HYPHY Package >> Feature Additions >> create batch file from session
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl?num=1115742957

Message started by avilella on May 10th, 2005 at 9:35am

Title: create batch file from session
Post by avilella on May 10th, 2005 at 9:35am
Hi,

maybe this is already available in some sort of way, but I haven't found how yet:

I would like to be able to specify the parameters of some analysis using the GUI or the ncurses-GUI for my data+tree files, and then, before the analysis start, save it to a batch file.

The idea would be then to start the analysis with the specified parameters:
(a) in background (for long analysis)
(b) on a different computer (or cluster)
(c) to run the same batch file for a set of different files, only changing the input files but maintaining the same analysis and parameters.

Comments?

Bests,

   Albert.

Title: Re: create batch file from session
Post by Sergei on May 10th, 2005 at 10:44am
Dear Albert,

All of your suggestions are excellent!


wrote on May 10th, 2005 at 9:35am:
I would like to be able to specify the parameters of some analysis using the GUI or the ncurses-GUI for my data+tree files, and then, before the analysis start, save it to a batch file.


You can do this to an extent. The steps are as follows (assumes a GUI version)

(1). Set up your analysis normally; i.e. Build Likelihood Function but do not Optimize. Click on the little gearwheel button in the console window
Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login Login
to call 'ExportLikelihoodFunction'. When prompted, choose to include the optimize command. This sequence will save a self contained analysis (data, models, tree etc) into a HyPhy batch file.  You can then load this analysis into a GUI or command line version of HyPhy and run the optimization.


Quote:
The idea would be then to start the analysis with the specified parameters:
(a) in background (for long analysis)
(b) on a different computer (or cluster)


If you saved your file to file named 'myFile.bf' you can then call

$HYPHY BASEPATH=path to hyphy myFile.bf -p

Note the -p flag to allow you to invoke result processing modules after the analysis is done (this assumes an interactive run).


Quote:
(c) to run the same batch file for a set of different files, only changing the input files but maintaining the same analysis and parameters.


This is an excellent idea, but currently there is no way to do this generally (for different data/tree/model options) - although this feature IS on my list of things to do...

You might have to write your own batch file or modify an existing one to write a 'Template' analysis (much like the standard analyses in HyPhy are done). If there is anything in particular you want to do, I'll be happy to help you get started.

HTH,
Sergei

Title: Re: create batch file from session
Post by avilella on May 11th, 2005 at 3:37am
For example, I'm interested in the PositiveSelection Analyses, and I would like to have a bf file that already contains the data/models/tree/... and I can run them on background.

I see that TestBranchDNDS.bf asks for rate classes and model designation, but not the previous options (data/tree/...).

   Albert.

Title: Re: create batch file from session
Post by Sergei on May 11th, 2005 at 8:26am
Dear Albert,


wrote on May 11th, 2005 at 3:37am:
For example, I'm interested in the PositiveSelection Analyses, and I would like to have a bf file that already contains the data/models/tree/... and I can run them on background.

I see that TestBranchDNDS.bf asks for rate classes and model designation, but not the previous options (data/tree/...).


If you build a command line version of HyPhy you can always write all the relevant inputs into a text file (one on each line) and then pipe it to HyPhy as in (assuming you are in the HyPhy directory):

$HYPHY  TemplateBatchFiles/TestBranchDNDS.bf < myInFile > myOutFile &

A more tedious way to do this is to make a copy of the batch file you want to pre-define the input for and replace commands:

fscanf (stdin, something, something);

with

fscanf ("myConfigFile", something, something);

where "myConfigFile" contains the input you want to feed the analysis (one entry per line).


HTH,
Sergei

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