Skip to content

runs fail/stop at qualimap step when bam files are empty #668

@ashildv

Description

@ashildv

Hello,

Check Documentation

I have checked the following places for your error:

Description of the bug

I am mapping a lot of samples to a reference and there are cases where zero reads match the reference. In these cases those jobs are counted as failed jobs and the whole run stops.

This is the error message I get when running bash .command.run:

Built on 2019-11-11 14:05

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

Inside of regions...
Failed to run bamqcNum mapped reads: 0
Num mapped first of pair: 0
Num mapped second of pair: 0
Num singletons: 0
Time taken to analyze reads: 0

java.lang.RuntimeException: The BAM file is empty or corrupt
	at org.bioinfo.ngs.qc.qualimap.process.BamStatsAnalysis.run(BamStatsAnalysis.java:529)
	at org.bioinfo.ngs.qc.qualimap.main.BamQcTool.execute(BamQcTool.java:242)
	at org.bioinfo.ngs.qc.qualimap.main.NgsSmartTool.run(NgsSmartTool.java:190)
	at org.bioinfo.ngs.qc.qualimap.main.NgsSmartMain.main(NgsSmartMain.java:113)

Wed Jan 20 00:59:43 UTC 2021		WARNING	Cleanup output dir

Steps to reproduce

Steps to reproduce the behaviour:

  1. Command line: nextflow run ...
  2. See error: Please provide your error message

Expected behaviour

I expected the pipeline to skip these samples/register them as NA and continue onto the next sample

Log files

Have you provided the following extra information/files:

  • The command used to run the pipeline
  • The .nextflow.log file
  • The exact error:

System

  • Hardware: HPC
  • Executor: slurm
  • OS:
  • Version

Nextflow Installation

  • Version: 2.3.1

Container engine

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpendingAddressed on branch waiting for related PR

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions