You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I was solving an issue in pyranges and sow this:
In pyrle.methods in to_ranges function line 199 pr.from_dfs -> module pyranges has no attribute from_dfs
This affects the function _to_bigwig in pyranges.out because when the to_ranges function fails to return a PyRanges objects, gr is not a PyRanges but a Dataframe and does not have a chromosomes attribute.
fix:
original:
pr.from_dfs(dfs)
updated:
pr.PyRanges(dfs)
further suggestion:
Since the name of the function is to_ranges, one expects a PyRanges object, but in case of an exception, the code returns a pandas Dataframe. Furthermore, the exception is caught but not raised or logged, I think something like logging.warning(msg) may help.
Thanks for the grate package !
The text was updated successfully, but these errors were encountered:
… causing to_ranges function to return a pandas Dataframe instead of PyRanges object (pyranges#9)
- Logging exception in case the to_ranges function fails at creating the pr.PyRanges object
- adding Exception (PEP 8: E722)
Hi I was solving an issue in pyranges and sow this:
In pyrle.methods in to_ranges function line 199 pr.from_dfs -> module pyranges has no attribute from_dfs
This affects the function _to_bigwig in pyranges.out because when the to_ranges function fails to return a PyRanges objects, gr is not a PyRanges but a Dataframe and does not have a chromosomes attribute.
fix:
original:
updated:
further suggestion:
Since the name of the function is to_ranges, one expects a PyRanges object, but in case of an exception, the code returns a pandas Dataframe. Furthermore, the exception is caught but not raised or logged, I think something like
logging.warning(msg)
may help.Thanks for the grate package !
The text was updated successfully, but these errors were encountered: