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

"negative dimensions" error #6

Open
V-JJ opened this issue Aug 31, 2022 · 0 comments
Open

"negative dimensions" error #6

V-JJ opened this issue Aug 31, 2022 · 0 comments

Comments

@V-JJ
Copy link

V-JJ commented Aug 31, 2022

Good evening!

I'm running into this error from time to time, depending on the input matrix => ValueError: negative dimensions are not allowed
I don't understand where this error comes from.

Any help would be appreciated,
Many thanks!

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-20-775a9b82f10c> in <module>()
     18                 out_centrom_fig = "{}/{}/centromere_figures/{}.png".format(resolution_value, k_scf, os.path.basename(submatrix_path))
     19 
---> 20                 CentromesOnSubamtrix(submatrix_path, resolution_value, centromere_record_file, out_centrom_fig)
     21 

<ipython-input-18-5b5b26e1311b> in CentromesOnSubamtrix(i_submatrix_file, i_resolution, o_file, o_fig)
     63     # Call centromeres
     64     try:
---> 65         centromeres = centromeres_calls.centromeres_calls(counts, lengths, resolution=i_resolution)
     66         print(centromeres)
     67         # Figure

/media/vadim/DATA/Local4T/Programs/miniconda3/envs/centurion_py27/lib/python2.7/site-packages/centurion/centromeres_calls.pyc 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:

/media/vadim/DATA/Local4T/Programs/miniconda3/envs/centurion_py27/lib/python2.7/site-packages/centurion/utils.pyc in downsample_resolution(counts, lengths, coefficient)
     26     target_lengths = np.ceil(lengths.astype(float) / coefficient).astype(int)
     27     target_counts = np.zeros((target_lengths.sum(),
---> 28                               target_lengths.sum()))
     29     begin_i, end_i = 0, 0
     30     target_begin_i, target_end_i = 0, 0

ValueError: negative dimensions are not allowed
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

No branches or pull requests

1 participant