DessimozLab / f1000_PhylogeneticTree

A tutorial on using OMA Browser and OMA Standalone for phylogenetic species trees reconstruction. Scripts referred to in the tutorial paper can be found here.
MIT License
1 stars 0 forks source link

Bio.Alphabet has been removed from Biopython??? #4

Closed tinycrocodile824 closed 5 months ago

tinycrocodile824 commented 5 months ago

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:

alpae commented 5 months ago

Hi,

panaroo is not something we develop in our lab. Not sure why you think this repo is a good place to post the question...

however, BioPython has a few years ago removed the Alphabet from their codebase. The version of panaroo you are using seems to still import this Alphabet package, but the version of BioPython that you installed, does not contain it anymore. I think you should probably update panaroo to the latest available version or - if this doesn't help - create an issue there.

tinycrocodile824 commented 5 months ago

@alpae Thanks for your help. Apologies I posted in the 'wrong' repo, not sure why you felt the need to be so discourteous about a simple request for help

alpae commented 5 months ago

Hi @tinycrocodile824, sorry, I didn't mean to be discourteous. There seemed simply no obvious connection to this repository. 😄