You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Decoupler fails to Import MSigDB resouce using when trying to get the "mouse" version of the genes.
I am not quite sure if this is a problem lies in deocupleR or in pypath. I've seen that similar issues have been raised in the past saezlab/pypath#218 but none of the workarounds solved the error.
I've run into the error on python 3.11 with the latest versions of pypath and decoupler-py installed from github.
>>> msigdb = dc.get_resource('MSigDB',organism = "mouse")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/decoupler/omnip.py", line 229, in get_resource
df = translate_net(
^^^^^^^^^^^^^^
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/decoupler/omnip.py", line 586, in translate_net
hom_net = homology.translate_df(
^^^^^^^^^^^^^^^^^^^^^^
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/pypath/utils/homology.py", line 1898, in translate_df
return manager.translate_df(**args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/pypath/utils/homology.py", line 477, in translate_df
table = self.which_table(
^^^^^^^^^^^^^^^^^
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/pypath/utils/homology.py", line 178, in which_table
self.load(key)
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/pypath/utils/homology.py", line 209, in load
self.tables[key] = self._load(key)
^^^^^^^^^^^^^^^
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/pypath/utils/homology.py", line 219, in _load
return ProteinHomology(
^^^^^^^^^^^^^^^^
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/pypath/utils/homology.py", line 712, in __init__
self.load(source)
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/pypath/utils/homology.py", line 728, in load
self.load_homologene(source)
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/pypath/utils/homology.py", line 1203, in load_homologene
mapping.map_name(e, 'entrez', 'uniprot', self.target)
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/pypath/utils/mapping.py", line 3564, in map_name
return mapper.map_name(
^^^^^^^^^^^^^^^^
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/pypath/share/common.py", line 2772, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/pypath/utils/mapping.py", line 2197, in map_name
mapped_names = self.uniprot_cleanup(
^^^^^^^^^^^^^^^^^^^^^
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/pypath/utils/mapping.py", line 2226, in uniprot_cleanup
uniprots = self.primary_uniprot(uniprots)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/pypath/utils/mapping.py", line 2838, in primary_uniprot
primary = self.map_name(
^^^^^^^^^^^^^^
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/pypath/share/common.py", line 2772, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/pypath/utils/mapping.py", line 1982, in map_name
mapped_names = self._map_name(
^^^^^^^^^^^^^^^
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/pypath/utils/mapping.py", line 2514, in _map_name
tbl = self.which_table(
^^^^^^^^^^^^^^^^^
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/pypath/utils/mapping.py", line 1575, in which_table
self.load_mapping(
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/pypath/utils/mapping.py", line 3212, in load_mapping
reader = MapReader(param = resource, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/pypath/utils/mapping.py", line 257, in __init__
self.load()
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/pypath/utils/mapping.py", line 287, in load
self.read()
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/pypath/utils/mapping.py", line 449, in read
getattr(self, method)()
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/pypath/utils/mapping.py", line 560, in read_mapping_file
for i, line in enumerate(infile):
File "/omics/groups/OE0436/internal/heyer/conda/envs/decoupler_test/lib/python3.11/site-packages/pypath/inputs/uniprot.py", line 479, in get_uniprot_sec
enumerate(c.result)
TypeError: 'NoneType' object is not iterable
Expected behavior
Expect array to be loaded with MSigDB data from given organism.
Because this happens in pypath.inputs.uniprot.get_uniprot_sec, most likely it is a download issue, a transient network error. It makes sense to try it again, or try on a different network. I've just tested it right now with empty cache and it worked.
However, even if this error is successfully addressed as I suggest above, we might expect another error due to the recent transition to the new UniProt API in pypath. In this case, I have to ask a little more patience, this is a major change in pypath and still a few things don't work, that we're trying to fix asap.
I see the same error happening in the builds of decoupler @deeenes. What is weird is that if I rerun the jobs, eventually it works, so it might be a transient network error. Is there anything that could be done to make it more stable?
Thanks for the quick answer. RIght now I am also working behind a proxy server so that might also interfere with network connectivity. For now I'll just download the data with OmnipathR and ship it over to python (or just stick with R for now).
Describe the bug
Decoupler fails to Import MSigDB resouce using when trying to get the "mouse" version of the genes.
I am not quite sure if this is a problem lies in deocupleR or in pypath. I've seen that similar issues have been raised in the past saezlab/pypath#218 but none of the workarounds solved the error.
I've run into the error on python 3.11 with the latest versions of pypath and decoupler-py installed from github.
To Reproduce
Traceback:
Expected behavior
Expect array to be loaded with MSigDB data from given organism.
System
Let me know if you require any further information from me.
Additional context
Output Pip Freeze:
The text was updated successfully, but these errors were encountered: