bacpop / ggCaller

Bifrost graph gene caller.
MIT License
86 stars 6 forks source link

ImportError: cannot import name 'UnknownSeq' from 'Bio.Seq' #6

Closed Czirion closed 1 year ago

Czirion commented 1 year ago

Hi,

I tried the installation through conda and from source in 3 different computers and get very similar error messages when I test with "ggcaller --help".

This is the error with the installation from source:

Traceback (most recent call last): File "/home/user/anaconda3/envs/ggc_env/bin/ggcaller", line 33, in sys.exit(load_entry_point('ggCaller==1.3.3', 'console_scripts', 'ggcaller')()) File "/home/user/anaconda3/envs/ggc_env/bin/ggcaller", line 25, in importlib_load_entry_point return next(matches).load() File "/home/user/anaconda3/envs/ggc_env/lib/python3.9/importlib/metadata.py", line 86, in load module = import_module(match.group('module')) File "/home/user/anaconda3/envs/ggc_env/lib/python3.9/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/home/user/anaconda3/envs/ggc_env/lib/python3.9/site-packages/ggCaller-1.3.3-py3.9-linux-x86_64.egg/ggCaller/main.py", line 12, in from panaroo_runner.main import run_panaroo File "/home/user/anaconda3/envs/ggc_env/lib/python3.9/site-packages/ggCaller-1.3.3-py3.9-linux-x86_64.egg/panaroo_runner/main.py", line 12, in from .generate_output import * File "/home/user/anaconda3/envs/ggc_env/lib/python3.9/site-packages/ggCaller-1.3.3-py3.9-linux-x86_64.egg/panaroo_runner/generate_output.py", line 14, in from BCBio import GFF File "/home/user/anaconda3/envs/ggc_env/lib/python3.9/site-packages/BCBio/GFF/init.py", line 3, in from BCBio.GFF.GFFParser import GFFParser, DiscoGFFParser, GFFExaminer, parse, parse_simple File "/home/user/anaconda3/envs/ggc_env/lib/python3.9/site-packages/BCBio/GFF/GFFParser.py", line 34, in from Bio.Seq import UnknownSeq ImportError: cannot import name 'UnknownSeq' from 'Bio.Seq' (/home/user/anaconda3/envs/ggc_env/lib/python3.9/site-packages/Bio/Seq.py)

Thanks!

samhorsfield96 commented 1 year ago

Hi, could you run conda list in the ggCaller environment and paste the output here, please? There may be an issue with some of the dependency versions.

benrhodes26 commented 1 year ago

I had the same issue. I think the version of biopython needs pinning to 1.7.9 in the environment.yml file.

samhorsfield96 commented 1 year ago

The latest version of biopython (v1.81) has removed the UnknownSeq object. @benrhodes26 has kindly looked into this - in the ggcaller environment run conda install biopython=1.80 (UnknownSeq is also still available in this version) and retry running ggCaller as before.

Czirion commented 1 year ago

Hi,

Thank you very much @samhorsfield96 and @benrhodes26!

Installing the biopython version 1.80 worked!