Edinburgh-Genome-Foundry / DnaFeaturesViewer

:eye: Python library to plot DNA sequence features (e.g. from Genbank files)
https://edinburgh-genome-foundry.github.io/DnaFeaturesViewer/
MIT License
584 stars 90 forks source link

'Seq' object has no attribute 'defined' #84

Closed mwodring closed 7 months ago

mwodring commented 7 months ago

Hi all,

First of all thanks for making this. It's exactly what I was looking for - a simple way to show annotations. The organisms I work with aren't eukaryotic (or even cellular) so the funky libraries that focus on chromosomes and such were difficult to learn and didn't serve my purposes.

I have no issues defining these by hand and can probably write a script to extract stuff from .csv for annotating, but I'd like to use .gb files from Geneious for annotating some things, for convenience. I installed the extra package as you suggested in your docs but get this error when running your example code (unmodified) for .gb files:

line 89, in translate_record
    sequence=str(record.seq) if record.seq.defined else None,

AttributeError: 'Seq' object has no attribute 'defined'

There seems to be another library with the same problem but nobody has suggested fixes for it there either.

Mog

veghp commented 7 months ago

I believe this is related to the update that made it work with the latest Biopython: https://github.com/Edinburgh-Genome-Foundry/DnaFeaturesViewer/pull/79

Which version of Biopython do you use?

mwodring commented 7 months ago

Hi, that's fixed it. Sorry for the confusion!