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

Hicpro MultiQC module broke #1366

Closed
RxLoutre opened this issue Jan 15, 2021 · 6 comments
Closed

Hicpro MultiQC module broke #1366

RxLoutre opened this issue Jan 15, 2021 · 6 comments
Labels
bug: module Bug in a MultiQC module

Comments

@RxLoutre
Copy link

Description of bug:

I have had this issue while running the nf-core for hi-c data. It ran successfully with the full dataset. I was trying to see if a subsample of the initial dataset would speed up analysis while still giving the same results, but MultiQC won't perfom on this one with the following error :

MultiQC Error log:


WARN: Access to undefined parameter `genomes` -- Initialise it to a default value eg. `params.genomes = some_value`
----------------------------------------------------
                                        ,--./,-.
        ___     __   __   __   ___     /,-._.--~'
  |\ | |__  __ /  ` /  \ |__) |__         }  {
  | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                        `._,._,'
  nf-core/hic v1.2.2
----------------------------------------------------
Pipeline Release  : master
Run Name          : elegant_stallman
Input             : /work/sbsuser/test/Dev_Hi-C/reads/Mais_Hi-C-Dovetail-MBS-F252-T937_050620_Novaseq_Dovetail/*_R{1,2}_1Million.fastq
splitFastq        : false
Fasta Ref         : /work/sbsuser/test/Dev_Hi-C/test_cedric/references/Zea_mays_reformatted.fasta
Restriction Motif : ^GATC
Ligation Motif    : GATCGATC
DNase Mode        : false
Remove Dup        : true
Remove MultiHits  : true
Min MAPQ          : 0
Min Fragment Size : 0
Max Fragment Size : 0
Min Insert Size   : 0
Max Insert Size   : 0
Min CIS dist      : 0
Maps resolution   : 1000000,500000
Max Memory        : 120 GB
Max CPUs          : 48
Max Time          : 4d
Output dir        : ./results
Working dir       : /work/sbsuser/test/roxane/nextflow/hi-c/NovaSeq-Mais-Subset/work
Container Engine  : singularity
Container         : nfcore/hic:1.2.2
Current home      : /home/sbsuser
Current user      : sbsuser
Current path      : /work/sbsuser/test/roxane/nextflow/hi-c/NovaSeq-Mais-Subset
Script dir        : /home/sbsuser/.nextflow/assets/nf-core/hic
Config Profile    : genotoul
Config Profile Description: The Genotoul cluster profile
Config Profile Contact: support.bioinfo.genotoul@inra.fr
Config Profile URL: http://bioinfo.genotoul.fr/
Config Files      : /home/sbsuser/.nextflow/config, /home/sbsuser/.nextflow/assets/nf-core/hic/nextflow.config, /work/sbsuser/test/roxane/nextflow/hi-c/NovaSeq-Mais-Subset/nextflow.config, /work/sbsuser/test/roxane/nextflow/hi-c/NovaSeq-Mais-Subset/nextflow.config
----------------------------------------------------
executor >  slurm (7)
executor >  slurm (22)
[96/9f23d5] process > get_software_versions    [100%] 1 of 1 ✔
[5e/874037] process > makeBowtie2Index         [100%] 1 of 1 ✔
[cc/e879be] process > makeChromSize            [100%] 1 of 1 ✔
[5f/337ade] process > getRestrictionFragments  [100%] 1 of 1 ✔
[fe/0e5a46] process > bowtie2_end_to_end       [100%] 2 of 2 ✔
[1a/62fba9] process > trim_reads               [100%] 2 of 2 ✔
executor >  slurm (22)
[96/9f23d5] process > get_software_versions    [100%] 1 of 1 ✔
[5e/874037] process > makeBowtie2Index         [100%] 1 of 1 ✔
[cc/e879be] process > makeChromSize            [100%] 1 of 1 ✔
[5f/337ade] process > getRestrictionFragments  [100%] 1 of 1 ✔
[fe/0e5a46] process > bowtie2_end_to_end       [100%] 2 of 2 ✔
[1a/62fba9] process > trim_reads               [100%] 2 of 2 ✔
[99/d078ba] process > bowtie2_on_trimmed_reads [100%] 2 of 2 ✔
executor >  slurm (22)
[96/9f23d5] process > get_software_versions    [100%] 1 of 1 ✔
[5e/874037] process > makeBowtie2Index         [100%] 1 of 1 ✔
[cc/e879be] process > makeChromSize            [100%] 1 of 1 ✔
[5f/337ade] process > getRestrictionFragments  [100%] 1 of 1 ✔
[fe/0e5a46] process > bowtie2_end_to_end       [100%] 2 of 2 ✔
[1a/62fba9] process > trim_reads               [100%] 2 of 2 ✔
[99/d078ba] process > bowtie2_on_trimmed_reads [100%] 2 of 2 ✔
executor >  slurm (22)
[96/9f23d5] process > get_software_versions    [100%] 1 of 1 ✔
[5e/874037] process > makeBowtie2Index         [100%] 1 of 1 ✔
[cc/e879be] process > makeChromSize            [100%] 1 of 1 ✔
[5f/337ade] process > getRestrictionFragments  [100%] 1 of 1 ✔
[fe/0e5a46] process > bowtie2_end_to_end       [100%] 2 of 2 ✔
[1a/62fba9] process > trim_reads               [100%] 2 of 2 ✔
[99/d078ba] process > bowtie2_on_trimmed_reads [100%] 2 of 2 ✔
executor >  slurm (22)
[96/9f23d5] process > get_software_versions    [100%] 1 of 1 ✔
[5e/874037] process > makeBowtie2Index         [100%] 1 of 1 ✔
[cc/e879be] process > makeChromSize            [100%] 1 of 1 ✔
[5f/337ade] process > getRestrictionFragments  [100%] 1 of 1 ✔
[fe/0e5a46] process > bowtie2_end_to_end       [100%] 2 of 2 ✔
[1a/62fba9] process > trim_reads               [100%] 2 of 2 ✔
[99/d078ba] process > bowtie2_on_trimmed_reads [100%] 2 of 2 ✔
[b5/0e7942] process > merge_mapping_steps      [100%] 2 of 2 ✔
[37/9645af] process > combine_mapped_files     [100%] 1 of 1 ✔
[8a/ff481d] process > get_valid_interaction    [100%] 1 of 1 ✔
[92/2d8930] process > remove_duplicates        [100%] 1 of 1 ✔
[c8/26480b] process > merge_sample             [100%] 4 of 4 ✔
[-        ] process > build_contact_maps       -
[-        ] process > run_ice                  -
[15/47f607] process > generate_cool            [100%] 1 of 1 ✔
[78/974d38] process > multiqc                  [100%] 1 of 1, failed: 1 ✘
[0f/6b7253] process > output_documentation     [100%] 1 of 1 ✔
-[nf-core/hic] Pipeline completed with errors-
Error executing process > 'multiqc'

Caused by:
  Process `multiqc` terminated with an error exit status (1)

Command executed:

  multiqc -f   --config multiqc_config.yaml .

Command exit status:
  1

Command output:
  (empty)

Command error:
  [WARNING]         multiqc : MultiQC Version v1.9 now available!
  [INFO   ]         multiqc : This is MultiQC v1.8
  [INFO   ]         multiqc : Template    : default
  [INFO   ]         multiqc : Searching   : /work/sbsuser/test/roxane/nextflow/hi-c/NovaSeq-Mais-Subset/work/78/974d381edc8e177b9d40b2dd6d704e
  [INFO   ]  custom_content : nf-core-chipseq-summary: Found 1 sample (html)
  [INFO   ]  custom_content : nf-core-chipseq-summary: Found 2751 samples (html)
  [INFO   ]  custom_content : software_versions: Found 1 sample (html)
  [INFO   ]  custom_content : software_versions: Found 432 samples (html)
  [ERROR  ]         multiqc : Oops! The 'hicpro' 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:
      ./input_4/mstats/Mais-MBS847-Dovetail_AGTTCAGG-CCAACAGA-AHHMY2DRXX_L001Million/Mais-MBS847-Dovetail_AGTTCAGG-CCAACAGA-AHHMY2DRXX_L001_1Million.mRSstat
  ============================================================
  Module hicpro raised an exception: Traceback (most recent call last):
    File "/opt/conda/envs/nf-core-hic-1.2.2/lib/python3.7/site-packages/multiqc/multiqc.py", line 546, in run
      output = mod()
    File "/opt/conda/envs/nf-core-hic-1.2.2/lib/python3.7/site-packages/multiqc/modules/hicpro/hicpro.py", line 41, in __init__
      data['percent_mapped_R2'] = float(data['mapped_R2']) / float(data['total_R2']) * 100.0
  KeyError: 'mapped_R2'
  ============================================================
  [INFO   ]         multiqc : Compressing plot data
  [INFO   ]         multiqc : Report      : multiqc_report.html
  [INFO   ]         multiqc : Data        : multiqc_data
  [INFO   ]         multiqc : Plots       : multiqc_plots
  [INFO   ]         multiqc : MultiQC complete

Work dir:
  /work/sbsuser/test/roxane/nextflow/hi-c/NovaSeq-Mais-Subset/work/78/974d381edc8e177b9d40b2dd6d704e

Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run`

File that triggers the error:

MultiQC run details (please complete the following):

  • Command used to run MultiQC:
  • MultiQC Version: MultiQC v1.8
  • Operating System: Node on slurm, I don't really know what is behind :s
  • Python Version: It is not specified in the multiQC report of hi-c pipelines that previously worked
  • Method of MultiQC installation: Again, no idea, MultiQC was installed on the cluster indepentely (V1.7) but the one used here is from the nf-core pipeline (1.8) so it should have been installed via nextflow : v20.01.0

Additional context

It seems it actually created something as I go into the directory where the error occured, we can see a multi_qc report in there but he is an empty page with just the versions.

@ewels
Copy link
Member

ewels commented Jan 15, 2021

Hi @RxLoutre,

Sorry to hear that you're having problems. Would it be possible to attach the file that triggered the error so that I can try to replicate it?

You can see the (probable) path in the error log:

If possible, please include a log file that triggers the error - the last file found was:
./input_4/mstats/Mais-MBS847-Dovetail_AGTTCAGG-CCAACAGA-AHHMY2DRXX_L001Million/Mais-MBS847-Dovetail_AGTTCAGG-CCAACAGA-AHHMY2DRXX_L001_1Million.mRSstat

Thanks,

Phil

@ewels ewels added the bug: module Bug in a MultiQC module label Jan 15, 2021
@ewels ewels added the waiting: example data Needs example data before we can proceed label Mar 31, 2021
@ewels
Copy link
Member

ewels commented Jul 4, 2021

Closing due to lack of example file to replicate the error.

@ewels ewels closed this as completed Jul 4, 2021
@jzohren
Copy link

jzohren commented Nov 29, 2021

Hi Phil,

I encountered the same error as @RxLoutre earlier this year when I tried to run the nf-core/hic:1.3.0 pipeline:

nf-core/hic execution completed unsuccessfully!
The exit status of the task that caused the workflow execution to fail was: 1.
The full error message was:
Error executing process > 'multiqc'

Caused by:
  Process `multiqc` terminated with an error exit status (1)

Command executed:

  multiqc -f    .

Command exit status:
  1

Command output:
  |         searching | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 15/15  

Command error:
  
    /// MultiQC 🔍 | v1.11
  
  |           multiqc | Search path : /camp/lab/turnerj/working/jasmin/manuscript/analysis/nf-core/hic/run211129/work/22/b198ac15e9f3e90d5aca44ac40f716
  |    custom_content | software_versions: Found 1 sample (html)
  ╭───────────────── Oops! The 'hicpro' MultiQC module broke... ─────────────────╮
  │ Please copy this log and report it at                                        │
  │ https://github.com/ewels/MultiQC/issues                                      │
  │ Please attach a file that triggers the error. The last file found was:       │
  │ ./input_4/stats/PRD_Pdev031_S9_L001/PRD_Pdev_2031_S9_L001.mRSstat            │
  │                                                                              │
  │ Traceback (most recent call last):                                           │
  │   File "/usr/local/lib/python3.9/site-packages/multiqc/multiqc.py", line 624 │
  │     output = mod()                                                           │
  │   File "/usr/local/lib/python3.9/site-packages/multiqc/modules/hicpro/hicpro │
  │     data["duplicates"] = data["valid_interaction"] - data["valid_interaction │
  │ KeyError: 'valid_interaction'                                                │
  │                                                                              │
  ╰──────────────────────────────────────────────────────────────────────────────╯
  |           multiqc | Compressing plot data
  |           multiqc | Report      : multiqc_report.html
  |           multiqc | Data        : multiqc_data
  |           multiqc | Plots       : multiqc_plots
  |           multiqc | MultiQC complete

I didn't encounter this when I ran the pipeline with the test profile, so I wonder whether it has something to do with my data. I've attached the file that triggered this (I had to append the txt otherwise github wouldn't let me upload it).
PRD_Pdev_2031_S9_L001.mRSstat.txt

Thanks a lot for your help!

@jzohren
Copy link

jzohren commented Dec 14, 2021

Hi @ewels and @RxLoutre,

Just wanted to let you know that I now know what caused this issue. With the help from @nservant, we discovered that a "_1" or "_2" in the filename will be treated as a suffix for read 1/2 files. This causes incorrect filenames along the way, which means that multiqc can't find all files it's looking for.
I have simply renamed my input files and now the pipeline ran without any problems. Nicolas said this should be fixed in the next release of nf-core/hic.

Best wishes,
Jasmin

@ewels ewels reopened this Dec 15, 2021
@ewels ewels removed the waiting: example data Needs example data before we can proceed label Dec 15, 2021
@ewels
Copy link
Member

ewels commented Dec 15, 2021

Thanks @jzohren! Great that you got it to work. However, MultiQC shouldn't really have an unhandled crash like this, whatever you did. As you've provided a file to replicate the problem I've reopened the issue.

@ewels ewels closed this as completed in 9694768 Jan 27, 2022
@ewels
Copy link
Member

ewels commented Jan 27, 2022

Ok, I've added a bunch of error handling to try to catch these errors. It doesn't really fix the problem as such, but the module at least keeps going so you get a report with something there. It hopefully also makes debugging a little easier:

image

Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: module Bug in a MultiQC module
Projects
None yet
Development

No branches or pull requests

3 participants