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

FuMa crashes on empty fusion file #43

Closed
Redmar-van-den-Berg opened this issue Jun 11, 2020 · 0 comments · Fixed by #44
Closed

FuMa crashes on empty fusion file #43

Redmar-van-den-Berg opened this issue Jun 11, 2020 · 0 comments · Fixed by #44

Comments

@Redmar-van-den-Berg
Copy link
Collaborator

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
Redmar-van-den-Berg added a commit to Redmar-van-den-Berg/fuma that referenced this issue Jun 11, 2020
When there are no fusion events at all, FuMa crashes because the progress is
calculated relative to the total number of fusion events.

This fixes issue yhoogstrate#43
@yhoogstrate yhoogstrate mentioned this issue Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant