Skip to content

"negative dimensions" error #6

@V-JJ

Description

@V-JJ

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions