Skip to content
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

Fail to fetch-load RefSeq sequences #166

Open
gromdimon opened this issue Aug 8, 2024 · 0 comments
Open

Fail to fetch-load RefSeq sequences #166

gromdimon opened this issue Aug 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@gromdimon
Copy link

Describe the bug
Currently there's a bug in fetch-load method.

To Reproduce
Steps to reproduce the behavior:

  1. Install seqrepo
  2. sudo mkdir -p /usr/local/share/seqrepo
  3. sudo chown $USER /usr/local/share/seqrepo
  4. seqrepo init -i some-name
  5. seqrepo fetch-load -i some-name -n RefSeq NC_000001.10 NC_000002.11
  6. See the error (below)
Traceback (most recent call last):
  File "/Users/gromdimon/.local/share/virtualenvs/auto-acmg-zfFpTw_m/bin/seqrepo", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/gromdimon/.local/share/virtualenvs/auto-acmg-zfFpTw_m/lib/python3.12/site-packages/biocommons/seqrepo/cli.py", line 732, in main
    opts.func(opts)
  File "/Users/gromdimon/.local/share/virtualenvs/auto-acmg-zfFpTw_m/lib/python3.12/site-packages/biocommons/seqrepo/cli.py", line 466, in fetch_load
    if aliases_cur.fetchone() is not None:
       ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'generator' object has no attribute 'fetchone'

Expected behavior
Fetch-load should work properly.

Additional context
This fixes the problem:

sed -i -e 's/if aliases_cur.fetchone() is not None/if next(aliases_cur, None) is not None/' \
  <your-path-to-lib>/biocommons/seqrepo/cli.py
@gromdimon gromdimon added the bug Something isn't working label Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant