(no subject)

My name is Charlie Sun and I am a bioinformatics software developer working in NIH-NIAID in united states. I am currently working on a web application project for Papillomavirus genomic resource data. Here is the link to our website:
Pave.niaid.nih.gov

I am adding some analysis tools including MSA to Pave and we decided to use Jalview to visualize the results. One feature requested is generating eps file for download. I installed the Jalview desktop version and tried to run it in the command line mode to generate eps file. Although I works on my local machine – a MBP running OSX 10.7 – but it never works on our web server. It seems like it needs X11 display to be enabled to run. Is there a way we can get around this?

Here is my java code for calling Jalview:

//run jalview to generate eps file
//basic command: java -Djava.ext.dirs=/Applications/Jalview/lib -cp /Applications/Jalview/jalview.jar jalview.bin.Jalview -nodisplay -open ~/bin/ncbi-cobalt-2.0.1/col_fas.out -eps tmp2.eps
String jalview_input = outFile.getAbsolutePath();
String jalview_output = getTmpDir() + “/” + uploadedFileNamePrefix + “.eps”;
cmd = “java -Djava.ext.dirs=” + JALVIEW_BIN_PATH + "/lib -cp " +
JALVIEW_BIN_PATH + "/jalview.jar jalview.bin.Jalview -nodisplay -open "+ jalview_input + " -eps " + jalview_output;

System.out.println("###############Jalview CMD: " + cmd);
Process ls2_proc = Runtime.getRuntime().exec(cmd);

Worker worker = new Worker(ls2_proc);
worker.start();
worker.join(5000);

if (worker.exit == null){
worker.interrupt();
Thread.currentThread().interrupt();
ls2_proc.destroy();
}

Please note that I set up a timeout to kill the process because jalview never exits after eps conversion is done.

I tried InstallAnywhere 2.8 release and development build.

Any help or suggestions will be appreciated.

By the way, if you are still looking for grant renew support letter I can talk to my project manager to provide an official one.

Thanks,

Charlie Sun

···

Qiang(Charlie) Sun

Contractor - MSC, Inc.

Senior Software Developer

Bioinformatics Software Development Section

Bioinformatics and Computational Biosciences Branch (BCBB)

OCICB/OSMO/OD/NIAID/NIH

31 Center Drive, Room 3B62

Bethesda, MD 20892

Mobile: 2404410620

Office: 301-496-2498

http://bioinformatics.niaid.nih.gov [http://bioinformatics.niaid.nih.gov/(Within](http://bioinformatics.niaid.nih.gov/(Within) NIH)

http://exon.niaid.nih.gov (Public)

Hi Charlie, thanks for the email - and sorry you had to fight to post to the list.

I am adding some analysis tools including MSA to Pave and we decided to use Jalview to visualize the results. One feature requested is generating eps file for download. I installed the Jalview desktop version and tried to run it in the command line mode to generate eps file. Although I works on my local machine – a MBP running OSX 10.7 – but it never works on our web server. It seems like it needs X11 display to be enabled to run. Is there a way we can get around this?

I'm afraid Jalview does need X on the server, since it relies on the X11 font libraries to render the alignment. However, you shoudn't need an X session active if the '-nodisplay' option is used. We also recommend you set 'java.awt.headless' to true in the system properties.. e.g.:

java -Djava.awt.headless=true .. jalview.bin.Jalview -nodisplay -open ...

This magic command line will also ensure that Jalview quits after generating the EPS, and is also documented in the FAQ (http://www.jalview.org/faq#server). The reason for this is that although Jalview tries to set the java.awt.headless flag when it gets the -nodisplay argument, on some JVMs we found that X was still required unless the property was set by the java binary.

However, I did find another bug in Jalview which will prevent you using it on the server. This is documented at http://issues.jalview.org/browse/JAL-1315 and is now patched in the latest builds over at http://www.jalview.org/development/development-builds

Hope this helps - and let me know if it doesn't!
Jim.

ps. Any support letters would be greatly appreciated - please do ask your manager!

···

On 12/06/2013 20:21, Qiang Charlie Sun wrote: