-
Notifications
You must be signed in to change notification settings - Fork 110
Closed
Description
Dear authors,
Description
I'm following your tutorial:
https://squidpy.readthedocs.io/en/stable/notebooks/examples/graph/compute_ligrec.html
However, I cannot reproduce it.
When running:
sq.pl.ligrec(res, source_groups="Erythroid", alpha=0.005)
I encountered errors below:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[7], line 1
----> 1 sq.pl.ligrec(res, source_groups="Erythroid", alpha=0.005)
File [~/.conda/envs/py39_2/lib/python3.9/site-packages/squidpy/pl/_ligrec.py:296](https://ondemand.carc.usc.edu/node/a03-10.hpc.usc.edu/49178/lab/tree/~/.conda/envs/py39_2/lib/python3.9/site-packages/squidpy/pl/_ligrec.py#line=295), in ligrec(adata, cluster_key, source_groups, target_groups, means_range, pvalue_threshold, remove_empty_interactions, remove_nonsig_interactions, dendrogram, alpha, swap_axes, title, figsize, dpi, save, **kwargs)
293 pvals = pvals[pvals <= pvalue_threshold]
295 if remove_empty_interactions:
--> 296 pvals, means = filter_values(pvals, means, mask=~(pd.isnull(means) | pd.isnull(pvals)), kind="NaN")
297 if remove_nonsig_interactions and alpha is not None:
298 pvals, means = filter_values(pvals, means, mask=pvals <= alpha, kind="non-significant")
File [~/.conda/envs/py39_2/lib/python3.9/site-packages/squidpy/pl/_ligrec.py:206](https://ondemand.carc.usc.edu/node/a03-10.hpc.usc.edu/49178/lab/tree/~/.conda/envs/py39_2/lib/python3.9/site-packages/squidpy/pl/_ligrec.py#line=205), in ligrec.<locals>.filter_values(pvals, means, mask, kind)
203 means = means.loc[mask_rows]
205 if pvals.empty:
--> 206 raise ValueError(f"After removing rows with only {kind} interactions, none remain.")
208 mask_cols = mask.any(axis=0)
209 pvals = pvals.loc[:, mask_cols]
ValueError: After removing rows with only NaN interactions, none remain.
Could you please help with the problem here? Thank you so much!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels