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

cellranger module breaks with cellranger report #1853

Closed
pcm32 opened this issue Feb 1, 2023 · 7 comments
Closed

cellranger module breaks with cellranger report #1853

pcm32 opened this issue Feb 1, 2023 · 7 comments

Comments

@pcm32
Copy link

pcm32 commented Feb 1, 2023

Description of bug

Running multiqc . on a directory with cellranger reports fails due to a missing key.

File that triggers the error

PS-SCDI-022n_web_summary.html.zip

MultiQC Error log

$ multiqc .

  /// MultiQC 🔍 | v1.14

|           multiqc | Search path : /Documents/Persist-seq-unreplicated/data/pilot-fixed-rna-profiling-01/for_multiqc
|         searching | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 27/27
╭────────────────────────────────────── Oops! The 'cellranger' 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: ./PS-SCDI-022n_web_summary.html                      │
│                                                                                                                             │
│ Traceback (most recent call last):                                                                                          │
│   File "/miniconda3_arm/envs/csvkit-multiqc/lib/python3.10/site-packages/multiqc/multiqc.py", line 654, in ru │
│     output = mod()                                                                                                          │
│   File "/miniconda3_arm/envs/csvkit-multiqc/lib/python3.10/site-packages/multiqc/modules/cellranger/cellrange │
│     n["count"] = self.parse_count_html()                                                                                    │
│   File "/miniconda3_arm/envs/csvkit-multiqc/lib/python3.10/site-packages/multiqc/modules/cellranger/count.py" │
│     self.parse_count_report(f)                                                                                              │
│   File "/miniconda3_arm/envs/csvkit-multiqc/lib/python3.10/site-packages/multiqc/modules/cellranger/count.py" │
│     warnings[alarm["id"]] = "FAIL"                                                                                          │
│ KeyError: 'id'                                                                                                              │
│                                                                                                                             │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|           multiqc | No analysis results found. Cleaning up..
|           multiqc | MultiQC complete
@ewels
Copy link
Member

ewels commented Feb 1, 2023

Already fixed in #1841 and available in the development version.

Hoping to do a patch release v. soon, primarily to solve this bug and one with DRAGEN (just waiting for the latter, hopefully ready next week).

Thanks for reporting!

Phil

@ewels ewels closed this as completed Feb 1, 2023
@odoublewen
Copy link

Hi @ewels, I was also wanting to use MultiQC with cellranger 7.1 output, and was also seeing the same error reported here.

Today I installed MultiQC v1.15.dev0 and tried again, and now I see a different message:

$ multiqc *html

  /// MultiQC 🔍 | v1.15.dev0 (c7b672e)

|           multiqc | Only using modules: cellranger, samtools, cutadapt, fastp
|           multiqc | Search path : /local/cell-ranger-pipeline/work/65/aa9ce2292b1180a4fb0a4b850d86d3/1_web_summary.html
|           multiqc | Search path : /local/cell-ranger-pipeline/work/65/aa9ce2292b1180a4fb0a4b850d86d3/2_web_summary.html
|           multiqc | Search path : /local/cell-ranger-pipeline/work/65/aa9ce2292b1180a4fb0a4b850d86d3/3_web_summary.html
|         searching | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 3/3  
╭──────────────────── Oops! The 'cellranger' 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:                 │
│ 2_web_summary.html                                                                     │
│                                                                                        │
│ Traceback (most recent call last):                                                     │
│   File "/local/[obfuscated]/                                                           │
│     output = mod()                                                                     │
│   File "/local/[obfuscated]/                                                           │
│     n["count"] = self.parse_count_html()                                               │
│   File "/local/[obfuscated]/                                                           │
│     self.parse_count_report(f)                                                         │
│   File "/local/[obfuscated]/                                                           │
│     "title": f"Cell Ranger count: {summary['analysis_tab']['seq_saturation_plot']['hel │
│ KeyError: 'seq_saturation_plot'                                                        │
│                                                                                        │
╰────────────────────────────────────────────────────────────────────────────────────────╯
|           multiqc | No analysis results found. Cleaning up..
|           multiqc | MultiQC complete

If it would help, I could send you one of these web_summary.html files, but I probably cannot attach it publicly.

Thank you for your tireless work maintaining and improving this important tool!

@odoublewen
Copy link

Actually, my above comment may be due to the fact that I ran cellranger on a drastically subsampled dataset -- 5000 paired reads, for a testing purposes. That might have caused cellranger to leave out the seq_saturation_plot. Let me rerun with more reads -- I will update this issue later today.

@odoublewen
Copy link

Indeed, when I ran cellranger with a full dataset, it produced web_summary.html files that were usable by multiqc 1.15.

One might argue that, as long as cellranger count runs without errors and produces a web_summary.html file, it should be valid input for multiqc. Even with a subsampled dataset, the report still has a lot of data in it that multiqc knows how to summarize. @ewels I will leave it to you to decide if you want to pursue this. Let me know if I can help.

@ewels
Copy link
Member

ewels commented Feb 23, 2023

Yes it should never crash like that - please create a new issue and attach a file that triggers the error (zip it if GitHub complains about the format).

Thanks!

@chris-rands
Copy link

Already fixed in #1841 and available in the development version.

Hoping to do a patch release v. soon, primarily to solve this bug and one with DRAGEN (just waiting for the latter, hopefully ready next week).

Thanks for reporting!

Phil

Hi @ewels, are you still planning the patch release or indeed multiqc 1.15 anytime soon? Thanks!

@ewels
Copy link
Member

ewels commented Jun 13, 2023

Sorry about this, I fell for the classic fallacy of wanting to get "one more thing" into the release, which turned out to be more difficult than expected and then I got swept into other things.

It's already at / near the top of my list, I'll try to find time to check it over and release as-is ASAP.

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

4 participants