saezlab / pypath

Python module for prior knowledge integration. Builds databases of signaling pathways, enzyme-substrate interactions, complexes, annotations and intercellular communication roles.
http://omnipathdb.org/
GNU General Public License v3.0
134 stars 47 forks source link

Annotation loading error #98

Closed luli7 closed 5 years ago

luli7 commented 5 years ago

Hi Everyone,

I am using PyPath dev version 0.8.20 under python 3.6. I have pickled annotation, however when loading it back, I got following error messages (I also got exactly the same message when loading annotation without pickle a=annot.AnnotationTable()):

a=annot.AnnotationTable(pickle_file='know/software/pypath/annot_31db_20190619.pickle') Traceback (most recent call last): File "", line 1, in File "/home/luli7/.local/lib/python3.6/site-packages/pypath/annot.py", line 2132, in init self.set_reference_set() File "/home/luli7/.local/lib/python3.6/site-packages/pypath/annot.py", line 2279, in set_reference_set swissprot_only = self.swissprot_only, File "/home/luli7/.local/lib/python3.6/site-packages/pypath/annot.py", line 605, in get_reference_set sorted(complex.all_complexes()) File "/home/luli7/.local/lib/python3.6/site-packages/pypath/complex.py", line 478, in all_complexes db = get_db() File "/home/luli7/.local/lib/python3.6/site-packages/pypath/complex.py", line 466, in get_db init_db(kwargs) File "/home/luli7/.local/lib/python3.6/site-packages/pypath/complex.py", line 455, in init_db globals()['db'] = ComplexAggregator(kwargs) File "/home/luli7/.local/lib/python3.6/site-packages/pypath/complex.py", line 377, in init name = 'OmniPath', File "/home/luli7/.local/lib/python3.6/site-packages/pypath/complex.py", line 94, in init self.load() File "/home/luli7/.local/lib/python3.6/site-packages/pypath/complex.py", line 412, in load processor = res() File "/home/luli7/.local/lib/python3.6/site-packages/pypath/complex.py", line 220, in init input_method = 'cellphonedb_complexes', File "/home/luli7/.local/lib/python3.6/site-packages/pypath/complex.py", line 94, in init self.load() File "/home/luli7/.local/lib/python3.6/site-packages/pypath/complex.py", line 99, in load resource.AbstractResource.load(self) File "/home/luli7/.local/lib/python3.6/site-packages/pypath/resource.py", line 77, in load self.load_data() File "/home/luli7/.local/lib/python3.6/site-packages/pypath/resource.py", line 114, in load_data self.data = self.input_method(**self.input_args) File "/home/luli7/.local/lib/python3.6/site-packages/pypath/dataio.py", line 6360, in cellphonedb_complexes annot = cellphonedb_complex_annotations() File "/home/luli7/.local/lib/python3.6/site-packages/pypath/dataio.py", line 6224, in cellphonedb_complex_annotations name_method = name_method, File "/home/luli7/.local/lib/python3.6/site-packages/pypath/dataio.py", line 6187, in _cellphonedb_annotations receptor = get_desc(rec, 'receptor'), File "/home/luli7/.local/lib/python3.6/site-packages/pypath/dataio.py", line 6171, in get_desc attr not in rec and not rec[desc] KeyError: 'receptor_desc'

luli7 commented 5 years ago

Hi,

I looked at my log file. I feels like, even loading a pickle file, PyPath is still trying to down-load new files from github. last line of log file: [2019-06-25 10:53:03] [curl] File at https://raw.githubusercontent.com/Teichlab/cellphonedb/master/cellphonedb/src/core/data/complex.csv successfully retrieved. Resulted file type plain text, file object. Local file at /home/luli7/.pypath/cache/e77b828b6eb5ddaa1145375877d4b76a-complex.csv.

When I open this file from cache, it is empty containing only: 404: Not Found 404: Not Found 404: Not Found

I think Cellphonedb potentially changed their URL for this data set, and it feels like there are also some re-naming after looking at: https://github.com/Teichlab/cellphonedb/tree/master/cellphonedb/src/core/data

Could you please fix this issue?

Thank you so much! Best regards Lu

npalacioescat commented 5 years ago

Hi Lu,

We are aware that CellPhone DB recently updated its database and some fields and URLs have changed since the previous version. This issue will be addressed ASAP.

Cheers

deeenes commented 5 years ago

Hi Lu,

Thanks for reporting it, fixed in 148637a

Best,

Denes