-
Notifications
You must be signed in to change notification settings - Fork 602
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
FastQC gives KeyError if report generated from an empty FastQ file #1129
Comments
I had the same error and found out that some of my FASTQ files were empty (for whatever reason). Therefore, the FastQC reports did not contain any data which most likely triggered the key error. I fixed the issue with the FASTQ files and now everything runs through. |
I have the same error. Please suggest some workaround. Thanks.
Module fastqc raised an exception: Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/multiqc/multiqc.py", line 546, in run
output = mod()
File "/usr/local/lib/python3.6/dist-packages/multiqc/modules/fastqc/fastqc.py", line 94, in __init__
self.fastqc_general_stats()
File "/usr/local/lib/python3.6/dist-packages/multiqc/modules/fastqc/fastqc.py", line 204, in fastqc_general_stats
'avg_sequence_length': bs['avg_sequence_length'],
KeyError: 'avg_sequence_length' |
Thanks so much for this reply. That was the issue, I had a fastq file that was empty as a result of a demultiplex script and the sample not being in the library. I removed the empty fastq and the program runs as expected. |
Nice, thanks all! If someone has one of these FastQC reports (zipped), please could they attach it here? We could presumably add some code to MultiQC to check for this and give a nice warning message and skip the file. Would be better than an ugly Phil |
That is what the file looks like when it produces a fastqc report from an empty fastq file. |
Ok, thanks all - this is now fixed. Instead of falling over with a If you run on only empty FastQC reports then the report looks kind of strange 😅 But when mixed with normal samples it should behave more like you'd expect. Amusingly, most of the FastQC modules give a passing status for an empty file.. Thanks all for your input on this - let me know if you find any problems 👍 Phil |
Description of bug:
running MultiQC in a snakemake pipeline, it should be joing up the log data for the fastqc reports, and trimmomatic reports (this is working). Snakemake sees the inputs fine, fastqc runs and generates an html and zip file for each fastq file, but the multiqc doesn't like the data fastqc is generating, throwing a "key error" as though the fastqc data is missing a column?
MultiQC Error log:
File that triggers the error:
MultiQC run details (please complete the following):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: