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

fastp KeyError with --template sections option #1598

Closed
hmkim opened this issue Dec 3, 2021 · 3 comments
Closed

fastp KeyError with --template sections option #1598

hmkim opened this issue Dec 3, 2021 · 3 comments

Comments

@hmkim
Copy link

hmkim commented Dec 3, 2021

Description of bug

multiqc_data.json.zip

File that triggers the error

No response

MultiQC Error log

a  /// MultiQC 🔍 | v1.11

|           multiqc | Using log filenames for sample names
|           multiqc | Report title: Analysis Report
|           multiqc | Only using modules: picard, samtools, cutadapt, snpeff, fastp
|           multiqc | Search path : /data04/project/brandon/TBD211331-13734-WES-Mouse-brandon-20211129
|         searching | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 1440/1440
|            snpeff | Found 13 reports
|            picard | Found 13 MarkDuplicates reports
|          samtools | Found 39 flagstat reports
|          cutadapt | Found 13 reports
╭────────────────────────────────────────── Oops! The 'fastp' 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: ./multiqc_data_2/multiqc_data.json                      │
│                                                                                                                                │
│ Traceback (most recent call last):                                                                                             │
│   File "/TBI/People/tbi/isaac/.local/lib/python3.6/site-packages/multiqc/multiqc.py", line 624, in run                         │
│     output = mod()                                                                                                             │
│   File "/TBI/People/tbi/isaac/.local/lib/python3.6/site-packages/multiqc/modules/fastp/fastp.py", line 47, in __init__         │
│     self.parse_fastp_log(f)                                                                                                    │
│   File "/TBI/People/tbi/isaac/.local/lib/python3.6/site-packages/multiqc/modules/fastp/fastp.py", line 161, in parse_fastp_log │
│     cmd = parsed_json["command"].split()                                                                                       │
│ KeyError: 'command'                                                                                                            │
│                                                                                                                                │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|           multiqc | Compressing plot data
|           multiqc | Previous MultiQC output found! Adjusting filenames..
|           multiqc | Use -f or --force to overwrite existing reports instead
|           multiqc | Report      : multiqc_report_4.html
|           multiqc | Data        : multiqc_data_4
|           multiqc | MultiQC complete
@ewels ewels changed the title fastp with --template sections option fastp KeyError with --template sections option Jan 15, 2022
@ewels
Copy link
Member

ewels commented Jan 15, 2022

Hi @hmkim,

I'm a bit puzzled by this: The last file found was: ./multiqc_data_2/multiqc_data.json

So it sounds like the file causing this error is multiqc_data.json, which looks like an output file from a previous MultiQC run.

The default fastp module search pattern is '*fastp.json', so this file shouldn't be picked up by MultiQC. Are you overwriting this search pattern?

My suspicion is that this isn't an error with MultiQC, but rather just that your config is causing it to pick up an unexpected file by accident. Fixing the config to avoid this file should fix the error if that's the case.

Phil

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

ewels commented Jan 27, 2022

Ok, I've updated the default MultiQC config to ignore any files called multiqc_data.json - hopefully that will indirectly solve your problem.

Let me know if you hit this issue again with a different file.

Phil

@hmkim
Copy link
Author

hmkim commented Jan 27, 2022

Thank you Phil!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants