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

goleft/indexcov ZeroDivisionError with zero reads #1586

Closed
iamh2o opened this issue Nov 15, 2021 · 4 comments
Closed

goleft/indexcov ZeroDivisionError with zero reads #1586

iamh2o opened this issue Nov 15, 2021 · 4 comments
Labels
bug: module Bug in a MultiQC module

Comments

@iamh2o
Copy link

iamh2o commented Nov 15, 2021

Description of bug

Multiqc finally asked me a favor! Here is the crash report I was asked to send.

my install is: mqc version 1.11, installed via conda snd running on ubuntu 18 or 20. I'm processing 384 well low coverage experiment- which is of clinical data, so I can not share the actual file, but I looked at this samples BAM and there are a total of two passing aligned reads :-) so-- likely suspect

_______________ Oops! The 'goleft_indexcov' 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/m _                   
_ arigold/RU30377_EX4824_SQ7859_0/align/sent/alignqc/goleft/goleft-indexcov.ped    _                   
_                                                                                  _                   
_ Traceback (most recent call last):                                               _   
_   File "/locus/home/jmajor/conda/envs/MARIGOLD/lib/python3.8/site-packages/multi _   
_     output = mod()                                                               _   
_   File "/locus/home/jmajor/conda/envs/MARIGOLD/lib/python3.8/site-packages/multi _   
_     self.parse_bin_plot_data(f)                                                  _   
_   File "/locus/home/jmajor/conda/envs/MARIGOLD/lib/python3.8/site-packages/multi _   
_     "x": float(cur["bins.lo"]) / total,                                          _   
_ ZeroDivisionError: float division by zero         

...
Worth mentioning that the fastqc zip file failed to parse,
|fastqc | Couldn't read 'RU30377_EX4824_SQ11141_1.R2_fastqc.zip' - Bad zip file

but i am certain this is my error in setting the extract/noextract flag improperly. If it persists I'll let you know.

thanks!
john

File that triggers the error

No response

MultiQC Error log

No response

ewels added a commit to MultiQC/test-data that referenced this issue Nov 15, 2021
@ewels ewels added the bug: module Bug in a MultiQC module label Nov 15, 2021
@ewels
Copy link
Member

ewels commented Nov 15, 2021

Thanks for reporting this!

I should have a special GitHub issue label called ZeroDivisionError for sample with no reads, it comes up so frequently 😅

@ewels ewels changed the title 'goleft_indexcov' MultiQC module broke goleft/indexcov ZeroDivisionError with zero reads Nov 15, 2021
@ewels ewels closed this as completed in 1058c59 Nov 15, 2021
@ewels
Copy link
Member

ewels commented Nov 15, 2021

Ok, fixed - now in the dev version on master and should be released as part of 1.12.

Thanks again!

@iamh2o
Copy link
Author

iamh2o commented Jan 16, 2022

Ha! I bet that is common- do you have the info on hand to not prompt the user to file a ticket in this kind of scenario?

I know as the mixture of my work has started to increasingly include low (to no coverage -grin) WGS data, it's been interesting to see how many tools which should on paper run fine with just even one read from a pair aligned to the ref, actually have various cliffs of failure before that point. And of course multiQC gets to see all of this.

Funny. This topic has recently led me to explore a very basic report for my team, which I feel could be generally of interest to MQC users, but I'm not ultimately coming up with a winning idea.

I hope to write a report to summarize at a glance the state of each sample as of the time multiqc ran. We generate multiqc reports for batches of samples all expecting to be assessed together, so if a few samples go missing and it's not noticed it's a hassle- and not easy to check for absence by eye.

Boiling down to answering: Which samples left the wet lab to enter dry lab analysis already effectively failed (and we can not worry about these not appearing in MQC)? How many entered the analysis pipeline (we run primarily a snakemake workflow with 40 rules.... maybe 14 of these generating info useful to aggregate w/MQC) and either: (a) produced results from every expected rule? How many have gaps in some rules but are present in other rules, and then of most concern--- the samples that enter with what appears strong data, but are completely MIA in the final report.

I strongly suspect there may have been thought or work done over the years in this direction, and if so I'd be thrilled for a pointer to where I might look. I am also betting that the fact I'm not finding this capability is b/c this may have been found to not fit here well?

I do feel like I have the ingredients to the beginnings of a half baked idea :-). Which is: leverage PEPs instead of arbitrary sample sheets as being the workflow sample metadata source of truth. This would offer a standardized data model to ask what the expected sample set is, and use the same data model to track dropouts, etc. This is also a little fuzzy feeling b/c perhaps this could be a snakemake report (I lean no)?

And I have not thought it through much past there....also....it would seem a report summarizing a snakemake/nextflow/xxxx workflow execution would be cool. I'm surprised not to see that....

best- John

@ewels
Copy link
Member

ewels commented Jan 20, 2022

do you have the info on hand to not prompt the user to file a ticket in this kind of scenario?

Don't get me wrong - I want people to report these errors. MultiQC shouldn't crash (if one sample has zero reads and the module crashes then nothing will be reported from that module for any other samples). So it was good that you did!

Regarding the other stuff, that's a bit beyond the scope of MultiQC. But it could of course be reported upon if checked, and custom MultiQC plugins could be written to handle specific use cases to run the logic within a MultiQC run if that's desired.

Phil

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