mnnpy
mnnpy copied to clipboard
Index out of bounds, Looking for MNN not working.
I am trying to perform MNN correction for two different AnnData on Google Collabs. I sub-setted both the data to 1000 observation to check if it works or not. I am getting the error 'index 1000 is out of bounds for axis 0 with size 1000'. Following is the output of the cell.
Performing cosine normalization... Starting MNN correct iteration. Reference batch: 0 Step 1 of 1: processing batch 1 Looking for MNNs...
/usr/local/lib/python3.6/dist-packages/mnnpy/utils.py:88: NumbaWarning: Compilation is falling back to object mode WITHOUT looplifting enabled because Function "find_mutual_nn" failed type inference due to: non-precise type pyobject [1] During: typing of argument at /usr/local/lib/python3.6/dist-packages/mnnpy/utils.py (94)
File "../../../usr/local/lib/python3.6/dist-packages/mnnpy/utils.py", line 94:
def find_mutual_nn(data1, data2, k1, k2, n_jobs):
@jit((float32[:, :], float32[:, :], int8, int8, int8)) /usr/local/lib/python3.6/dist-packages/numba/compiler.py:742: NumbaWarning: Function "find_mutual_nn" was compiled in object mode without forceobj=True.
File "../../../usr/local/lib/python3.6/dist-packages/mnnpy/utils.py", line 94:
def find_mutual_nn(data1, data2, k1, k2, n_jobs):
self.func_ir.loc)) /usr/local/lib/python3.6/dist-packages/numba/compiler.py:751: NumbaDeprecationWarning: Fall-back from the nopython compilation path to the object mode compilation path has been detected, this is deprecated behaviour.
For more information visit http://numba.pydata.org/numba-doc/latest/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit
File "../../../usr/local/lib/python3.6/dist-packages/mnnpy/utils.py", line 94:
def find_mutual_nn(data1, data2, k1, k2, n_jobs):
warnings.warn(errors.NumbaDeprecationWarning(msg, self.func_ir.loc))
IndexError Traceback (most recent call last)
1 frames
/usr/local/lib/python3.6/dist-packages/mnnpy/mnn.py in mnn_correct(var_index, var_subset, batch_key, index_unique, batch_categories, k, sigma, cos_norm_in, cos_norm_out, svd_dim, var_adj, compute_angle, mnn_order, svd_mode, do_concatenate, save_raw, n_jobs, *datas, **kwargs) 177 print(' Looking for MNNs...') 178 mnn_ref, mnn_new = find_mutual_nn(data1=ref_batch_in, data2=new_batch_in, k1=k, k2=k, --> 179 n_jobs=n_jobs) 180 print(' Computing correction vectors...') 181 correction_in = compute_correction(ref_batch_in, new_batch_in, mnn_ref, mnn_new,
IndexError: index 1000 is out of bounds for axis 0 with size 1000
Good day,
I am having the same IndexError (index 94690974066032 is out of bounds for axis 0 with size 5487). Any solutions for this issue so far?
Thanks in advance