bcbio / bcbio-nextgen

Validated, scalable, community developed variant calling, RNA-seq and small RNA analysis
https://bcbio-nextgen.readthedocs.io
MIT License
994 stars 354 forks source link

MultiQC error on PED file from goleft_indexcov, exit status 1 crashes bcbio #3350

Open WimSpee opened 4 years ago

WimSpee commented 4 years ago

Version info

To Reproduce Exact bcbio command you have used:

"module load bcbio/1.2.4-Python-3.6.6  && bcbio_nextgen.py {CONFIG_YAML} -t ipython  -n {NUMBER_OF_CPU} -s sge  -q main.regular -r vf=5G,h_rss=50G"

Your sample configuration file:

For multiple samples:

- algorithm:
    aligner: false
    coverage_interval: genome
    effects: false
    jointcaller: gatk-haplotype-joint
    mark_duplicates: false
    nomap_split_targets: 1000
    ploidy:
      default: 2
    realign: false
    recalibrate: false
    tools_off:
    - gemini
    variantcaller: false
  analysis: variant2
  description: DA_1474_04
  files:
  - /wgrs_re_analysis/da_1501/da_1474_04/DA_1474_04-ready.bam
  genome_build: my_reference
  lane: DA_1474_04
  metadata:
    batch: DA_1501
  vrn_file: /wgrs_re_analysis/da_1501/da_1474_04/DA_1474_04-gatk-haplotype.vcf.gz

Observed behavior Error message or bcbio output:

[ERROR  ]         multiqc : Oops! The 'goleft_indexcov' MultiQC module broke...
  Please copy the following traceback and report it at https://github.com/ewels/MultiQC/issues
  If possible, please include a log file that triggers the error - the last file found was:
    /run/Projects/DEV-1829/DA_1501/transaction/2_main_joint_analysis_dir/transaction/work/qc/DA_1474_04/coverage/indexcov/DA_1474_04-indexcov.ped
============================================================
Module goleft_indexcov raised an exception: Traceback (most recent call last):
  File "/prod/Tools/bcbio/1.2.4/anaconda/lib/python3.6/site-packages/multiqc/plots/linegraph.py", line 173, in plot
    return get_template_mod().linegraph(plotdata, pconfig)
AttributeError: module 'multiqc.templates.default' has no attribute 'linegraph'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/prod/Tools/bcbio/1.2.4/anaconda/lib/python3.6/site-packages/multiqc/multiqc.py", line 569, in run
    output = mod()
  File "/prod/Tools/bcbio/1.2.4/anaconda/lib/python3.6/site-packages/multiqc/modules/goleft_indexcov/goleft_indexcov.py", line 47, in __init__
    self.roc_plot()
  File "/prod/Tools/bcbio/1.2.4/anaconda/lib/python3.6/site-packages/multiqc/modules/goleft_indexcov/goleft_indexcov.py", line 117, in roc_plot
    plot = linegraph.plot([self.roc_plot_data[c] for c in chroms], pconfig)
  File "/prod/Tools/bcbio/1.2.4/anaconda/lib/python3.6/site-packages/multiqc/plots/linegraph.py", line 175, in plot
    if config.plots_force_flat or (not config.plots_force_interactive and len(plotdata[0]) > config.plots_flat_numseries):
IndexError: list index out of range

Expected behavior MultiQC report to be created, without crashing on the error. Running multiqc manually on the bcbio qc directory works and creates the html report and multiqc data directory.

[2020-10-02 12:26:54] multiqc                                            [INFO   ]  MultiQC complete

But the same error is shown in the standard out and the exit status is 1, which causes bcbio to crash.

/Tools/bcbio/1.2.4/anaconda/bin/multiqc -v ./qc/
echo $?
1

Log files Please attach (10MB max): bcbio-nextgen.log, bcbio-nextgen-commands.log, and bcbio-nextgen-debug.log.

Additional context See also this issue at MultiQC in which I also commented https://github.com/ewels/MultiQC/issues/1265

roryk commented 4 years ago

Heya, I fixed this but it will have to get merged into MultiQC to be actually fixed. Thanks for the really good issue, figuring out the exit code was 1 despite finishing was a good catch.

WimSpee commented 4 years ago

Thank you. Is there already a pull request to ewels/MultiQC? We are currently running an older version of bcbio and would like to update to a more recent stable version.

roryk commented 4 years ago

Hi Wim,

Yes-- there is a P/R (https://github.com/ewels/MultiQC/pull/1310) but it hasn't been merged yet. Hopefully soon.

WimSpee commented 4 years ago

Hi Rory. Thank you for the fix, pull request and the information. Somehow I was not able earlier to find the pull request.

roryk commented 4 years ago

No worries, thanks for following up-- you can fix your installation yourself, if you are up for it. If you pull my fork of MultiQC and install it over what bcbio installs with:

bcbio_python setup.py install

it should overwrite the installed MultiQC and install the fix. If not, you will need to delete what is already there by rm -r path-to-your-bcbio-install/anaconda/lib/python3.6/site-packages/multiqc and then do the installation.