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

Oops! The 'fastp' MultiQC module broke... #845

Closed
Lucas-Maciel opened this issue Oct 18, 2018 · 3 comments
Closed

Oops! The 'fastp' MultiQC module broke... #845

Lucas-Maciel opened this issue Oct 18, 2018 · 3 comments
Labels
bug: core Bug in the main MultiQC code

Comments

@Lucas-Maciel
Copy link

Lucas-Maciel commented Oct 18, 2018

I was trying to use multiqc to summarize my fastp reports but I got an error

lucas-maciel@lucasmaciel-Inspiron-7472:~/QC_fastq/fastp$ multiqc .
[INFO   ]         multiqc : This is MultiQC v1.7.dev0
[INFO   ]         multiqc : Template    : default
[INFO   ]         multiqc : Searching '.'
[ERROR  ]         multiqc : Oops! The 'fastp' 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:
    ./ERR1702979_fastp.json
============================================================
Module fastp raised an exception: Traceback (most recent call last):
  File "/home/lucas-maciel/.local/bin/multiqc", line 440, in multiqc
    output = mod()
  File "/home/lucas-maciel/.local/lib/python2.7/site-packages/multiqc/modules/fastp/fastp.py", line 43, in __init__
    self.parse_fastp_log(f)
  File "/home/lucas-maciel/.local/lib/python2.7/site-packages/multiqc/modules/fastp/fastp.py", line 237, in parse_fastp_log
    self.fastp_insert_size_data[s_name][i+1] = (float(v) / float(total_reads)) * 100.0
ZeroDivisionError: float division by zero
============================================================
[WARNING]         multiqc : No analysis results found. Cleaning up..
[INFO   ]         multiqc : MultiQC complete
  • Python Version: Python 2.7.15rc1
  • Method of MultiQC installation: pip
@ewels ewels added the bug: core Bug in the main MultiQC code label Oct 19, 2018
@ewels
Copy link
Member

ewels commented Oct 19, 2018

Thanks @Lucas-Maciel - looks like a simple bug caused by not handling samples with 0 reads in some fields.

Would it be possible for you to attach ERR1702979_fastp.json to this issue please, so that I can use it for testing when fixing the bug? You should be able to just drag and drop it into a comment. If GitHub complains about the format, you can zip it first.

Thanks,

Phil

@Lucas-Maciel
Copy link
Author

Lucas-Maciel commented Oct 19, 2018

ERR1702979_fastp.zip

Thank you for your attention Phil

edit: a more complete fastp output files so you can test

fastp.zip

@ewels ewels closed this as completed in 845df3e Oct 20, 2018
ewels added a commit to MultiQC/test-data that referenced this issue Oct 20, 2018
@ewels
Copy link
Member

ewels commented Oct 20, 2018

Thanks for this! I'd not seen Fastp files like this before.

The error should now be fixed. Try pulling the latest dev version of the code, and let me know if you have and further problems.

Thanks!

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

No branches or pull requests

2 participants