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

SortMeRNA log format changed in 4+ #1121

Closed
bschiffthaler opened this issue Mar 9, 2020 · 3 comments
Closed

SortMeRNA log format changed in 4+ #1121

bschiffthaler opened this issue Mar 9, 2020 · 3 comments

Comments

@bschiffthaler
Copy link

Description of bug:
SortMeRNA module fails due to log file parser in SortMeRNA 4+

MultiQC Error log:


Oops! The 'sortmerna' MultiQC module broke... 
  Please copy the following traceback and report it at https://github.com/ewels/MultiQC/issu
es 
  If possible, please include a log file that triggers the error - the last file found was:
    ./sortmerna/out/aligned.log
============================================================
Module sortmerna raised an exception: Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/multiqc-1.9.dev0-py3.6.egg/multiqc/multiqc.py
", line 546, in run
    output = mod()
  File "/usr/local/lib/python3.6/dist-packages/multiqc-1.9.dev0-py3.6.egg/multiqc/modules/so
rtmerna/sortmerna.py", line 30, in __init__
    self.parse_sortmerna(f)
  File "/usr/local/lib/python3.6/dist-packages/multiqc-1.9.dev0-py3.6.egg/multiqc/modules/so
rtmerna/sortmerna.py", line 85, in parse_sortmerna
    self.sortmerna[s_name]["rRNA_pct"] = float(self.sortmerna[s_name]["rRNA"]) / float(self.
sortmerna[s_name]["total"]) * 100
KeyError: 'total'
============================================================
Collapse

File that triggers the error:
P11562_110_S9_L001_subset-aligned.log

MultiQC run details (please complete the following):

  • Command used to run MultiQC: multiqc .
  • MultiQC Version: MultiQC v1.9-dev
  • Operating System: Linux 4.15.0-88-generic #88-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux
  • Python Version: 3.6
  • Method of MultiQC installation: manual

I am aware of this and opening an issue for this. I will fix it whenever I have time (which might honestly be not happen before June, due to an already very dense schedule). Should be an easy fix 1-2h max if anyone else wants to have a go.

@ewels
Copy link
Member

ewels commented Mar 29, 2020

Thanks for reporting this @bschiffthaler - so you're saying that the problem is that the log file format has changed? A PR would be great when you have time 👍

@ewels ewels changed the title SortMeRNA module fails due to log file parser in SortMeRNA 4+ SortMeRNA log format changed in 4+ Mar 29, 2020
@ewels ewels added the fix label Mar 29, 2020
@zhanghao-njmu
Copy link
Contributor

zhanghao-njmu commented Apr 3, 2020

I have the same problem. So I modified the sortmerna parse module file:
~/anaconda3/pkgs/multiqc-1.8-py_2/site-packages/multiqc/modules/sortmerna/sortmerna.py
Below is the modified code.
sortmerna.py.txt

@ewels
Copy link
Member

ewels commented Apr 3, 2020

Nice - thank you @zh542370159! If you're able to make a pull-request with those changes that would be great, then we can discuss using GitHub's review tools 👍

See https://guides.github.com/activities/forking/ if you're new to this 👨‍🎓

Phil

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

No branches or pull requests

3 participants