combogenomics / DuctApe

Analyze and link genomics and phenomics experiments
http://combogenomics.github.io/DuctApe
Other
9 stars 4 forks source link

Error in dgenome start #6

Closed FrancescoVit closed 2 years ago

FrancescoVit commented 2 years ago

Hi Marco!

I'm trying to run a DuctApe analysis on an experiment with two different bacterial strain (and species). After adding the organisms, the genome annotation and the KAAS annotation, I run the dgenome start but keep getting an error which seems related to Bio.Alphabet.

Here the error message

dgenome start -n 24

10:34:18 - 2 organisms are present
Traceback (most recent call last):
  File "/usr/local/bin/dgenome", line 477, in <module>
    ret = options.func(options, wdir, project)
  File "/usr/local/bin/dgenome", line 101, in dstart
    SeqIO.write(gen.getRecords(organism.org_id),
  File "/usr/local/lib/python3.8/dist-packages/Bio/SeqIO/__init__.py", line 517, in write
    for record in sequences:
  File "/usr/local/lib/python3.8/dist-packages/ductape/storage/SQLite/database.py", line 708, in getRecords
    from Bio import Alphabet
  File "/usr/local/lib/python3.8/dist-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. `

The same command run with no problem with the single strain experiment setting, so there seems to be some problems with the pangenome setting.

Any hint? Thanks, Francesco.

mgalardini commented 2 years ago

Ciao Francesco,

the error is due to a change in behavior in biopython. Either downgrade your biopython version to < 1.78 or use the DuctApe code from the latest commit: https://github.com/combogenomics/DuctApe/tree/e3915412d6820c3ad94a745611d896da0f6b39dc

Let me know if that helps, it fixed the problem for me.

Marco

FrancescoVit commented 2 years ago

Downgrading (1.77) solved the issue. Thanks! Francesco.

FrancescoVit commented 1 year ago

Just an update, downgrading seems to solve multiple bugs.

Re-Intalled on another PC using GitHub from the commit, but another bug is present at the activity ring plot step:

dphenome rings `16:45:54 - Just one organism is present Traceback (most recent call last): File "/home/fvitali/miniconda3/bin/dphenome", line 654, in ret = options.func(options, wdir, project)` ` File "/home/fvitali/miniconda3/bin/dphenome", line 276, in drings return dPhenomeRings(project, delta=options.delta, difforg=options.o,` ` File "/home/fvitali/miniconda3/lib/python3.8/site-packages/ductape/actions.py", line 1812, in dPhenomeRings categ = c.category.replace(' ','_').replace('&','and')` AttributeError: 'NoneType' object has no attribute 'replace'

Not a bug but some other errors (likely connected to the non standard plate). Sorry!