We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi Devs,
I'm reporting this just in case you intend Centurion to be Py3-compatible.
I'm getting the following error:
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-19-152081d3bb39> in <module> 1 centromeres = centromeres_calls.centromeres_calls( 2 counts, lengths, ----> 3 resolution=10000) ~/.conda/envs/centurion/lib/python3.6/site-packages/centurion/centromeres_calls.py in centromeres_calls(counts, lengths, resolution, init, n_candidate, sigma, verbose, filter_candidates, normalize) 21 if init is None: 22 counts_40kb, lengths_40kb = utils.downsample_resolution( ---> 23 counts, lengths, coefficient=coef) 24 25 if normalize: ~/.conda/envs/centurion/lib/python3.6/site-packages/centurion/utils.py in downsample_resolution(counts, lengths, coefficient) 41 sub_target_counts = target_counts[target_begin_i:target_end_i, 42 target_begin_j:target_end_j] ---> 43 for start in range(coefficient): 44 s = sub_counts[start::coefficient, start::coefficient] 45 sub_target_counts[:s.shape[0], :s.shape[1]] += s TypeError: 'float' object cannot be interpreted as an integer
because centromeres_calls.centromeres_calls() attempts division without flooring:
centromeres_calls.centromeres_calls()
if sigma is None: sigma = 80000 / resolution coef = 40000 / resolution
In Py3, division (even between two integers) yields a float, which could be avoided instead by using floor division (which returns an int):
float
int
if sigma is None: sigma = 80000 // resolution coef = 40000 // resolution
In order to make Centurion Py3-compatible, floor division should be used everywhere an integer is expected to be returned.
Thanks!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi Devs,
I'm reporting this just in case you intend Centurion to be Py3-compatible.
I'm getting the following error:
because
centromeres_calls.centromeres_calls()
attempts division without flooring:In Py3, division (even between two integers) yields a
float
, which could be avoided instead by using floor division (which returns anint
):In order to make Centurion Py3-compatible, floor division should be used everywhere an integer is expected to be returned.
Thanks!
The text was updated successfully, but these errors were encountered: