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

base_module.py AttributeError with top_modules config #1274

Closed
plijnzaad opened this issue Aug 19, 2020 · 4 comments
Closed

base_module.py AttributeError with top_modules config #1274

plijnzaad opened this issue Aug 19, 2020 · 4 comments
Labels
bug: core Bug in the main MultiQC code

Comments

@plijnzaad
Copy link

plijnzaad commented Aug 19, 2020

Description of bug:
I tried to run multiqc on a FastQC-produced zip file, as follows:

multiqc --config config.yaml --force --title foo --zip-data-dir --filename foo-QC.html \
    --outdir . -m star -m fastqc \
    ./call-fastqQC/execution/TM901-compTrim.u_fastqc.zip \
    ./call-fastqQC/execution/TM901-untrimmed.u_fastqc.zip \
    ./call-fastqQC/execution/TM901-adaptTrim.u_fastqc.zip

The zips are directly from FastQC; my impression was that this is enough?

The config I used was:

---

sp:
  fastqc/zip:
    fn: '*u_fastqc.zip'

top_modules:
  - fastqc:

(also attached)
config.yaml.txt

MultiQC Error log:

[INFO   ]         multiqc : This is MultiQC v1.9
[INFO   ]         multiqc : Template    : default
[INFO   ]         multiqc : Report title: foo
[INFO   ]         multiqc : Searching   : call-fastqQC/execution/TM901-compTrim.u_fastqc.zip
[INFO   ]         multiqc : Searching   : call-fastqQC/execution/TM901-untrimmed.u_fastqc.zip
[INFO   ]         multiqc : Searching   : call-fastqQC/execution/TM901-adaptTrim.u_fastqc.zip
[INFO   ]         multiqc : Only using modules star, fastqc
[ERROR  ]         multiqc : Oops! The 'fastqc' 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:
    None
============================================================
Module fastqc raised an exception: Traceback (most recent call last):
  File "/hpc/local/CentOS7/gen/software/multiqc-1.9/venv/lib/python3.6/site-packages/multiqc/multiqc.py", line 569, in run
    output = mod()
  File "/hpc/local/CentOS7/gen/software/multiqc-1.9/venv/lib/python3.6/site-packages/multiqc/modules/fastqc/fastqc.py", line 37, in __init__
    info="is a quality control tool for high throughput sequence data,"\
  File "/hpc/local/CentOS7/gen/software/multiqc-1.9/venv/lib/python3.6/site-packages/multiqc/modules/base_module.py", line 26, in __init__
    self.name = mod_cust_config.get('name', name)
AttributeError: 'NoneType' object has no attribute 'get'
============================================================
[WARNING]         multiqc : No analysis results found. Cleaning up..
[INFO   ]         multiqc : MultiQC complete

File that triggers the error:

TM901-compTrim.u_fastqc.zip

MultiQC run details (please complete the following):

  • Command used to run MultiQC: multiqc --config config.yaml --force --title foo --zip-data-dir --filename foo-QC.html --outdir . -m star -m fastqc ./call-fastqQC/execution/TM901-compTrim.u_fastqc.zip ./call-fastqQC/execution/TM901-untrimmed.u_fastqc.zip ./call-fastqQC/execution/TM901-adaptTrim.u_fastqc.zip

  • MultiQC Version: 1.9

  • Operating System: CentOS Linux release 7.7.1908 (Core)

  • Python Version: 3.6.1

  • Method of MultiQC installation: probably conda

Additional context

@ewels
Copy link
Member

ewels commented Dec 28, 2020

Hi @plijnzaad,

Thanks for this! Sorry for the slow response, I'll get to looking / fixing this when I can.

On first glance my guess is that it's because you're doing - fastqc: instead of just - fastqc in the YAML (making it an empty dict instead of a string). But that's just a guess, and MultiQC should be able to handle this case if true.

Phil

@ewels ewels added the bug: core Bug in the main MultiQC code label Dec 28, 2020
@ewels ewels changed the title AttributeError: 'NoneType' object has no attribute 'get' when running just fastqc on a zip file base_module.py AttributeError with top_modules coibf Dec 28, 2020
@ewels ewels changed the title base_module.py AttributeError with top_modules coibf base_module.py AttributeError with top_modules config Dec 28, 2020
@fgvieira
Copy link
Contributor

fgvieira commented Mar 9, 2021

I am getting the same error for featureCounts, biobambam2, picard and fastqc, both woth MultiQC v1.9 and v1.10

For example:

[2021-03-09 22:47:52,016] multiqc                                            [ERROR  ]  Oops! The 'biobambam2' 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:
    None
============================================================
Module biobambam2 raised an exception: Traceback (most recent call last):
  File "cache/conda/8303e0a62ce0a269e11e22607186aa0d/lib/python3.6/site-packages/multiqc/multiqc.py", line 569, in run
    output = mod()
  File "cache/conda/8303e0a62ce0a269e11e22607186aa0d/lib/python3.6/site-packages/multiqc/modules/biobambam2/biobambam2.py", line 23, in __init__
    info="provides tools for early stage alignment file processing")
  File "cache/conda/8303e0a62ce0a269e11e22607186aa0d/lib/python3.6/site-packages/multiqc/modules/base_module.py", line 26, in __init__
    self.name = mod_cust_config.get('name', name)
AttributeError: 'NoneType' object has no attribute 'get'

@ewels
Copy link
Member

ewels commented Mar 11, 2021

Tested and confirmed that changing

top_modules:
  - fastqc:

to this:

top_modules:
  - fastqc

..resolves the issue. Will take a look now to see if I can make it handle the incorrect YAML format.

@ewels ewels closed this as completed in 5c18329 Mar 11, 2021
@ewels
Copy link
Member

ewels commented Mar 11, 2021

Fixed in v1.11dev so both styles of YAML config should work. Before then, just remove the superfluous : and you should be fine 👍🏻

Thanks for reporting!

Phil

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

3 participants