VoigtLab / dnaplotlib

DNA plotting library for Python
MIT License
288 stars 73 forks source link

Key Error: 'start' #26

Open eoberortner opened 4 years ago

eoberortner commented 4 years ago

Hi, I've encountered an issue in the renderDNA function (dnaplotlib/dnaplotlib.py). Each part object must have a 'start' and an 'end' value. If these values are not provided by the user, then it causes a "Key Error" in case the part is reverse oriented. (line 2574-2577).

For me, this simple fix solved the problem:

start = part['start']

                    #end = part['end']
                    part['end'] = part_num + 1
                    part['start'] = part_num

Thanks, Ernst

chofski commented 4 years ago

Thanks, I'll add this fix to v2.0 and close once released.