gamcil / clinker

Gene cluster comparison figure generator
MIT License
507 stars 66 forks source link

Possible errors when running clinker v0.0.11 with GenBank files from MiBIG #26

Closed fjell-dev closed 3 years ago

fjell-dev commented 3 years ago

Hi, thank you for the great tool. I ran into an error when running the latest version of clinker (v0.0.11) with a GenBank file obtained from MiBIG included. The error is as followed:

Traceback (most recent call last):
  File "/home/ubuntu/anaconda3/bin/clinker", line 8, in <module>
    sys.exit(main())
  File "/home/ubuntu/anaconda3/lib/python3.8/site-packages/clinker/main.py", line 206, in main
    clinker(
  File "/home/ubuntu/anaconda3/lib/python3.8/site-packages/clinker/main.py", line 81, in clinker
    globaligner = align.align_clusters(*clusters, cutoff=identity, jobs=jobs)
  File "/home/ubuntu/anaconda3/lib/python3.8/site-packages/clinker/align.py", line 51, in align_clusters
    aligner.add_clusters(*args)
  File "/home/ubuntu/anaconda3/lib/python3.8/site-packages/clinker/align.py", line 325, in add_clusters
    self._genes[gene.uid] = gene
AttributeError: 'NoneType' object has no attribute 'uid'

It did not happen with an older version (prior to v0.0.9) in another machine or when the MiBIG GenBank file was not included. Could you check what could be the reason? Thanks a lot

gamcil commented 3 years ago

Oh that's weird, could you give me the file or MIBiG accession so I can have a look? Seems like it may not be parsing genes correctly.

fjell-dev commented 3 years ago

I was trying with this gene cluster BGC0002016 from MiBIG (https://mibig.secondarymetabolites.org/repository/BGC0002016/index.html#r1c1). When I tried with another (random) one, BGC0002015, clinker worked. So probably something to do with the GenBank file of BGC0002016?

gamcil commented 3 years ago

Ahh, a gene in that file is annotated as a pseudogene (C5F59_12930) and clinker wasn't saving it. I just released clinker v0.0.12 which should fix this, so see if that works.

fjell-dev commented 3 years ago

That solved the problem, thanks a lot for the (very) quick fix. And thanks again for the great tools.