Hi all,
I was trying to plot ligated-receptor interaction of a Visium slide after defining clusters.
using the follwing
res = sq.gr.ligrec(
anadata,
n_perms=1000,
cluster_key="region_clusters",
copy=True,
use_raw=False,
transmitter_params={"categories": "ligand"},
receiver_params={"categories": "receptor"},)
res["means"].head()
cluster_1 0 ... 9
cluster_2 0 1 10 ... 7 8 9
source target ...
EPOR TRPC3 0.000000 0.000000 0.009627 ... 0.000000 0.000000 0.004717
JAK2 0.013688 0.015658 0.021532 ... 0.010776 0.022767 0.009434
FYN JAK2 0.046699 0.048669 0.054543 ... 0.032002 0.043993 0.030660
CCL2 JAK2 0.041063 0.043033 0.048907 ... 0.036719 0.048710 0.035377
KIT JAK2 0.000000 0.000000 0.000000 ... 0.010776 0.022767 0.009434
[5 rows x 144 columns]
res["metadata"].head()
aspect_intercell_source ... uniprot_intercell_target
source target ...
EPOR TRPC3 functional ... Q13507
JAK2 functional ... O60674
FYN JAK2 functional ... O60674
CCL2 JAK2 functional ... O60674
KIT JAK2 functional ... O60674
[5 rows x 41 columns]
res["pvalues"].head()
cluster_1 0 ... 9
cluster_2 0 1 10 11 ... 6 7 8 9
source target ...
EPOR TRPC3 NaN NaN NaN NaN ... NaN NaN NaN NaN
JAK2 0.988 0.958 0.564 0.816 ... NaN NaN NaN NaN
FYN JAK2 0.999 0.998 0.950 0.981 ... 0.943 1.000 0.977 0.998
CCL2 JAK2 0.812 0.733 0.365 0.644 ... 0.251 0.828 0.417 0.841
KIT JAK2 NaN NaN NaN NaN ... NaN NaN NaN NaN
[5 rows x 144 columns]
it seems that the calculation works but the issue if with plotting after running
sq.pl.ligrec(res, alpha=0.005)
I get this error
TypeError: unsupported operand type(s) for +: 'int' and 'dict'
Thank you very much,
Best,