BioContainers / specs

BioContainers specifications
http://biocontainers.pro
Apache License 2.0
49 stars 12 forks source link

DeNovoGUI #45

Closed prvst closed 8 years ago

prvst commented 8 years ago

Currently not working:

Command line: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java -splash:resources/conf/denovogui-splash.png -Xms128M -Xmx4096M -cp /home/biodocker/bin/DeNovoGUI-1.5.2/DeNovoGUI-1.5.2.jar com.compomics.denovogui.gui.DeNovoGUI

Exception in thread "main" java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it. at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207) at java.awt.Window.(Window.java:535) at java.awt.Frame.(Frame.java:420) at java.awt.Frame.(Frame.java:385) at javax.swing.JFrame.(JFrame.java:174) at com.compomics.denovogui.gui.DeNovoGUI.(DeNovoGUI.java:222) at com.compomics.denovogui.gui.DeNovoGUI.main(DeNovoGUI.java:2022) Process exitValue: 1

Unknown error: exception in thread "main" java.awt.headlessexception: no x11 display variable was set, but this program performed an operation which requires it. at java.awt.graphicsenvironment.checkheadless(graphicsenvironment.java:207) at java.awt.window.(window.java:535) at java.awt.frame.(frame.java:420) at java.awt.frame.(frame.java:385) at javax.swing.jframe.(jframe.java:174) at com.compomics.denovogui.gui.denovogui.(denovogui.java:222) at com.compomics.denovogui.gui.denovogui.main(denovogui.java:2022) java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it. at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207) at java.awt.Window.(Window.java:535) at java.awt.Frame.(Frame.java:420) at java.awt.Frame.(Frame.java:385) at javax.swing.SwingUtilities$SharedOwnerFrame.(SwingUtilities.java:1756) at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1831) at javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1697) at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:863) at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:667) at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:638) at com.compomics.software.CompomicsWrapper.launch(CompomicsWrapper.java:360) at com.compomics.software.CompomicsWrapper.launchTool(CompomicsWrapper.java:154) at com.compomics.denovogui.DeNovoGUIWrapper.(DeNovoGUIWrapper.java:66) at com.compomics.denovogui.DeNovoGUIZipFileChecker.(DeNovoGUIZipFileChecker.java:61) at com.compomics.denovogui.DeNovoGUIZipFileChecker.main(DeNovoGUIZipFileChecker.java:71)

ypriverol commented 8 years ago

@prvst @hbarsnes Is this issue solve?

hbarsnes commented 8 years ago

@prvst @hbarsnes Is this issue solve?

I think so. Please update to the latest DeNovoGUI version (v1.10.4) to check. As you're using a version from almost a year ago.

ypriverol commented 8 years ago

@hbarsnes can you do that. We are moving forward some of the containers for the publication and also the presentation in the ASMS. BTW do you have the link of the publication in google?

prvst commented 8 years ago

I just added the latest deNovoGUi bin to the archive and then I created a new Dockerfile for it

When I run the following command: docker run biodckr/denovogui /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java -splash:resources/conf/denovogui-splash.png -Xms128M -Xmx4096M -cp /home/biodocker/bin/DeNovoGUI-1.5.2/DeNovoGUI-1.5.2.jar com.compomics.denovogui.gui.DeNovoGUI

I get the following message:

Error: Could not find or load main class com.compomics.denovogui.gui.DeNovoGUI

hbarsnes commented 8 years ago

BTW do you have the link of the publication in google?

Which publication are you referring to, the DeNovoGUI one? If so, you can find it here: http://www.ncbi.nlm.nih.gov/pubmed/24295440.

Error: Could not find or load main class com.compomics.denovogui.gui.DeNovoGUI

Using just "java -cp DeNovoGUI-1.11.0-beta.jar com.compomics.denovogui.gui.DeNovoGUI" works fine on my side if I'm in the same folder as the jar file. Using the complete path also works fine. So assume it's a problem with the "/home/biodocker/bin/DeNovoGUI-1.5.2/DeNovoGUI-1.5.2.jar" path?

ypriverol commented 8 years ago

