murphycj / AGFusion

Python package to annotate and visualize gene fusions.

Home Page:https://www.agfusion.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bio.Alphabet has been removed from Biopython.

fizwit opened this issue · comments

import error when loading Bio.Alphabet. BioPython version 1.78

>>> import agfusion
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/app/software/Python/Python-3.8.6/lib/python3.8/site-packages/agfusion/__init__.py", line 2, in <module>
    from .model import *
  File "/app/software/Python/Python-3.8.6/lib/python3.8/site-packages/agfusion/model.py", line 9, in <module>
    from Bio.Alphabet import generic_dna, generic_protein
  File "/app/software/Biopython/1.78/Python-3.8.6/lib/python3.8/site-packages/Bio/Alphabet/__init__.py", line 20, in <module>
    raise ImportError(
ImportError: Bio.Alphabet has been removed from Biopython. In many cases, the alphabet can simply be ignored and removed from scripts. In a few cases, you may need to specify the ``molecule_type`` as an annotation on a SeqRecord for your script to work correctly. Please see https://biopython.org/wiki/Alphabet for more information.

"""Alphabets were previously used to declare sequence type and letters (OBSOLETE).

The design of Bio.Aphabet included a number of historic design choices
which, with the benefit of hindsight, were regretable. Bio.Alphabet was
therefore removed from Biopython in release 1.78. Instead, the molecule type is
included as an annotation on SeqRecords where appropriate.

Please see https://biopython.org/wiki/Alphabet for examples showing how to
transition from Bio.Alphabet to molecule type annotations.
"""

Very belated reply :) But this has been fixed in v1.3.0 release.