Skip to content

Wildcard organism could not be used on uniprot_data #302

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kpto opened this issue Mar 18, 2025 · 0 comments · May be fixed by #303
Open

Wildcard organism could not be used on uniprot_data #302

kpto opened this issue Mar 18, 2025 · 0 comments · May be fixed by #303
Assignees
Labels
bug Problem in the code

Comments

@kpto
Copy link
Member

kpto commented Mar 18, 2025

Describe the bug
Calling uniprot_data with argument organism="*" results to error because UniProt no longer supports this, as documented here. When the argument is None, the organism parameter should be removed.

To Reproduce
Steps to reproduce the behavior:

uniprot.uniprot_data("organism_id", organism="*", reviewed=self.rev)

Expected behavior
No error

Traceback

  File "C:\Users\Paul\Documents\GitHub\CROssBARv2\bccb\uniprot_adapter.py", line 331, in _download_uniprot_data
    self.data[query_key] = uniprot.uniprot_data(
  File "c:\Users\Paul\AppData\Local\pypoetry\Cache\virtualenvs\bccb-W1ur4Y1J-py3.10\lib\site-packages\pypath\inputs\uniprot.py", line 834, in uniprot_data       
    return uniprot_query(*query, fields = fields, **kwargs)
  File "c:\Users\Paul\AppData\Local\pypoetry\Cache\virtualenvs\bccb-W1ur4Y1J-py3.10\lib\site-packages\pypath\inputs\uniprot.py", line 899, in uniprot_query      
    return UniprotQuery(*query, fields = fields, **kwargs).perform()
  File "c:\Users\Paul\AppData\Local\pypoetry\Cache\virtualenvs\bccb-W1ur4Y1J-py3.10\lib\site-packages\pypath\inputs\uniprot.py", line 681, in perform
    _id, *variables = zip(*self)
ValueError: not enough values to unpack (expected at least 1, got 0)

Desktop (please complete the following information):

  • OS: Windows 11
  • Python version: 3.10.11
  • Version or commit hash
[[package]]
name = "pypath-omnipath"
version = "0.16.17"
description = "Molecular signaling prior knowledge processing"
optional = false
python-versions = "<4.0,>=3.9"
files = [
    {file = "pypath_omnipath-0.16.17-py3-none-any.whl", hash = "sha256:b4eb2cd958bcc4c9d71845d14b4cc0733fb08dd827fd94565ab1f0a1861af91e"},
    {file = "pypath_omnipath-0.16.17.tar.gz", hash = "sha256:dace4286eb3335300392470784a3afcf694331e6639d047698c8cecd92a55249"},
]
@kpto kpto added the bug Problem in the code label Mar 18, 2025
@npalacioescat npalacioescat self-assigned this Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Problem in the code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants