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

Problem using Google Colab notebook: 1. Install pharokka and phold - pyhmmer query_name error #375

Closed
mfmarston opened this issue Jan 18, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@mfmarston
Copy link

In early December 2024, I used the Google Colab notebook to run Pharokka and Phold and it worked well. https://colab.research.google.com/github/gbouras13/pharokka/blob/master/run_pharokka_and_phold_and_phynteny.ipynb#scrollTo=Ii39RG8eOZUx

On Jan 17 and 18 2025, I tried to run the programs in Colab and received errors in Cell 3 that I believe were due to a problem with installing the programs in Cell 1. I have a Colab Pro+ subscription. I am accessing Colab using Safari on a M2-Pro running Somona 14.7.2.

Error in Cell 3:
Input file RIP4_RW_02_0910.fasta exists
Running pharokka
Error occurred: Command 'pharokka.py -d pharokka_db -i RIP4_RW_02_0910.fasta -t 4 -o RIP4_RW_02_0910output_pharokka -p pharokka -l Default -g phanotate -f --fast' returned non-zero exit status 1.
CPU times: user 157 ms, sys: 23.4 ms, total: 180 ms
Wall time: 52.9 s

Cell 2 output:
Downloading pharokka database. This will take a few minutes. Please be patient :)
Downloading phold database. This will take a few minutes. Please be patient :)
CPU times: user 993 ms, sys: 190 ms, total: 1.18 s
Wall time: 6min 14s
0

Cell 1 "completed" in 4 minutes but the output consisted of 100s of spaces with little or no text ending in:
libnvjitlink-12.6.85 | 14.9 MB | ########## | 100%
cudnn-8.9.7.29 | 446.6 MB | ########## | 100%

... (more hidden) ...

libtorch-2.4.0 | 491.8 MB | ########## | 100%

done
Preparing transaction: done
Verifying transaction: done
Executing transaction: \ By downloading and using the cuDNN conda packages, you accept the terms and conditions of the NVIDIA cuDNN EULA -
https://docs.nvidia.com/deeplearning/cudnn/sla/index.htmldone

@gbouras13 gbouras13 changed the title Problem using Google Colab notebook: 1. Install pharokka and phold Problem using Google Colab notebook: 1. Install pharokka and phold - pyhmmer query_name error Jan 19, 2025
@gbouras13
Copy link
Owner

Hi @mfmarston ,

Thanks for raising this - turns out the error has nothing to do with Colab or installation per se, it has to do with pyhmmer's latest update to v0.11.0 https://github.com/althonos/pyhmmer/releases/tag/v0.11.0 last week fixing this issue althonos/pyhmmer#76 - 'query_name is used by pharokka.

I will push a fix for pharokka soon - in the mean time you can fix this in colab (or in regular conda installation for anyone else reading this) by force install pyhmmer v0.10.15. i.e. you can change the line in cell 1 from:

conda install -y -c conda-forge -c bioconda pip pharokka==${PHAROKKA_VERSION} python=${PYTHON_VERSION} phold==${PHOLD_VERSION} pytorch=*=cuda*

to

conda install -y -c conda-forge -c bioconda pip pharokka==${PHAROKKA_VERSION} python=${PYTHON_VERSION} phold==${PHOLD_VERSION} pytorch=*=cuda* pyhmmer==0.10.15

George

@gbouras13
Copy link
Owner

Specifically this is the error:

Traceback (most recent call last):
  File "/usr/local/bin/pharokka.py", line 489, in <module>
    main()
  File "/usr/local/bin/pharokka.py", line 349, in main
    best_results_pyhmmer = run_pyhmmer(
  File "/usr/local/bin/hmm.py", line 40, in run_pyhmmer
    protein = hits.query_name.decode()  # get protein from the hit
AttributeError: 'pyhmmer.plan7.TopHits' object has no attribute 'query_name'

@gbouras13 gbouras13 added the bug Something isn't working label Jan 19, 2025
@mfmarston
Copy link
Author

Thank you!! I changed the line of code in Colab and am running my samples now. Thank you for providing the line to change and for making these programs available in Colab.

@gbouras13
Copy link
Owner

No problems @mfmarston - once pharokka v1.7.5 is on bioconda, I will update the notebooks and there should be no remaining issues.

George

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

2 participants