BjornFJohansson / pydna

Clone with Python! Data structures for double stranded DNA & simulation of homologous recombination, Gibson assembly, cut & paste cloning.
Other
166 stars 45 forks source link

SeqRecord has no attribute ... #52

Closed willsharpless closed 5 years ago

willsharpless commented 5 years ago

Hi thanks a ton for making PyDNA, its awesome. I am having this error maybe because I am a dumbass or because of a bug but if you would please help me that would be great. For some reason I am receiving the attribute error: 'SeqRecord' object has no attribute 'list_features' and same for any of the attributes I've tried. I've opened up the seqrecord.py file and included a screenshot below; I have not tampered with this file in any way. What's weird is that dir(SeqRecord) will show me the attributes (I was wondering if it was getting confused with the Bio.SeqRecord but it doesn't seem to be so).

image

image

image

image

image

willsharpless commented 5 years ago

StackOverflow suggests that it might be because of most updated python's error related to a combination of tabs and spaces

BjornFJohansson commented 5 years ago

Hi, It is because the SeqRecord of pydna is slightly more capable than the SeqRecord of Bio. look at this notebook. The Bio.SeqIO gives you a Bio.SeqRecord. In the notebook above I transferred all the properties to the pydna.SeqRecord which is one way to do it.

willsharpless commented 5 years ago

Bjorn you are bomb.com