Open
Description
Tutorial fails at the visualization step for some sequences such as ['M', 'I', 'I', 'D', 'C', 'E', 'I', 'T', 'F', 'C'] :
conf = lattice.native_conf(seq)
lp.draw.in_notebook(seq, conf)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-17-28e56a5fa8fb> in <module>()
1 conf = lattice.native_conf(seq)
----> 2 lp.draw.in_notebook(seq, conf)
~/Software/latticeproteins/latticeproteins/draw.py in in_notebook(sequence, conf, **kwargs)
39 def in_notebook(sequence, conf, **kwargs):
40 """Creates a Python SVG configuration object. Automagically displays in notebook."""
---> 41 drawing = Configuration(sequence, conf, **kwargs)
42 return drawing
43
~/Software/latticeproteins/latticeproteins/draw.py in __init__(self, sequence, configuration, color_sequence, rotation, font_size, dot_scale, font_weight)
156 self.color_sequence = color_sequence
157 # Sets rotation and configuration
--> 158 self.rotate(rotation)
159
160 @property
~/Software/latticeproteins/latticeproteins/draw.py in rotate(self, rotation)
182 for i in range(n):
183 self.configuration = "".join([ROTATE[c] for c in self.configuration])
--> 184 self._build_drawing()
185
186 def save(self, filename):
~/Software/latticeproteins/latticeproteins/draw.py in _build_drawing(self)
210 def _build_drawing(self):
211 """Build drawing object."""
--> 212 self.array = configuration_to_array(self.sequence, self.configuration)
213 self.color_array = configuration_to_array(self.color_sequence, self.configuration)
214 # Build SVG grid object
~/Software/latticeproteins/latticeproteins/draw.py in configuration_to_array(sequence, configuration)
54 xmoves, ymoves = [0], [0]
55 # Figure out the perimeter of the configuration
---> 56 for i in range(len(configuration)):
57 move = configuration[i]
58 xmoves.append(xmoves[i] + moves[move][0])
TypeError: object of type 'NoneType' has no len()
Metadata
Metadata
Assignees
Labels
No labels