NationalGenomicsInfrastructure / piper

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

Maybe a bug: Qualimap step does not detect failure #58

Open biocyberman opened 9 years ago

biocyberman commented 9 years ago

I am running piper with qualimap2, I check the output of qc under /06_final_alignment_qc and see that .log, .out, and *.done are created but no subdirectory for actual output. I went a head and rerunt the qualimap command manually. The console output is something like this:

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

QualiMap v.2.0
Built on 2014-08-28 17:03

Selected tool: bamqc
Available memory (Mb): 33
Max memory (Mb): 61084
Starting bam qc....
Loading sam header...
Loading locator...
Loading reference...
Number of windows: 400, effective number of windows: 485
Chunk of reads size: 1000
Number of threads: 8
Initializing regions from /space/data/resources/bed/S04380110_Covered_editted.bed.....
Filling region references...
Failed to run bamqc

java.lang.RuntimeException: BED format error, there should be at least 6 fields.

Problematic line is 1   65509   65625   -
        at org.bioinfo.ngs.qc.qualimap.common.GenomicFeatureStreamReader$2.parseFeatureRecord(GenomicFeatureStreamReader.java:70)
        at org.bioinfo.ngs.qc.qualimap.common.GenomicFeatureStreamReader.readNextRecord(GenomicFeatureStreamReader.java:182)
        at org.bioinfo.ngs.qc.qualimap.process.BamStatsAnalysis.loadSelectedRegions(BamStatsAnalysis.java:862)
        at org.bioinfo.ngs.qc.qualimap.process.BamStatsAnalysis.run(BamStatsAnalysis.java:247)
        at org.bioinfo.ngs.qc.qualimap.main.BamQcTool.execute(BamQcTool.java:197)
        at org.bioinfo.ngs.qc.qualimap.main.NgsSmartTool.run(NgsSmartTool.java:187)
        at org.bioinfo.ngs.qc.qualimap.main.NgsSmartMain.main(NgsSmartMain.java:103)

I updated my bed file according to the recommendation here: http://seqanswers.com/forums/showthread.php?t=28566

Essentially, it is to run this command: awk 'BEGIN{OFS="\t"}{print $1,$2,$3,$4,0,"."}' orig.bed > new.bed

This allows qualimap to run. So, somehow piper does not detect the failure of this step. It marks "done" and proceeds.

johandahlberg commented 9 years ago

Since Queue relies on the exit-status from the program that runs to know if it has completed successfully or not it runs into trouble when a program exits with a status of 0, even though it failed. I've seen this problem with Qualimap before and thought that it had been fixed for their 2.0 release, but I guess it's something that needs to be investigated again, and possibly brought to the attention of Qualimaps developers.