-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: After removing rows with only NaN interactions, none remain. #122
Comments
+1 |
1 similar comment
+1 |
+1 yes the same error :( |
hi, which version of squidpy are you using? |
1.4.1 |
I got the same error using squidpy on my own data. It happened when I was using raw counts. After log-normalizing, the function worked.
|
@Silaschuwen have you used normalized data? |
i tried normalized data but it doesn't look like it's working out very well. here is my code (the same as the notebooks/examples) @amonell may i ask you what is your version of squidpy?
ValueError: After removing rows with only NaN interactions, none remain. |
@Silaschuwen You have "use_raw" set to true which may be using un-normalized counts. I would try setting it to False. I am using Squidpy version 1.3.1 in python 3.10 |
thanks so much! everything works smoothly~ |
Following the same jupyter notebook (tutorial_visium_hne.ipynb) with the same tutorial data but got the following error:
ValueError Traceback (most recent call last)
Cell In[10], line 6
1 sq.gr.ligrec(
2 adata,
3 n_perms=100,
4 cluster_key="cluster",
5 )
----> 6 sq.pl.ligrec(
7 adata,
8 cluster_key="cluster",
9 source_groups="Hippocampus",
10 target_groups=["Pyramidal_layer", "Pyramidal_layer_dentate_gyrus"],
11 means_range=(3, np.inf),
12 alpha=1e-4,
13 swap_axes=True,
14 )
File
\squidpy\lib\site-packages\squidpy\pl_ligrec.py: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)(pd.isnull(means) | pd.isnull(pvals)), kind="NaN")292 pvals = pvals[pvals <= pvalue_threshold]
294 if remove_empty_interactions:
--> 295 pvals, means = filter_values(pvals, means, mask=
296 if remove_nonsig_interactions and alpha is not None:
297 pvals, means = filter_values(pvals, means, mask=pvals <= alpha, kind="non-significant")
File ~\squidpy\lib\site-packages\squidpy\pl_ligrec.py:205, in ligrec..filter_values(pvals, means, mask, kind)
202 means = means.loc[mask_rows]
204 if pvals.empty:
--> 205 raise ValueError(f"After removing rows with only {kind} interactions, none remain.")
207 mask_cols = mask.any(axis=0)
208 pvals = pvals.loc[:, mask_cols]
ValueError: After removing rows with only NaN interactions, none remain.
Thank you for any help!
The text was updated successfully, but these errors were encountered: