nigyta / dfast_core

DDBJ Fast Annotation and Submission Tool
77 stars 14 forks source link

Error while structural annotation #47

Open kk1120 opened 8 months ago

kk1120 commented 8 months ago

Hallo, Thanks for developing and improving a great tool. I got the following error while analyzing the isolated strain genome. I am running on ubuntu with python version 3.8. Dfast was installed using conda. I installed dfast using conda. I tried to install it in a fresh conda environment as well as in conda's base environment. However, the error did not resolve. Any advice would be appreciated.


2024/02/02 03:16:55 Start structural annotation process using 30 CPUs
2024/02/02 03:16:57 0 assembly_gap features were detected by GAPannotator.
Traceback (most recent call last):
  File "/home/docker/miniconda3/bin/dfast", line 299, in <module>
    pipeline.execute()
  File "/home/docker/miniconda3/opt/dfast-1.2.20/dfc/pipeline.py", line 52, in execute
    self.sa.execute()  # execute structural annotation
  File "/home/docker/miniconda3/opt/dfast-1.2.20/dfc/structuralAnnotation.py", line 82, in execute
    self.setFeatures()
  File "/home/docker/miniconda3/opt/dfast-1.2.20/dfc/structuralAnnotation.py", line 137, in setFeatures
    dict_features = tool.getFeatures()
  File "/home/docker/miniconda3/opt/dfast-1.2.20/dfc/tools/mga.py", line 90, in getFeatures
    feature = ExtendedFeature(location=location, type="CDS", id="{0}_{1}".format(self.__class__.__name__, i),
  File "/home/docker/miniconda3/opt/dfast-1.2.20/dfc/models/bio_feature.py", line 13, in __init__
    super(ExtendedFeature, self).__init__(location, type, location_operator, strand, id, qualifiers,
TypeError: __init__() takes from 1 to 6 positional arguments but 10 were given
nigyta commented 8 months ago

Thanks for reporting the issue.

It seems that this error is raised when using the latest version of Biopython (perhaps v1.82). I'm going to fix this issue in the near future, but for now, a quick workaround for this is to downgrade Biopython.

You can downgrade it with a command below

conda install -c bioconda biopython=1.80
kk1120 commented 8 months ago

Thanks for the quick reply. The Biopython version was 1.83 in my environment... I downgraded biopython as you suggested and now dfast runs smoothly. Once again I really appreciate your support.

atyakhtmpg commented 6 months ago
conda install -c bioconda biopython=1.80

That won't work. One would need instead do:

conda install -c conda-forge biopython=1.80
tianrenmaogithub commented 6 months ago
conda install -c bioconda biopython=1.80

That won't work. One would need instead do:

conda install -c conda-forge biopython=1.80

I used pip install biopython==1.80 and it didn't work either. I used mamba install -c conda-forge biopython=1.80 and it worked. Thanks.