# Error in ligand-receptor interaction ploting sq.pl.ligrec()

**URL:** <https://discourse.scverse.org/t/error-in-ligand-receptor-interaction-ploting-sq-pl-ligrec/841>\
**Category:** squidpy\
**Created:** [October 19, 2022, 12:43pm UTC](https://discourse.scverse.org/t/error-in-ligand-receptor-interaction-ploting-sq-pl-ligrec/841 "2022-10-19T12:43:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![moutazhelal](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/moutazhelal/32/401_2.png) [@moutazhelal](https://discourse.scverse.org/u/moutazhelal)\
**Post date:** [October 19, 2022, 12:43pm UTC](https://discourse.scverse.org/t/error-in-ligand-receptor-interaction-ploting-sq-pl-ligrec/841/1 "2022-10-19T12:43:55Z")

</div>

Hi all,

I was trying to plot ligated-receptor interaction of a Visium slide after defining clusters.  
using the follwing

```auto
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"},)

```

```auto
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

```auto
TypeError: unsupported operand type(s) for +: 'int' and 'dict'

```

Thank you very much,  
Best,
