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

ModuleNotFoundError: No module named 'pyensembl.biotypes' #3

Closed
aravindprasad opened this issue Jun 1, 2022 · 2 comments
Closed

ModuleNotFoundError: No module named 'pyensembl.biotypes' #3

aravindprasad opened this issue Jun 1, 2022 · 2 comments

Comments

@aravindprasad
Copy link

aravindprasad commented Jun 1, 2022

I installed from source using the conda method and the install works without any errors

$ git clone https://github.com/ctokheim/deepDegron
$ cd deepDegron
$ conda env create -f environment.yml  # install dependencies
$ conda activate deepDegron  # activate environment
$ pyensembl install --release 75 --species human  # download human hg19 reference data
$ pyensembl install --release 95 --species human  # download human hg38 reference data
$ python setup.py install  # install deepDegron

So far so good. But when you run the example from the tutorial in the documentation, I get the following error

Command:

$ deepdegron score -i tests/data/gata3_mutations.txt -c models/cterm/neural_network_pos_specific.pickle,models/cterm/neural_network_bag_of_amino_acids.pickle -o GATA3_delta_degron_potential.txt

Error:

Traceback (most recent call last):
  File "/opt/conda/envs/deepDegron/bin/deepdegron", line 33, in <module>
    sys.exit(load_entry_point('deepDegron==1.1.0', 'console_scripts', 'deepdegron')())
  File "/opt/conda/envs/deepDegron/lib/python3.7/site-packages/deepDegron-1.1.0-py3.7.egg/deepDegron/deep_degron.py", line 170, in cli_main
    main(opts)
  File "/opt/conda/envs/deepDegron/lib/python3.7/site-packages/deepDegron-1.1.0-py3.7.egg/deepDegron/deep_degron.py", line 154, in main
    import deepDegron.score_mutations as score
  File "/opt/conda/envs/deepDegron/lib/python3.7/site-packages/deepDegron-1.1.0-py3.7.egg/deepDegron/score_mutations.py", line 18, in <module>
    import varcode
  File "/opt/conda/envs/deepDegron/lib/python3.7/site-packages/varcode/__init__.py", line 16, in <module>
    from .variant import Variant
  File "/opt/conda/envs/deepDegron/lib/python3.7/site-packages/varcode/variant.py", line 31, in <module>
    from pyensembl.biotypes import is_coding_biotype
ModuleNotFoundError: No module named 'pyensembl.biotypes'
@aravindprasad
Copy link
Author

Cause:
setuptools>=58 breaks support for use_2to3, a method from the PyVCF module. So pip ends up installing an older version of PyVCF (v0.4.3 instead of v0.6.8). This in turn installs an older version of varcode (v0.3.18 instead of v1.0.3). This older version of varcode does not have the classes used by deepDegron which causes the missing module error while running the example.

Fix:
add the following line to environment.yml

- setuptools<58

The final environment.yml looks like this

name: deepDegron
channels:
- bioconda
- defaults
dependencies:
- pip
- setuptools<58
- numpy=1.16.5
- scipy
- nose
- pandas
- scikit-learn
- tensorflow=1.14.0
- keras
- pip:
  - pyensembl
  - varcode

@ctokheim
Copy link
Owner

ctokheim commented Jun 2, 2022

Thank you for investigating the issue. I've now update the repository with your suggested change for the setuptools version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants