FuMa crashes on empty fusion file
Redmar-van-den-Berg opened this issue · 0 comments
Redmar-van-den-Berg commented
FuMa crashes with a ZeroDivisionError when the input files contain no fusion events at all, due to the way the progress is calculated relative to the total number of fusion events.
See the example files located in fuma.zip.
transcripts=transcripts.bed
sample=no-variants
fusioncatcher=no-variants.fusioncatcher
star_fusion=no-variants.star-fusion
fuma -a hg38:${transcripts} -s fc-${sample}:fusion-catcher_final:${fusioncatcher} sf-${sample}:star-fusion_final:${star_fusion} -l "fc-${sample}:hg38" "sf-${sample}:hg38" -f extensive -o -
2020-06-11 14:40:01,983 - FuMa::ParseBED - INFO - Parsing BED file: transcripts.bed
2020-06-11 14:40:03,830 - FuMa::Readers::ReadFusionCatcherFinalList - INFO - Parsing file: no-variants.fusioncatcher
2020-06-11 14:40:03,830 - FuMa::Readers::ReadRNASTARFusionFinal - INFO - Parsing file: no-variants.star-fusion
2020-06-11 14:40:03,831 - FuMa::Readers::ReadFusionCatcherFinalList - INFO - Duplication removal: fc-no-variants (0 fusions)
2020-06-11 14:40:03,831 - FuMa::Readers::ReadRNASTARFusionFinal - INFO - Duplication removal: sf-no-variants (0 fusions)
Left-genes Right-genes Spans large gene (>200000bp) fc-no-variants sf-no-variants
2020-06-11 14:40:03,831 - FuMa::ComparisonTriangle - INFO - Starting 0 comparisons for k=1
Traceback (most recent call last):
File "/data/lumc/devel/fuma/install/bin/fuma", line 4, in <module>
__import__('pkg_resources').run_script('fuma==3.0.6', 'fuma')
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 719, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1511, in run_script
exec(script_code, namespace, namespace)
File "/data/lumc/devel/fuma/install/lib/python2.7/site-packages/fuma-3.0.6-py2.7.egg/EGG-INFO/scripts/fuma", line 232, in <module>
File "build/bdist.linux-x86_64/egg/fuma/ComparisonTriangle.py", line 88, in overlay_fusions
File "build/bdist.linux-x86_64/egg/fuma/ComparisonTriangle.py", line 150, in log_progress
ZeroDivisionError: float division by zero