Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
command line operation (Read 4853 times)
delta
YaBB Newbies
*
Offline


Feed your monkey!

Posts: 10
command line operation
Feb 9th, 2010 at 1:40pm
 
I want to get command line operation of HyPhy going, so that I can call HyPhy from within another program.

I started by (on a Mac) moving into the HYPHY directory and starting it like this:
HyPhy.app/Contents/MacOS/HyPhy

It starts right up. I was hoping I could specify the name of a batch file as below and it would just take off and do the analysis, but it shows the opening snazzy window "HyPhy: Hypothesis Testing Using Phylogenies" and doesn't proceed beyond that.  Is there a way I can get totally automated operation?

Here's what I tried:
HyPhy.app/Contents/MacOS/HyPhy ../BatchFiles/auto_hyphy4.bf
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: command line operation
Reply #1 - Feb 9th, 2010 at 3:22pm
 
Hi delta,

The app you are trying to open is a GUI version of HyPhy - it does not lend itself to pipeline integration and automation. You need to build a command line version of the program following the simple process outlined in Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login Login

Since you are working on a Mac, you will need to install Apple's Developers tools (which are not installed by default, but are free). To check if you have the tools installed try

Code:
$g++ --version
 



from terminal and if you get an error message (g++ not found), then you need to install the tools.
You can easily find out how to obtain and instaill Apple Developer Tools (aka the XCode suite) by searching the web.

Best,
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
 
delta
YaBB Newbies
*
Offline


Feed your monkey!

Posts: 10
Re: command line operation
Reply #2 - Feb 11th, 2010 at 7:16am
 
Thanks for the pointer.  I followed the instructions from your web page on "Build in Xcode."  When building, I selected "Mac OSX10.5" ('cause I'm running 10.5.8 on my Mac), "Release" and "i386."  However, I got "Invalid value 'com.apple.compilers.llvm.clang.1_0' for GCC_VERSION" in the category of errors marked "Checking Dependencies."

It looks like it failed to build.  I restarted the Mac and tried again, but it still failed.  Any suggestion?
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: command line operation
Reply #3 - Feb 11th, 2010 at 7:18am
 
Dear delta,

The CLANG compiler is only available in 10.6, plus building the XCode project will only result in a GUI application you already have. Follow the instructions for building the command line version for Linux/Unix
(it has svn commands).

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
 
delta
YaBB Newbies
*
Offline


Feed your monkey!

Posts: 10
Re: command line operation
Reply #4 - Feb 11th, 2010 at 8:07am
 
Well, I've now done the svn build, without too many errors being generated.  Assuming I've got it built correctly, how would I run the command line version?
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: command line operation
Reply #5 - Feb 11th, 2010 at 12:23pm
 
Dear Delta,

There should be no errors; otherwise there are no binaries.
When you do an SVN checkout, a 'hyphy' directory will be created. If your build succeeded, there there should now be a hyphy/HYPHY directory, and within it - a HYPHYMP binary. You can run it by typing (here I assume that /path/to/hyphy is replaced with the absolute path to the HyPhy directory you can call

Code:
$/path/to/hyphy/HYPHY/HYPHYMP BASEPATH=/path/to/hyphy/HYPHY/ USEPATH=/dev/null yourfile.bf

 



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
 
delta
YaBB Newbies
*
Offline


Feed your monkey!

Posts: 10
Re: command line operation
Reply #6 - Feb 11th, 2010 at 1:23pm
 
Here's the error I'm getting during compilation:

Code:
Building batchlan.cpp
batchlan.cpp: In member function ‘void _ElementaryCommand::ExecuteCase37(_ExecutionList&)’:
batchlan.cpp:5863: error: ‘sID’ was not declared in this scope
batchlan.cpp:5864: error: ‘class Bgm’ has no member named ‘GetStructure’
batchlan.cpp:5866: error: ‘class Bgm’ has no member named ‘GetNodeOrder’
Error during compilation
 



We tried compiling it on our SunOS server and got exactly the same error.

Any suggestion?
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: command line operation
Reply #7 - Feb 11th, 2010 at 3:09pm
 
Hi delta,

There was a bug in the code committed by me to SVN overnight; please do the following

Code:
$cd /path/to/hyphy
$svn update
 



and then rerun the build scripts.

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
 
delta
YaBB Newbies
*
Offline


Feed your monkey!

Posts: 10
Re: command line operation
Reply #8 - Feb 12th, 2010 at 11:38am
 
Thanks, Sergei.  We got it running now on our SunOS server.

The server has multiple processors, but it appears to be using only one.  Can I get it to run faster by using several?
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: command line operation
Reply #9 - Feb 12th, 2010 at 2:33pm
 
delta wrote on Feb 12th, 2010 at 11:38am:
Thanks, Sergei.  We got it running now on our SunOS server.

The server has multiple processors, but it appears to be using only one.  Can I get it to run faster by using several?


Depends on the analysis. FEL can be accelerated by using running HYPHY (compiled with the MPI flag, i.e. via Code:
sh build.sh MPI 

) in an MPI environment. Generally, you can also try to specify CPU=N on the command line to ask HyPhy to use up to N CPUs when it can.

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