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

classify error : ZeroDivisionError: division by zero #80

Closed
michoug opened this issue Jun 9, 2019 · 1 comment
Closed

classify error : ZeroDivisionError: division by zero #80

michoug opened this issue Jun 9, 2019 · 1 comment
Labels

Comments

@michoug
Copy link

michoug commented Jun 9, 2019

Hi,
When running the following command

enrichm classify --genome_and_annotation_matrix ko_frequency_table.tsv --aggregate --output Classify

I got this error

[2019-06-09 10:25:34 AM] INFO: Command: /home/michoug/miniconda3/envs/enrichm/bin/enrichm classify --genome_and_annotation_matrix ko_frequency_table.tsv --aggregate --output Classify
[2019-06-09 10:25:34 AM] INFO: Running the classify pipeline
[2019-06-09 10:25:39 AM] INFO: Reading in abundances: ko_frequency_table.tsv
[2019-06-09 10:25:55 AM] INFO: Read in annotations for 937 genomes
Traceback (most recent call last):
  File "/home/michoug/miniconda3/envs/enrichm/bin/enrichm", line 342, in <module>
    run.run_enrichm(args, sys.argv)
  File "/home/michoug/miniconda3/envs/enrichm/lib/python3.6/site-packages/enrichm/run.py", line 317, in run_enrichm
    args.genome_and_annotation_matrix, args.output)
  File "/home/michoug/miniconda3/envs/enrichm/lib/python3.6/site-packages/enrichm/classifier.py", line 143, in classify_pipeline
    pathway_average_abundance = sum(pathway_abundance) / len(pathway_abundance)
ZeroDivisionError: division by zero

It doesn't appear if I add the option --cutoff 0.5

@geronimp geronimp added the bug label Jun 9, 2019
@geronimp
Copy link
Owner

geronimp commented Jun 9, 2019

Hi there,

Thanks for the bug report. This just looks like a straight up bug. I'll take a look at this asap

Thanks,
Joel

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

No branches or pull requests

2 participants