Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
create batch file from session (Read 2822 times)
avilella
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 35
create batch file from session
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.
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: create batch file from session
Reply #1 - May 10th, 2005 at 10:44am
 
Dear Albert,

All of your suggestions are excellent!

Quote:
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
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
 
avilella
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 35
Re: create batch file from session
Reply #2 - 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.
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: create batch file from session
Reply #3 - May 11th, 2005 at 8:26am
 
Dear Albert,

Quote:
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
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