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

"filtlong" module broke #1843

Closed
richardstoeckl opened this issue Jan 17, 2023 · 2 comments
Closed

"filtlong" module broke #1843

richardstoeckl opened this issue Jan 17, 2023 · 2 comments
Labels
bug: module Bug in a MultiQC module

Comments

@richardstoeckl
Copy link

Description of bug

Hi, thank you very much for this incredible software!

The filtlong module seems to have a problem with the parsing of the total amount of reads in the attached log file:

ValueError: could not convert string to float: '379.964.567'

MultiQC is called via the "onsuccess" handler of a Snakemake pipeline with the following command:

onsuccess:
    print("[|87 Workflow finished without errors!")
    shell("multiqc -f results")

Running on Ubuntu 20.04 LTS, installed via conda.

File that triggers the error

BBR140205_filtlongCombined.log

MultiQC Error log

/// MultiQC 🔍 | v1.14

|           multiqc | Search path : /home/rks/phd/automatedassembly/results
|         searching | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 1256/1256  
|             fastp | Found 18 reports
╭──────────────────────────────────────── Oops! The 'filtlong' 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: results/BBR140205/logs/BBR140205_filtlongCombined.log │
│                                                                                                                              │
│ Traceback (most recent call last):                                                                                           │
│   File "/home/rks/miniconda3/lib/python3.9/site-packages/multiqc/multiqc.py", line 654, in run                               │
│     output = mod()                                                                                                           │
│   File "/home/rks/miniconda3/lib/python3.9/site-packages/multiqc/modules/filtlong/filtlong.py", line 26, in __init__         │
│     self.parse_logs(f)                                                                                                       │
│   File "/home/rks/miniconda3/lib/python3.9/site-packages/multiqc/modules/filtlong/filtlong.py", line 47, in parse_logs       │
│     self.filtlong_data[f["s_name"]] = {"Target bases": float(l.lstrip().split(" ")[1])}                                      │
│ ValueError: could not convert string to float: '379.964.567'                                                                 │
│                                                                                                                              │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|            pycoqc | Found 2 reports
|          minionqc | Found 2 reports
|           multiqc | Compressing plot data
|           multiqc | Deleting    : multiqc_report.html   (-f was specified)
|           multiqc | Deleting    : multiqc_data   (-f was specified)
|           multiqc | Report      : multiqc_report.html
|           multiqc | Data        : multiqc_data
|           multiqc | MultiQC complete
CalledProcessError in file /home/rks/phd/automatedassembly/Snakefile, line 473:
Command 'set -euo pipefail;  multiqc -f results' returned non-zero exit status 1.
  File "/home/rks/phd/automatedassembly/Snakefile", line 473, in __onsuccess
@ewels ewels added the bug: module Bug in a MultiQC module label Jan 17, 2023
@ewels
Copy link
Member

ewels commented Jan 17, 2023

Oh no, another internationalisation error. It's because filtlong is using the locale-specific numeric style of . for thousand separators. These problems only really happen for Germans / Swedes / people from other European countries that use this format. It's one of my least favourite ones to fix 😰

Here I guess it should be ok, as we will never have a decimal count, so we can just strip all . characters from the string before parsing.

@ewels ewels closed this as completed in 82805e6 Jan 17, 2023
ewels added a commit to MultiQC/test-data that referenced this issue Jan 17, 2023
@ewels
Copy link
Member

ewels commented Jan 17, 2023

Ok, should be fixed in 82805e6 - thank you 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

2 participants