Closed wangjiawen2013 closed 12 months ago
Hi @wangjiawen2013 , I believe by default it's human database. To specify, e.g., mouse, you should do:
df = op.interactions.import_intercell_network(
interactions_params={"organism": "mouse"},
transmitter_params={"categories": "ligand"},
receiver_params={"categories": "receptor"},
)
However, running this returned:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Input In [30], in <cell line: 1>()
----> 1 interactions, transmitters, receivers = op.interactions.import_intercell_network(
2 interactions_params={"organism": "mouse"},
3 transmitter_params={"categories": "ligand", "organism": "mouse"},
4 receiver_params={"categories": "receptor", "organism": "mouse"}
5 )
File /opt/projects/helmholtz/omnipath/omnipath/_core/requests/interactions/_utils.py:128, in import_intercell_network(include, interactions_params, transmitter_params, receiver_params)
126 return interactions, transmitters, receivers
127 res = pd.merge(interactions, transmitters, left_on="source", right_on="uniprot", how="inner")
--> 128 if res.empty:
129 raise ValueError("No values are left after merging interactions and transmitters.")
130 gb = res.groupby(["category", "parent", "source", "target"], as_index=False)
ValueError: No values are left after merging interactions and transmitters.
which I'm not sure is expected, @deeenes will definitely know more.
Hi, The error above happens because the OmniPath intercell database supports only human at the moment. Even in the network, we create mouse data by homology translation. You can download the human intercell network, and use pypath.utils.homology.translate
to translate it to mouse.
Hi, I have downloaded omnipat database with this chunk of code (https://github.com/scverse/squidpy/issues/499):
Is it a human database or mouse database ? How to specify the species in function interactions.import_intercell_network() ? It seems that it can be set in omnipath R package: https://saezlab.github.io/OmnipathR/reference/get_interaction_resources.html