saezlab / liana-py

LIANA+: an all-in-one framework for cell-cell communication
http://liana-py.readthedocs.io/
GNU General Public License v3.0
151 stars 19 forks source link

Metabolite-protein interaction analysis did not show results #124

Closed jun-miao113 closed 1 month ago

jun-miao113 commented 2 months ago

Hello! When I wanted to use liana+ to perform metabolite-protein interactions analysis of my transcriptome data, I encountered some problems. Here is my code: testis_metalinks_db=li.resource.get_metalinks(tissue_location='Testis', biospecimen_location='Blood') testis_metalinks_db

metabolite hmdb uniprot gene_symbol
Deoxyuridine HMDB0000012 P04818 TYMS
Deoxyuridine HMDB0000012 P33316 DUT
Deoxyuridine HMDB0000012 Q16831 UPP1
Deoxyuridine HMDB0000012 Q8TCD5 NT5C
Androsterone HMDB0000031 Q15466 NR0B2
... ... ... ...
Calcidiol HMDB0003550 Q13950 RUNX2
Calcidiol HMDB0003550 Q96PD4 IL17F
Calcidiol HMDB0003550 Q9Y3Z3 SAMHD1
5a-Pregnane-3,20-dione HMDB0003759 P06401 PGR
11beta-Hydroxyprogesterone HMDB0004031 P08235 NR3C2

testis_metalinks_db.columns = ['ligand', 'hmdb', 'uniprot', 'receptor'] cellphonedb(adata, groupby='Celltype', resource = testis_metalinks_db, interactions = list(zip(testis_metalinks_db['ligand'],testis_metalinks_db['receptor'])), expr_prop=0.1, verbose=True, key_added='cpdb_res') Generating ligand-receptor stats for 1964 samples and 0 features 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1000/1000 [00:02<00:00, 398.60it/s]

Why didn't we finally get any information about the metabolite-protein interaction? Is my function being used incorrectly?

I would be very grateful if you could give me an answer!! Best Wishes!

dbdimitrov commented 2 months ago

Hi @cpy113,

This would only work if the metabolites are also present in your .X matrix. Since I assume you are running this on single-cell transcriptomic data, it's likely not the case.

So, I assume you might need to estimate the metabolite abundances prior to running liana, I will try to write a simple tutorial on how this could be done by the end of next week.

I will keep you posted.

Daniel

jun-miao113 commented 2 months ago

Hi @cpy113,

This would only work if the metabolites are also present in your .X matrix. Since I assume you are running this on single-cell transcriptomic data, it's likely not the case.

So, I assume you might need to estimate the metabolite abundances prior to running liana, I will try to write a simple tutorial on how this could be done by the end of next week.

I will keep you posted.

Daniel

Thank you so much! Looking forward to your reply.

dbdimitrov commented 1 month ago

Hi @cpy113, I just merged an update.

The docs how to do it w LIANA+ are here: https://liana-py.readthedocs.io/en/latest/notebooks/sc_multi.html#Metabolite-mediated-CCC-from-Transcriptomics-Data

this would give you metabolite-receptor results, from there on you can follow up with the other LIANA+ tutorials.

Hope this helps. I will close the issue but please feel free to open new ones if you need help.

dbdimitrov commented 1 month ago

PS. I will wait a couple of days before I do a release on pip. So, please install liana from github:

pip install git+https://github.com/saezlab/liana-py --upgrade

jun-miao113 commented 1 month ago

Hi @cpy113, I just merged an update.

The docs how to do it w LIANA+ are here: https://liana-py.readthedocs.io/en/latest/notebooks/sc_multi.html#Metabolite-mediated-CCC-from-Transcriptomics-Data

this would give you metabolite-receptor results, from there on you can follow up with the other LIANA+ tutorials.

Hope this helps. I will close the issue but please feel free to open new ones if you need help.

Thanks you for the tutorial, it will be a great help for me!