@hbarsnes I'm talking about the current BioDocker publication, I will send you an invitation by email. @prvst How did you install the container? can you help @hbarsnes to install properly the content. @hbarsnes the idea is that in the future the developers maintain their own containers and help the users to use them.

prvst commented 8 years ago

@ypriverol @hbarsnes Download / git clone the repository containing the Dockerfile. You can work on the file to make the changes then just run docker build -t biodckr/denovogui . . Always run this on the same folder with the Dockerfile

prvst commented 8 years ago

@hbarsnes, @ypriverol I added a ENV DIsplay:0 to the Dockerfile, then I ran:

docker run biodckr/denovogui java -Xms128M -Xmx4096M -cp /home/biodocker/bin/DeNovoGUI-1.10.4/DeNovoGUI-1.10.4.jar com.compomics.denovogui.gui.DeNovoGUI

and I got this:

Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable. at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65) at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:110) at java.security.AccessController.doPrivileged(Native Method) at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:74) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:195) at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:81) at sun.awt.X11.XToolkit.(XToolkit.java:120) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:195) at java.awt.Toolkit$2.run(Toolkit.java:869) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:861) at sun.swing.SwingUtilities2.getSystemMnemonicKeyMask(SwingUtilities2.java:1928) at javax.swing.plaf.basic.BasicLookAndFeel.initComponentDefaults(BasicLookAndFeel.java:752) at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookAndFeel.java:434) at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:148) at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1589) at javax.swing.UIManager.setLookAndFeel(UIManager.java:536) at javax.swing.UIManager.setLookAndFeel(UIManager.java:576) at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1345) at javax.swing.UIManager.initialize(UIManager.java:1455) at javax.swing.UIManager.maybeInitialize(UIManager.java:1422) at javax.swing.UIManager.getInstalledLookAndFeels(UIManager.java:416) at com.compomics.util.gui.UtilitiesGUIDefaults.setLookAndFeel(UtilitiesGUIDefaults.java:32) at com.compomics.denovogui.gui.DeNovoGUI.main(DeNovoGUI.java:2188)

Last time I checked, the same thing was happening with SearchGUI

hbarsnes commented 8 years ago

@prvst @ypriverol If you run DeNovoGUI (or SearchGUI) in GUI mode you need an environment that support graphical components. I have very little experience with X11 and its errors though, so I'm afraid I cannot be of much help interpreting the above error. The code works fine if run on a "normal" Linux setup though.

mvaudel commented 8 years ago

I think the main use case of containers would be command line to create projects and integrate tools in pipelines. The results can be subsequently downloaded and visualized on a desktop machine. At least for a first step if you get the CLI to run that is more than enough :)

ypriverol commented 8 years ago

I agree, but if this is the case them we need to define @prvst a way that let the users know that this is only command line option. We have the same problem in other containers like OpenMS containers.

mvaudel commented 8 years ago

yup, is that a general UI problem or just on some applications?

prvst commented 8 years ago

@ypriverol @mvaudel @hbarsnes

I have some really cool news, I found out how to run it! I just did a complete analysis from data loading to saving, using DeNovoGUI, running Novor. The entire process was made by tunneling the GUI from inside the container to my host desktop.

here is the command you need to run:

docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /data/felipevl/projects/h2s/:/data/ biodckr/dnvgui java -jar /home/biodocker/bin/DeNovoGUI-1.10.4/DeNovoGUI-1.10.4.jar

The secret here is to share the X11 configuration from the host into the container, so for that we need two -v parameters on the execution string, one for the X11 settings and the other for our files. Also, the container needs the $DISPLAY env var from host.

This is really cool, but I also agree with @mvaudel about the CLI and the possibility to integrate this component into pipelines.

Now I will test this with SearchGUI.

Just a side note: I'm not sure yet how to run this in a Windows host

mvaudel commented 8 years ago

Wow that was really impressive, you are a magician!

hbarsnes commented 8 years ago

@prvst @ypriverol @mvaudel

I have some really cool news, I found out how to run it!

Great! Should solve the problem for SearchGUI as well I assume (and PeptideShaker if it is included at all?).

ypriverol commented 8 years ago

yes both of them are running now!!

mvaudel commented 8 years ago

Legendary! Very elegant solution!