churchmanlab / genewalk

GeneWalk identifies relevant gene functions for a biological context using network representation learning
https://churchman.med.harvard.edu/genewalk
BSD 2-Clause "Simplified" License
127 stars 14 forks source link

IndexError: list index out of range #34

Closed eskederks closed 3 years ago

eskederks commented 3 years ago

I ran genewalk from a virtual environment (to avoid conflicting version dependencies) and received the following error (“IndexError”):

Traceback (most recent call last): File "/software/genewalk/Python-3.9.0-genewalk-1.4.0-venv/bin/genewalk", line 5, in from genewalk.cli import main File "/software/genewalk/Python-3.9.0-genewalk-1.4.0-venv/lib/python3.9/site-packages/genewalk/cli.py", line 12, in from genewalk.gene_lists import read_gene_list File "/software/genewalk/Python-3.9.0-genewalk-1.4.0-venv/lib/python3.9/site-packages/genewalk/gene_lists.py", line 8, in from indra.databases import hgnc_client, uniprot_client File "/software/genewalk/Python-3.9.0-genewalk-1.4.0-venv/lib/python3.9/site-packages/indra/databases/uniprot_client.py", line 10, in from protmapper.uniprot_client import * File "/software/genewalk/Python-3.9.0-genewalk-1.4.0-venv/lib/python3.9/site-packages/protmapper/init.py", line 16, in from protmapper.api import ProtMapper, MappedSite File "/software/genewalk/Python-3.9.0-genewalk-1.4.0-venv/lib/python3.9/site-packages/protmapper/api.py", line 712, in uniprot_client._build_hgnc_mappings() File "/software/genewalk/Python-3.9.0-genewalk-1.4.0-venv/lib/python3.9/site-packages/protmapper/uniprot_client.py", line 1221, in _build_hgnc_mappings uniprot_id = row[6] IndexError: list index out of range

Any thoughts on why this error arises?

bgyori commented 3 years ago

I couldn't reproduce this issue in a clean Python 3.9 virtualenv so my guess is that the download of the HGNC resource file failed and is truncated, hence the index error. Please try doing the following:

rm ~/.protmapper/0.0.19/hgnc_entries.tsv
python -m protmapper.resources

You should then see ~/.protmapper/0.0.19/hgnc_entries.tsv that is about 4.3 MB in size.

eskederks commented 3 years ago

Thanks Benjamin, that solved the issue