Bio.Alphabet has been removed from Biopython??

Hi everyone,
I’m trying to run a panaroo using the following command: panaroo -i *.gff -o ./charlotte_new/ --clean-mode strict -a core --aligner clustal --core_threshold 0.98 -t 10 --remove-invalid-genes

But i get the following error instead:

Traceback (most recent call last):
File “/shared/team/conda/cerith-jones.bacterial-genom-3/panaroo/bin/panaroo”, line 6, in
from panaroo.main import main
File “/shared/team/conda/cerith-jones.bacterial-genom-3/panaroo/lib/python3.12/site-packages/panaroo/main.py”, line 14, in
from .generate_output import *
File “/shared/team/conda/cerith-jones.bacterial-genom-3/panaroo/lib/python3.12/site-packages/panaroo/generate_output.py”, line 10, in
from Bio.Alphabet import generic_dna
File “/shared/team/conda/cerith-jones.bacterial-genom-3/panaroo/lib/python3.12/site-packages/Bio/Alphabet/init.py”, line 20, in
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 History and replacement of Bio.Alphabet · Biopython for more information

I have used the same line of code before and it’s worked fine, I don’t understand the Bio.Alphabet has been removed from Biopython, as I’ve never had an alphabet in my code before??? Is there some new code I should be using?
the panaroo version i have installed is 1.1.2, biopython version i have installed is 1.83, conda version is 23.1.0
I have read that downgrading the biopython version can help solve this error but i’ve had no luck with this. I’ve tried uninstalling and reinstalling the panaroo

Kind of new to all this so any help would be appreciated thanks :slight_smile:

The package you installed, panaroo, uses Bio.Alphabet in its code.

You could try creating the environment again, but specifying a lower version of Biopython (one that still ships Bio.Alphabet), or a higher version of panaroo, since this seems to have been fixed.

Some links from the panaroo tracker: