Skip to content

Commit

Permalink
add check to avoid error when plotting a bed file
Browse files Browse the repository at this point in the history
  • Loading branch information
fidelram committed Mar 31, 2017
1 parent 24b6359 commit 4cba879
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hicexplorer/trackPlot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,8 @@ def __init__(self, *args, **kwarg):
self.colormap = None
# check if the color given is a color map
color_options = [m for m in matplotlib.cm.datad]
if self.properties['color'] in color_options:
if self.properties['color'] in color_options and 'min_value' in self.properties and \
'max_value' in self.properties:
norm = matplotlib.colors.Normalize(vmin=self.properties['min_value'],
vmax=self.properties['max_value'])
cmap = matplotlib.cm.get_cmap(self.properties['color'])
Expand Down

0 comments on commit 4cba879

Please sign in to comment.