aristoteleo / Scribe-Python-notebooks

Tutorials of Scribe Python package usage cases
3 stars 2 forks source link

problem running Scribe(adata, t0_key='spliced', t1_key='unspliced') #2

Open polakme opened 4 years ago

polakme commented 4 years ago

Hi Xiaojie, A really cool tool for building the network, thanks for putting it together. When running NASC_seq_Jurkat_T_cell_demo.ipynb with the demo data I was not able to calculate causality score running Scribe(adata, t0_key='spliced', t1_key='unspliced').

Full error text:

IndexError Traceback (most recent call last)

in ----> 1 Scribe(adata, t0_key='spliced', t1_key='unspliced') /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/Scribe/Scribe.py in causal_net_dynamics_coupling(adata, TFs, Targets, guide_keys, t0_key, t1_key, normalize, drop_zero_cells, copy) 127 z_orig = [[i] for i in z_orig] 128 --> 129 causal_net.loc[g_a, g_b] = cmi(x_orig, y_orig, z_orig) 130 131 adata.uns['causal_net'] = {"RDI": causal_net.fillna(0)} /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/Scribe/information_estimators.py in cmi(x_orig, y_orig, z_orig, normalization, k) 144 N = len(x) 145 --> 146 dx = len(x[0]) 147 dy = len(y[0]) 148 dz = len(z[0]) IndexError: list index out of range Fixed with your advise by setting drop_zero_cells=False in the function causal_net_dynamics_coupling Scribe(adata, t0_key='spliced', t1_key='unspliced', drop_zero_cells=False) Hope this report maybe useful for others Thanks!
limenglingll commented 2 years ago

Hi Xiaojie, A really cool tool for building the network, thanks for putting it together. When running NASC_seq_Jurkat_T_cell_demo.ipynb with the demo data I was not able to calculate causality score running Scribe(adata, t0_key='spliced', t1_key='unspliced').

Calculate causality score (RDI) from each TF to potential target:: 0%| | 0/25 [00:00<?, ?it/s] Why?