pySCENIC icon indicating copy to clipboard operation
pySCENIC copied to clipboard

The binary file can not be produced and triggerred error

Open honghh2018 opened this issue 3 years ago • 1 comments

Hi @All, The human data to run the pyscenic display below error: The pyscenic can generated the auc matrix well but the binary matirx. the error showing below:
Base on this condition, how can i fix this issue. Any advice would be appreciated. hanhuihong slopes = (work_cdf[1:] - work_cdf[0]) / distances /home/sy/miniconda3/envs/jupyter20200827/lib/python3.7/site-packages/pyscenic/diptest.py:30: RuntimeWarning: divide by zero encou ntered in true_divide slopes = (work_cdf[1:] - work_cdf[0]) / distances multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/home/sy/miniconda3/envs/jupyter20200827/lib/python3.7/multiprocessing/pool.py", line 121, in worker result = (True, func(*args, **kwds)) File "/home/sy/miniconda3/envs/jupyter20200827/lib/python3.7/multiprocessing/pool.py", line 47, in starmapstar return list(itertools.starmap(args[0], args[1])) File "/home/sy/miniconda3/envs/jupyter20200827/lib/python3.7/site-packages/pyscenic/binarization.py", line 52, in derive_thresh old if not isbimodal(data, method): File "/home/sy/miniconda3/envs/jupyter20200827/lib/python3.7/site-packages/pyscenic/binarization.py", line 43, in isbimodal , pval, _ = diptst(np.msort(data)) File "/home/sy/miniconda3/envs/jupyter20200827/lib/python3.7/site-packages/pyscenic/diptest.py", line 53, in diptst d, (, idxs, left, _, right, _) = dip_fn(dat, is_hist) File "/home/sy/miniconda3/envs/jupyter20200827/lib/python3.7/site-packages/pyscenic/diptest.py", line 115, in dip_fn xl = left_touchpoints[d_left == left_diffs][0] IndexError: index 0 is out of bounds for axis 0 with size 0 """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/share/nas1/Data/PipeLine/Other/PyScenic/bin/FindTfRegulon.py", line 116, in binary_mtx, auc_thresholds = binarize(auc_mtx, num_workers = 15) File "/home/sy/miniconda3/envs/jupyter20200827/lib/python3.7/site-packages/pyscenic/binarization.py", line 79, in binarize thresholds = derive_thresholds(auc_mtx) File "/home/sy/miniconda3/envs/jupyter20200827/lib/python3.7/site-packages/pyscenic/binarization.py", line 77, in derive_thresh olds thrs = p.starmap( derive_threshold, [ (auc_mtx, c, seed) for c in auc_mtx.columns ] ) File "/home/sy/miniconda3/envs/jupyter20200827/lib/python3.7/multiprocessing/pool.py", line 276, in starmap return self._map_async(func, iterable, starmapstar, chunksize).get() File "/home/sy/miniconda3/envs/jupyter20200827/lib/python3.7/multiprocessing/pool.py", line 657, in get raise self._value File "/home/sy/miniconda3/envs/jupyter20200827/lib/python3.7/multiprocessing/pool.py", line 121, in worker result = (True, func(*args, **kwds)) File "/home/sy/miniconda3/envs/jupyter20200827/lib/python3.7/multiprocessing/pool.py", line 47, in starmapstar return list(itertools.starmap(args[0], args[1])) File "/home/sy/miniconda3/envs/jupyter20200827/lib/python3.7/site-packages/pyscenic/binarization.py", line 52, in derive_thresh old if not isbimodal(data, method): File "/home/sy/miniconda3/envs/jupyter20200827/lib/python3.7/site-packages/pyscenic/binarization.py", line 43, in isbimodal , pval, _ = diptst(np.msort(data)) File "/home/sy/miniconda3/envs/jupyter20200827/lib/python3.7/site-packages/pyscenic/diptest.py", line 53, in diptst d, (, idxs, left, _, right, _) = dip_fn(dat, is_hist) File "/home/sy/miniconda3/envs/jupyter20200827/lib/python3.7/site-packages/pyscenic/diptest.py", line 115, in dip_fn xl = left_touchpoints[d_left == left_diffs][0] IndexError: index 0 is out of bounds for axis 0 with size 0

honghh2018 avatar Apr 13 '21 09:04 honghh2018

It was very weird, when i rerun the same command, it was successful. Why was the error generated occasionally ? what happen on this binarization.py scripts? could anyone help? any advice would be appreciated. hanhuihong

honghh2018 avatar Apr 14 '21 01:04 honghh2018