Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 of 5 tasks
ashildv opened this issue Jan 20, 2021 · 1 comment
Closed
2 of 5 tasks

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

ashildv opened this issue Jan 20, 2021 · 1 comment
Labels
bug Something isn't working pending Addressed on branch waiting for related PR

Comments

@ashildv
Copy link
Contributor

ashildv commented Jan 20, 2021

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

@ashildv ashildv added the bug Something isn't working label Jan 20, 2021
@jfy133
Copy link
Member

jfy133 commented Jan 21, 2021

This produces a relatively 'unique' exit code of 255, so we can just set qualimap to ignore on 255 exit code:

withName:qualimap{

to something like

  withName:qualimap{
    errorStrategy = { task.exitStatus in [1,143,137,104,134,139] ? 'retry' : task.exitStatus in [255] ? 'ignore' : 'finish' }
  }

@jfy133 jfy133 mentioned this issue Feb 4, 2021
11 tasks
@jfy133 jfy133 added the pending Addressed on branch waiting for related PR label Feb 4, 2021
@jfy133 jfy133 added this to the 2.3.2 Patch Release milestone Feb 4, 2021
@jfy133 jfy133 closed this as completed Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending Addressed on branch waiting for related PR
Projects
None yet
Development

No branches or pull requests

2 participants