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

Kaiju module works only at phylum level #1217

Closed
jkibilds opened this issue Jun 4, 2020 · 4 comments
Closed

Kaiju module works only at phylum level #1217

jkibilds opened this issue Jun 4, 2020 · 4 comments
Labels
bug: core Bug in the main MultiQC code

Comments

@jkibilds
Copy link

jkibilds commented Jun 4, 2020

Description of bug:
When I run MultiQC on table reports from Kaiju, the Kaiju module breaks if the input files have taxonomic classification at any other level than phylum.

MultiQC Error log:

[INFO   ]         multiqc : This is MultiQC v1.9
[INFO   ]         multiqc : Template    : default
[INFO   ]         multiqc : Searching   : /mnt/home/juriski/projects/scratch/MiSeq_run_200529/results/kaiju1/taxa/genus
[INFO   ]           kaiju : Found 1 reports
[ERROR  ]         multiqc : Oops! The 'kaiju' 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:
    genus/Li-2020-14538-3.kaiju.genus.tsv
============================================================
Module kaiju raised an exception: Traceback (most recent call last):
  File "/home/juriski/.conda/envs/multiqc/lib/python3.6/site-packages/multiqc/multiqc.py", line 569, in run
    output = mod()
  File "/home/juriski/.conda/envs/multiqc/lib/python3.6/site-packages/multiqc/modules/kaiju/kaiju.py", line 64, in __init__
    self.kaiju_stats_table()
  File "/home/juriski/.conda/envs/multiqc/lib/python3.6/site-packages/multiqc/modules/kaiju/kaiju.py", line 105, in kaiju_stats_table
    general_data = self.kaiju_data[self.kaiju_data.keys().sorted()[0]]
AttributeError: 'dict_keys' object has no attribute 'sorted'
============================================================
[WARNING]         multiqc : No analysis results found. Cleaning up..
[INFO   ]         multiqc : MultiQC complete

File that triggers the error:
Li-2020-14538-3.kaiju.genus.txt
(I had to rename the file from .tsv to .txt because GitHub allows only certain extensions)

MultiQC run details:

  • Command used to run MultiQC: multiqc -o genus/mqcout genus/
  • MultiQC Version: MultiQC v1.9
  • Operating System: CentOS 7
  • Python Version: Python 3.6.10
  • Method of MultiQC installation: conda

Additional context
I prepared Kaiju reports for the same sample at all taxonomic levels (except superkingdom) using kaiju2table and ran MultiQC on each report file separately. It produced a report and no error messages only with phylum-level input. The same is true if I use input files from https://github.com/ewels/MultiQC_TestData/tree/master/data/modules/kaiju - only the three example files at phylum level work.

@ewels ewels added the bug: core Bug in the main MultiQC code label Jun 4, 2020
@ewels
Copy link
Member

ewels commented Jun 4, 2020

Aha, good spot - thank you! This was a very last-minute addition to the v1.9 release by @noirot.

Any thoughts @noirot? Do you think you could add a fix for this please?

We can add this test data to MultiQC_TestData once we have a fix (not before though, as it will cause all MultiQC tests to start failing).

Thanks,

Phil

@noirot
Copy link
Contributor

noirot commented Jun 4, 2020

Oh weird ! Yes I'll have a look.

noirot added a commit to noirot/MultiQC that referenced this issue Jun 4, 2020
@noirot noirot mentioned this issue Jun 4, 2020
3 tasks
noirot added a commit to noirot/MultiQC that referenced this issue Jun 4, 2020
noirot added a commit to noirot/MultiQC that referenced this issue Jun 4, 2020
ewels added a commit that referenced this issue Jun 4, 2020
ewels added a commit to MultiQC/test-data that referenced this issue Jun 4, 2020
@ewels
Copy link
Member

ewels commented Jun 4, 2020

@jkibilds - should now be fixed in v1.10dev. Let us know if you find any problems, thanks for reporting!

Phil

@jkibilds
Copy link
Author

jkibilds commented Jun 4, 2020

Now it works with reports from all taxonomic levels, thanks!

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