NationalGenomicsInfrastructure / piper

A genomics pipeline build on top of the GATK Queue framework
9 stars 9 forks source link

Qulimap dies without reporting non-zero exit status back to piper #9

Closed johandahlberg closed 9 years ago

johandahlberg commented 10 years ago

When piper runs qualimap with e.g. this commandline:

/proj/a2009002/piper_resources/programs/qualimap_v1.0/qualimap  --java-mem-size=64G  bamqc  -bam /apus/v1/a2010002_nobackup/vezzi/ANALYSIS/<project>_14_01/pipeline_output/raw_alignments/P1142_101.BC423WACXX.P1142_101.1.bam --paint-chromosome-limits  -outdir /apus/v1/a2010002_nobackup/vezzi/ANALYSIS/<project>_14_01/pipeline_output/preliminary_alignment_qc/P1142_101.BC423WACXX.P1142_101.1.qc/ -nt 8 &> /apus/v1/a2010002_nobackup/vezzi/ANALYSIS/<project>_14_01/pipeline_output/preliminary_alignment_qc/P1142_101.BC423WACXX.P1142_101.1.qc.log

It fails with the following error message:

Java memory size is set to 64G
Launching application...

QualiMap v.1.0
Built on 2014-05-29 11:34

Selected tool: bamqc
Available memory (Mb): 32
Max memory (Mb): 61084
Starting bam qc....
Loading sam header...
Loading locator...
Loading reference...
Number of windows: 400, effective number of windows: 483
Chunk of reads size: 1000
Number of threads: 8
Processed 50 out of 483 windows...
Processed 100 out of 483 windows...
Processed 150 out of 483 windows...
Processed 200 out of 483 windows...
Processed 250 out of 483 windows...
Processed 300 out of 483 windows...
Processed 350 out of 483 windows...
Processed 400 out of 483 windows...
Processed 450 out of 483 windows...
Total processed windows:483
Number of reads: 347974977
Number of valid reads: 343615133
Number of duplicated reads: 0
Number of correct strand reads:0

Inside of regions...
Num mapped reads: 343615133
Num mapped first of pair: 172096058
Num mapped second of pair: 171519075
Num singletons: 857131
Time taken to analyze reads: 1576
Computing descriptors...
numberOfMappedBases: 34249112539
referenceSize: 3101804739
numberOfSequencedBases: 34234425236
numberOfAs: 10195276274
Computing per chromosome statistics...
Computing histograms...
Overall analysis time: 1722
end of bam qc
Computing report...
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using 'localhost:10.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.<clinit>(X11GraphicsEnvironment.java:74)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:190)
    at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102)
    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:81)
    at sun.swing.SwingUtilities2.isLocalDisplay(SwingUtilities2.java:1457)
    at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookAndFeel.java:1556)
    at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:148)
    at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1592)
    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.getDefaults(UIManager.java:656)
    at javax.swing.UIManager.getColor(UIManager.java:698)
    at org.jfree.chart.JFreeChart.<clinit>(JFreeChart.java:258)
    at org.jfree.chart.ChartFactory.createXYLineChart(ChartFactory.java:1748)
    at org.bioinfo.ngs.qc.qualimap.beans.BamQCChart.render(BamQCChart.java:171)
    at org.bioinfo.ngs.qc.qualimap.beans.BamQCRegionReporter.computeChartsBuffers(BamQCRegionReporter.java:462)
    at org.bioinfo.ngs.qc.qualimap.main.BamQcTool.execute(BamQcTool.java:234)
    at org.bioinfo.ngs.qc.qualimap.main.NgsSmartTool.run(NgsSmartTool.java:177)
    at org.bioinfo.ngs.qc.qualimap.main.NgsSmartMain.main(NgsSmartMain.java:102)

But this is not reported back as a non-zero exit status to piper, and the error is therefore not caught.

vezzi commented 10 years ago

This is a sort of problem I saw often when I try to plot things with python: despite you do not want to visualise the picture in a X-session the package tries to open an X-session and it fails. This error is not reproducible in the sense that come time I work en entire day without problems and then the day after I need to constantly close and reopen the connection to milou/nestor

johandahlberg commented 10 years ago

Weird. And good info to have. I haven't seen it before, but I'll look into it.

johandahlberg commented 10 years ago

I think I found why qualimap dies with a zero exit status even when it throws an exception. I've suggested a patch to the authors (https://groups.google.com/forum/#!topic/qualimap/Kx9bMqzH-Cw) and in the mean while I've made the changes in our local installation.

johandahlberg commented 10 years ago

Turns out that this is still a problem. Will therefore reopen this issue.

johandahlberg commented 9 years ago

Have update to Qualimap 2.0 which I think should fix this. Will close it now, and then we'll re-open it if it should turn out to be a problem.