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

Fix error handling + cases where with bigwigAverage with more than 2 bigwigs #1257

Merged
merged 4 commits into from
Sep 27, 2023
Merged

Fix error handling + cases where with bigwigAverage with more than 2 bigwigs #1257

merged 4 commits into from
Sep 27, 2023

Conversation

lldelisle
Copy link
Contributor

I got an error when using bigwigAverage:

Traceback (most recent call last):
  File "/data/galaxy/galaxy/var/dependencies/_conda/envs/mulled-v1-9dd4e5433cf4f47ee04cca722ff3869495cfcd627aecb78c70b6dcb65b45e293/bin/bigwigAverage", line 12, in <module>
    main(args)
  File "/data/galaxy/galaxy/var/dependencies/_conda/envs/mulled-v1-9dd4e5433cf4f47ee04cca722ff3869495cfcd627aecb78c70b6dcb65b45e293/lib/python3.8/site-packages/deeptools/bigwigAverage.py", line 140, in main
    writeBedGraph_bam_and_bw.writeBedGraph(
  File "/data/galaxy/galaxy/var/dependencies/_conda/envs/mulled-v1-9dd4e5433cf4f47ee04cca722ff3869495cfcd627aecb78c70b6dcb65b45e293/lib/python3.8/site-packages/deeptools/writeBedGraph_bam_and_bw.py", line 209, in writeBedGraph
    res = mapReduce.mapReduce((tileSize, fragmentLength, bamOrBwFileList,
  File "/data/galaxy/galaxy/var/dependencies/_conda/envs/mulled-v1-9dd4e5433cf4f47ee04cca722ff3869495cfcd627aecb78c70b6dcb65b45e293/lib/python3.8/site-packages/deeptools/mapReduce.py", line 146, in mapReduce
    res = list(map(func, TASKS))
  File "/data/galaxy/galaxy/var/dependencies/_conda/envs/mulled-v1-9dd4e5433cf4f47ee04cca722ff3869495cfcd627aecb78c70b6dcb65b45e293/lib/python3.8/site-packages/deeptools/writeBedGraph_bam_and_bw.py", line 42, in writeBedGraph_wrapper
    return writeBedGraph_worker(*args)
  File "/data/galaxy/galaxy/var/dependencies/_conda/envs/mulled-v1-9dd4e5433cf4f47ee04cca722ff3869495cfcd627aecb78c70b6dcb65b45e293/lib/python3.8/site-packages/deeptools/writeBedGraph_bam_and_bw.py", line 74, in writeBedGraph_worker
    getCoverageFromBigwig(
  File "/data/galaxy/galaxy/var/dependencies/_conda/envs/mulled-v1-9dd4e5433cf4f47ee04cca722ff3869495cfcd627aecb78c70b6dcb65b45e293/lib/python3.8/site-packages/deeptools/writeBedGraph_bam_and_bw.py", line 25, in getCoverageFromBigwig
    coverage = np.asarray(bigwigHandle.values(chrom, start, end))
RuntimeError: Invalid interval bounds!

I think it is because in the code there is a except ValueError instead of RuntimeError. The switch in pyBigwig occured in deeptools/pyBigWig@17f8dab which has been merged in version 0.2.1...

  • Does the PR contain new feature?
  • Does the PR contain bugfix?
  • Does the PR contain documentation changes?
  • Does the PR contain changes to the galaxy wrapper?

@lldelisle lldelisle changed the title Fix error handling Fix error handling = = Sep 26, 2023
@lldelisle lldelisle changed the title Fix error handling = = Fix error handling + cases where with bigwigAverage with more than 2 bigwigs Sep 26, 2023
@lldelisle
Copy link
Contributor Author

The test that fails has been solved by #1258 .
Do you want me to merge develop or (to save energy) you accept the PR like this?
Do you think it would be possible to do a release quickly with this bug fix?

@WardDeb
Copy link
Member

WardDeb commented Sep 27, 2023

We'll merge like this,
I'll add the PR for mpl version as well and then tag a new release today still. Thanks @lldelisle !

@WardDeb WardDeb merged commit d56b016 into deeptools:develop Sep 27, 2023
11 of 13 checks passed
@lldelisle lldelisle deleted the fix_error_handling branch September 27, 2023 07:40
@lldelisle
Copy link
Contributor Author

Thanks.

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 this pull request may close these issues.

2 participants